[Libreoffice-commits] .: 5 commits - basic/source editeng/inc editeng/source fpicker/test hyphen/hyphen-android.patch hyphen/hyphen-build.patch hyphen/hyphen-fdo43931.patch hyphen/makefile.mk hyphen/prj mythes/makefile.mk mythes/mythes-1.2.0-android.patch mythes/mythes-1.2.0-makefile-mk.diff mythes/mythes-1.2.0-vanilla-th-gen-idx.patch mythes/mythes-1.2.1-rhbz675806.patch mythes/prj ooo.lst.in scripting/source svtools/source svtools/workben sw/source vcl/source vcl/test vcl/workben

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jun 29 04:23:15 PDT 2012


 basic/source/classes/sbunoobj.cxx                  |    4 
 basic/source/comp/dim.cxx                          |    8 
 basic/source/runtime/stdobj.cxx                    |    4 
 editeng/inc/editeng/outliner.hxx                   |   10 
 editeng/source/outliner/outliner.cxx               |    6 
 fpicker/test/svdem.cxx                             |    2 
 hyphen/hyphen-android.patch                        |    4 
 hyphen/hyphen-build.patch                          |   12 
 hyphen/hyphen-fdo43931.patch                       |   12 
 hyphen/makefile.mk                                 |    4 
 hyphen/prj/d.lst                                   |    4 
 mythes/makefile.mk                                 |    4 
 mythes/mythes-1.2.0-android.patch                  |    4 
 mythes/mythes-1.2.0-makefile-mk.diff               |    5 
 mythes/mythes-1.2.0-vanilla-th-gen-idx.patch       |    4 
 mythes/mythes-1.2.1-rhbz675806.patch               |   10 
 mythes/prj/d.lst                                   |    4 
 ooo.lst.in                                         |    4 
 scripting/source/pyprov/mailmerge.py               |   12 
 svtools/source/control/calendar.cxx                |    4 
 svtools/source/control/ctrlbox.cxx                 |    6 
 svtools/source/control/filectrl.cxx                |    2 
 svtools/source/control/fmtfield.cxx                |    2 
 svtools/source/edit/svmedit.cxx                    |    2 
 svtools/workben/cui/loadlib.cxx                    |   88 -
 svtools/workben/svdem.cxx                          | 1110 ---------------------
 svtools/workben/toolpanel/toolpaneltest.cxx        |  883 ----------------
 svtools/workben/treecontrol/treetest.cxx           |  398 -------
 svtools/workben/unodialog/roadmapskeleton.cxx      |  107 --
 svtools/workben/unodialog/roadmapskeleton.hrc      |   32 
 svtools/workben/unodialog/roadmapskeleton.hxx      |   59 -
 svtools/workben/unodialog/roadmapskeleton.src      |   80 -
 svtools/workben/unodialog/roadmapskeletonpages.cxx |  108 --
 svtools/workben/unodialog/roadmapskeletonpages.hxx |   98 -
 svtools/workben/unodialog/udlg_global.hrc          |   45 
 svtools/workben/unodialog/udlg_module.cxx          |   35 
 svtools/workben/unodialog/udlg_module.hxx          |   38 
 svtools/workben/unodialog/udlg_services.cxx        |   63 -
 svtools/workben/unodialog/unodialogsample.cxx      |  205 ---
 sw/source/core/layout/dbg_lay.cxx                  |    6 
 sw/source/core/layout/newfrm.cxx                   |    2 
 sw/source/core/text/txtftn.cxx                     |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                  |   11 
 vcl/source/window/msgbox.cxx                       |    2 
 vcl/source/window/window.cxx                       |    2 
 vcl/test/canvasbitmaptest.cxx                      |    2 
 vcl/test/dndtest.cxx                               |    2 
 vcl/workben/svdem.cxx                              |    2 
 vcl/workben/svpclient.cxx                          |    2 
 vcl/workben/svptest.cxx                            |    2 
 vcl/workben/vcldemo.cxx                            |    2 
 51 files changed, 77 insertions(+), 3442 deletions(-)

New commits:
commit 6843ce885e3e128d24ea8472da4883de223213cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 29 12:20:16 2012 +0100

    Resolves: fdo#38713 fix multiple recipients in mailmerge
    
    It appears I don't know the correct syntax for concatenating tuples
    
    Change-Id: I32756caeaabfcc52e521108da917aeadf8256caa

diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py
index 38a40d1..f8ccbd6 100755
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -397,12 +397,12 @@ class PyMailMessage(unohelper.Base, XMailMessage):
 			print >> dbgout, "PyMailMessage init"
 		self.ctx = ctx
 
-		self.recipients = sTo,
+		self.recipients = (sTo,)
 		self.ccrecipients = ()
 		self.bccrecipients = ()
 		self.aMailAttachments = ()
 		if aMailAttachment != None:
-			self.aMailAttachments = aMailAttachment, 
+			self.aMailAttachments = (aMailAttachment,)
 
 		self.SenderName, self.SenderAddress = parseaddr(sFrom)
 		self.ReplyToAddress = sFrom
@@ -413,15 +413,15 @@ class PyMailMessage(unohelper.Base, XMailMessage):
 	def addRecipient( self, recipient ):
 		if dbg:
 			print >> dbgout, "PyMailMessage.addRecipient", recipient
-		self.recipients = self.recipients, recipient
+		self.recipients = self.recipients + (recipient,)
 	def addCcRecipient( self, ccrecipient ):
 		if dbg:
 			print >> dbgout, "PyMailMessage.addCcRecipient", ccrecipient
-		self.ccrecipients = self.ccrecipients, ccrecipient
+		self.ccrecipients = self.ccrecipients + (ccrecipient,)
 	def addBccRecipient( self, bccrecipient ):
 		if dbg:
 			print >> dbgout, "PyMailMessage.addBccRecipient", bccrecipient
-		self.bccrecipients = self.bccrecipients, bccrecipient
+		self.bccrecipients = self.bccrecipients + (bccrecipient,)
 	def getRecipients( self ):
 		if dbg:
 			print >> dbgout, "PyMailMessage.getRecipients", self.recipients
@@ -437,7 +437,7 @@ class PyMailMessage(unohelper.Base, XMailMessage):
 	def addAttachment( self, aMailAttachment ):
 		if dbg:
 			print >> dbgout, "PyMailMessage.addAttachment"
-		self.aMailAttachments = self.aMailAttachments, aMailAttachment
+		self.aMailAttachments = self.aMailAttachments + (aMailAttachment,)
 	def getAttachments( self ):
 		if dbg:
 			print >> dbgout, "PyMailMessage.getAttachments"
commit ff3c4e9e54efff3b8701fb562291a9edacae8100
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 29 11:20:03 2012 +0100

    bump hyphen to 2.8.4
    
    Change-Id: Iafcd6d7b06529534abb1470c7739bb9f935f3c61

diff --git a/hyphen/hyphen-android.patch b/hyphen/hyphen-android.patch
index 1cc3365..6adc51d 100644
--- a/hyphen/hyphen-android.patch
+++ b/hyphen/hyphen-android.patch
@@ -1,5 +1,5 @@
---- misc/hyphen-2.8.3/config.sub
-+++ misc/build/hyphen-2.8.3/config.sub
+--- misc/hyphen-2.8.4/config.sub
++++ misc/build/hyphen-2.8.4/config.sub
 @@ -120,7 +120,7 @@
  # Here we must recognize all the valid KERNEL-OS combinations.
  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
diff --git a/hyphen/hyphen-build.patch b/hyphen/hyphen-build.patch
index abd02ef..7b8ceaa 100644
--- a/hyphen/hyphen-build.patch
+++ b/hyphen/hyphen-build.patch
@@ -1,5 +1,5 @@
---- misc/hyphen-2.8.3/Makefile.am	2010-07-19 11:23:17.000000000 +0200
-+++ misc/build/hyphen-2.8.3/Makefile.am	2010-12-02 10:15:44.390625000 +0100
+--- misc/hyphen-2.8.4/Makefile.am	2010-07-19 11:23:17.000000000 +0200
++++ misc/build/hyphen-2.8.4/Makefile.am	2010-12-02 10:15:44.390625000 +0100
 @@ -25,13 +25,13 @@
  
  hyphen.us3:
@@ -17,8 +17,8 @@
  
  clean-local:
  	rm -rf hyphen.us* hyph_en_US.dic
---- misc/hyphen-2.8.3/Makefile.in	2010-12-01 02:31:29.000000000 +0100
-+++ misc/build/hyphen-2.8.3/Makefile.in	2010-12-02 10:17:16.546875000 +0100
+--- misc/hyphen-2.8.4/Makefile.in	2010-12-01 02:31:29.000000000 +0100
++++ misc/build/hyphen-2.8.4/Makefile.in	2010-12-02 10:17:16.546875000 +0100
 @@ -940,13 +940,13 @@
  
  hyphen.us3:
@@ -36,8 +36,8 @@
  
  clean-local:
  	rm -rf hyphen.us* hyph_en_US.dic
---- misc/hyphen-2.8.3/makefile.mk	2010-12-02 10:35:40.265625000 +0100
-+++ misc/build/hyphen-2.8.3/makefile.mk	2010-12-02 10:25:45.750000000 +0100
+--- misc/hyphen-2.8.4/makefile.mk	2010-12-02 10:35:40.265625000 +0100
++++ misc/build/hyphen-2.8.4/makefile.mk	2010-12-02 10:25:45.750000000 +0100
 @@ -1 +1,28 @@
 -dummy
 +PRJ = ..$/..$/..$/..
diff --git a/hyphen/hyphen-fdo43931.patch b/hyphen/hyphen-fdo43931.patch
index 17e1320..0a1f0b9 100644
--- a/hyphen/hyphen-fdo43931.patch
+++ b/hyphen/hyphen-fdo43931.patch
@@ -1,15 +1,15 @@
---- misc//hyphen-2.8.3/hyphen.c	2011-10-10 15:49:33.000000000 +0200
-+++ misc/build/hyphen-2.8.3/hyphen.c	2011-12-27 13:49:07.568283812 +0100
-@@ -435,9 +435,9 @@
+--- misc//hyphen-2.8.4/hyphen.c	2011-10-10 15:49:33.000000000 +0200
++++ misc/build/hyphen-2.8.4/hyphen.c	2011-12-27 13:49:07.568283812 +0100
+@@ -436,9 +436,9 @@
      }
    } else if (k == 1) {
      /* default first level: hyphen and ASCII apostrophe */
 -    if (!dict[0]->utf8) hnj_hyphen_load_line("NOHYPHEN '\n", dict[k], hashtab);
 -    else hnj_hyphen_load_line("NOHYPHEN ',\xe2\x80\x93,\xe2\x80\x99\n", dict[k], hashtab);
--    strcpy(buf, "1-1/=,1,1\n"); // buf rewritten by hnj_hyphen_load here
+-    strncpy(buf, "1-1/=,1,1\n", MAX_CHARS-1); // buf rewritten by hnj_hyphen_load here
 +    if (!dict[0]->utf8) hnj_hyphen_load_line("NOHYPHEN ',-\n", dict[k], hashtab);
 +    else hnj_hyphen_load_line("NOHYPHEN ',\xe2\x80\x93,\xe2\x80\x99,-\n", dict[k], hashtab);
-+    strcpy(buf, "1-1\n"); // buf rewritten by hnj_hyphen_load here
++    strncpy(buf, "1-1\n", MAX_CHARS-1); // buf rewritten by hnj_hyphen_load here
+     buf[MAX_CHARS-1] = '\0';
      hnj_hyphen_load_line(buf, dict[k], hashtab); /* remove hyphen */
      hnj_hyphen_load_line("1'1\n", dict[k], hashtab); /* ASCII apostrophe */
-     if (dict[0]->utf8) {
diff --git a/hyphen/makefile.mk b/hyphen/makefile.mk
index f44953f..6275bd9 100644
--- a/hyphen/makefile.mk
+++ b/hyphen/makefile.mk
@@ -36,8 +36,8 @@ TARGET=hyphen
 
 # --- Files --------------------------------------------------------
 
-TARFILE_NAME=hyphen-2.8.3
-TARFILE_MD5=86261f06c097d3e425a2f6d0b0635380
+TARFILE_NAME=hyphen-2.8.4
+TARFILE_MD5=a2f6010987e1c601274ab5d63b72c944
 
 ADDITIONAL_FILES += makefile.mk
 
diff --git a/hyphen/prj/d.lst b/hyphen/prj/d.lst
index dbaf96e..0588179 100644
--- a/hyphen/prj/d.lst
+++ b/hyphen/prj/d.lst
@@ -1,5 +1,5 @@
 ..\%__SRC%\slb\hyphen.lib     %_DEST%\lib\hyphen.lib
 
 ..\%__SRC%\inc\hyphen.h %_DEST%\inc\hyphen.h
-..\%__SRC%\misc\build\hyphen-2.8.3\.libs\libhyphen.a %_DEST%\lib\libhyphen.a
-..\%__SRC%\misc\build\hyphen-2.8.3\hyph_en_US.dic %_DEST%\bin\hyph_en_US.dic
+..\%__SRC%\misc\build\hyphen-2.8.4\.libs\libhyphen.a %_DEST%\lib\libhyphen.a
+..\%__SRC%\misc\build\hyphen-2.8.4\hyph_en_US.dic %_DEST%\bin\hyph_en_US.dic
diff --git a/ooo.lst.in b/ooo.lst.in
index bf4d63f..f147e85 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -1,5 +1,5 @@
 http://dev-www.libreoffice.org/src
-86261f06c097d3e425a2f6d0b0635380-hyphen-2.8.3.tar.gz
+a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz
 51a40a81b3b7abe8a5c33670bd3da0ce-openssl-0.9.8v.tar.gz
 c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
 0b49ede71c21c0599b0cc19b353a6cb3-README_apache-commons.txt
commit 9e0cbe5eb3f4785d8db26f87ce0208823c87c5ad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 29 09:16:03 2012 +0100

    some pesky XubStrings
    
    Change-Id: Ib4095dee416cab6d954e1612d2e3f6e2d4464f48

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 1a38e04..084a657 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2349,8 +2349,8 @@ SbUnoObject::SbUnoObject( const rtl::OUString& aName_, const Any& aUnoObj_ )
     static Reference< XIntrospection > xIntrospection;
 
     // beat out again the default properties of Sbx
-    Remove( XubString(  RTL_CONSTASCII_USTRINGPARAM("Name")), SbxCLASS_DONTCARE );
-    Remove( XubString(  RTL_CONSTASCII_USTRINGPARAM("Parent")), SbxCLASS_DONTCARE );
+    Remove( rtl::OUString("Name"), SbxCLASS_DONTCARE );
+    Remove( rtl::OUString("Parent"), SbxCLASS_DONTCARE );
 
     // check the type of the ojekts
     TypeClass eType = aUnoObj_.getValueType().getTypeClass();
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 5263d42..1acc7c9 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -669,8 +669,8 @@ void SbiParser::DefType( sal_Bool bPrivate )
         }
     }
 
-    pType->Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Name") ), SbxCLASS_DONTCARE );
-    pType->Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Parent") ), SbxCLASS_DONTCARE );
+    pType->Remove( rtl::OUString("Name"), SbxCLASS_DONTCARE );
+    pType->Remove( rtl::OUString("Parent"), SbxCLASS_DONTCARE );
 
     rTypeArray->Insert (pType,rTypeArray->Count());
 }
@@ -805,8 +805,8 @@ void SbiParser::DefEnum( sal_Bool bPrivate )
         }
     }
 
-    pEnum->Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Name") ), SbxCLASS_DONTCARE );
-    pEnum->Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Parent") ), SbxCLASS_DONTCARE );
+    pEnum->Remove( rtl::OUString("Name"), SbxCLASS_DONTCARE );
+    pEnum->Remove( rtl::OUString("Parent"), SbxCLASS_DONTCARE );
 
     rEnumArray->Insert( pEnum, rEnumArray->Count() );
 }
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index f782a39..89a244f 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -737,8 +737,8 @@ SbiStdObject::SbiStdObject( const String& r, StarBASIC* pb ) : SbxObject( r )
     }
 
     // #i92642: Remove default properties
-    Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Name") ), SbxCLASS_DONTCARE );
-    Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Parent") ), SbxCLASS_DONTCARE );
+    Remove( rtl::OUString("Name"), SbxCLASS_DONTCARE );
+    Remove( rtl::OUString("Parent"), SbxCLASS_DONTCARE );
 
     SetParent( pb );
 
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index da3b9c2..8007945 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -136,16 +136,16 @@ private:
 
     Paragraph& operator=(const Paragraph& rPara );
 
-    sal_uInt16              nFlags;
-    XubString           aBulText;
+    sal_uInt16          nFlags;
+    rtl::OUString       aBulText;
     Size                aBulSize;
-    sal_Bool                bVisible;
+    sal_Bool            bVisible;
 
     sal_Bool                IsVisible() const { return bVisible; }
-    void                SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
+    void                SetText( const rtl::OUString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
     void                Invalidate() { aBulSize.Width() = -1; }
     void                SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
-    const XubString&    GetText() const { return aBulText; }
+    const rtl::OUString& GetText() const { return aBulText; }
 
                         Paragraph( sal_Int16 nDepth );
                         Paragraph( const Paragraph& );
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index cb2393f..d124a4a 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1001,7 +1001,7 @@ void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
                 if(bStrippingPortions)
                 {
                     const Font aSvxFont(pOutDev->GetFont());
-                    sal_Int32* pBuf = new sal_Int32[ pPara->GetText().Len() ];
+                    sal_Int32* pBuf = new sal_Int32[ pPara->GetText().getLength() ];
                     pOutDev->GetTextArray( pPara->GetText(), pBuf );
 
                     if(bSymbol)
@@ -1011,7 +1011,7 @@ void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
                         aTextPos.Y() -= aMetric.GetDescent();
                     }
 
-                    DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf,
+                    DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf,
                         aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color());
 
                     delete[] pBuf;
@@ -1952,7 +1952,7 @@ void Outliner::ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_
             aBulletText += pFmt->GetSuffix();
         }
 
-        if( aBulletText != pPara->GetText() )
+        if (!pPara->GetText().equals(aBulletText))
             pPara->SetText( aBulletText );
 
         pPara->nFlags &= (~PARAFLAG_SETBULLETTEXT);
diff --git a/fpicker/test/svdem.cxx b/fpicker/test/svdem.cxx
index 5523524..04a0a53 100644
--- a/fpicker/test/svdem.cxx
+++ b/fpicker/test/svdem.cxx
@@ -123,7 +123,7 @@ private:
 void Main()
 {
     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
-    aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) );
+    aMainWin.SetText(rtl::OUString("VCL - Workbench"));
     aMainWin.Show();
 
     Application::Execute();
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 6da6386..9c41a8b 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -351,7 +351,7 @@ void Calendar::ImplFormat()
         if ( (aOutSize.Width() <= 1) || (aOutSize.Height() <= 1) )
             return;
 
-        XubString a99Text( XubString( RTL_CONSTASCII_USTRINGPARAM( "99" ) ) );
+        rtl::OUString a99Text("99");
 
         Font aOldFont = GetFont();
 
@@ -2168,7 +2168,7 @@ void Calendar::EndSelection()
 Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine,
                                     long nCalcLines ) const
 {
-    XubString   a99Text( XubString( RTL_CONSTASCII_USTRINGPARAM( "99" ) ) );
+    rtl::OUString a99Text("99");
     Font        aOldFont = GetFont();
 
     // Wochenanzeige beruecksichtigen
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index c2e26b9..be53f12 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -91,7 +91,7 @@ public:
 void ColorListBox::ImplInit()
 {
     pColorList = new ImpColorList();
-    aImageSize.Width()  = GetTextWidth( XubString( RTL_CONSTASCII_USTRINGPARAM( "xxx" ) ) );
+    aImageSize.Width()  = GetTextWidth( rtl::OUString("xxx") );
     aImageSize.Height() = GetTextHeight();
     aImageSize.Height() -= 2;
 
@@ -688,7 +688,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
 
 void LineListBox::ImplInit()
 {
-    aTxtSize.Width()  = GetTextWidth( XubString( RTL_CONSTASCII_USTRINGPARAM( " " )  ) );
+    aTxtSize.Width()  = GetTextWidth( rtl::OUString( " " ) );
     aTxtSize.Height() = GetTextHeight();
     pLineList   = new ImpLineList();
     eUnit       = FUNIT_POINT;
@@ -904,7 +904,7 @@ void LineListBox::UpdateEntries( long nOldWidth )
                     GetColorLine2( GetEntryCount( ) ),
                     GetColorDist( GetEntryCount( ) ),
                     pData->GetStyle(), aBmp );
-            ListBox::InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( " " )  ), aBmp, LISTBOX_APPEND );
+            ListBox::InsertEntry( rtl::OUString( " " ), aBmp, LISTBOX_APPEND );
             if ( n == nTypePos )
                 SelectEntryPos( GetEntryCount() - 1 );
         }
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index ddf8fdd..7f702b5 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -168,7 +168,7 @@ void FileControl::Resize()
     }
     else
     {
-        XubString aSmallText( RTL_CONSTASCII_USTRINGPARAM( "..." ) );
+        rtl::OUString aSmallText( "..." );
         maButton.SetText( aSmallText );
         nButtonTextWidth = maButton.GetTextWidth( aSmallText );
     }
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 9854561..8dcffce 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -1266,7 +1266,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
         sSymbol = comphelper::string::stripStart(sSymbol, ' ');
         sSymbol = comphelper::string::stripEnd(sSymbol, ' ');
 
-        XubString sTemp = String::CreateFromAscii("[$");
+        XubString sTemp = rtl::OUString("[$");
         sTemp += sSymbol;
         sTemp.AppendAscii("] ");
         sTemp += sNewFormat;
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index beb2153..4fff9e0 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -1409,7 +1409,7 @@ void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSi
         }
     }
 
-    XubString aText = GetText();
+    rtl::OUString aText = GetText();
     Size aTextSz( pDev->GetTextWidth( aText ), pDev->GetTextHeight() );
     sal_uLong nLines = (sal_uLong) (aSize.Height() / aTextSz.Height());
     if ( !nLines )
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 6601333..fb9f94c 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -301,7 +301,7 @@ void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct,
 void SwProtocol::Init()
 {
     nRecord = 0;
-    XubString aName( "dbg_lay.go", RTL_TEXTENCODING_MS_1252 );
+    rtl::OUString aName("dbg_lay.go");
     SvFileStream aStream( aName, STREAM_READ );
     if( aStream.IsOpen() )
     {
@@ -334,7 +334,7 @@ SwImplProtocol::SwImplProtocol()
 
 sal_Bool SwImplProtocol::NewStream()
 {
-    XubString aName( "dbg_lay.out", RTL_TEXTENCODING_MS_1252 );
+    rtl::OUString aName("dbg_lay.out");
     nLineCount = 0;
     pStream = new SvFileStream( aName, STREAM_WRITE | STREAM_TRUNC );
     if( pStream->GetError() )
@@ -466,7 +466,7 @@ void SwImplProtocol::CheckLine( rtl::OString& rLine )
  * --------------------------------------------------*/
 void SwImplProtocol::FileInit()
 {
-    XubString aName( "dbg_lay.ini", RTL_TEXTENCODING_MS_1252 );
+    rtl::OUString aName("dbg_lay.ini");
     SvFileStream aStream( aName, STREAM_READ );
     if( aStream.IsOpen() )
     {
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index dd6091b..64755d5 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -475,7 +475,7 @@ void InitCurrShells( SwRootFrm *pRoot )
 
 SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
     SwLayoutFrm( pFmt->GetDoc()->MakeFrmFmt(
-        XubString( "Root", RTL_TEXTENCODING_MS_1252 ), pFmt ), 0 ),
+        rtl::OUString("Root"), pFmt ), 0 ),
     // --> PAGES01
     maPagesArea(),
     mnViewWidth( -1 ),
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 1cb527d..eb2c365 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1517,7 +1517,7 @@ sal_Bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
     if( bFull )
     {
         // zweiter Versuch, wir kuerzen den String:
-        aExpand = XubString( "...", RTL_TEXTENCODING_MS_1252 );
+        aExpand = rtl::OUString("...");
         bFull = SwFldPortion::Format( rInf );
         SetLen( 0 );
         if( bFull  )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 07af727..6d73e91 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7796,7 +7796,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sa
     // multiline text
     if ( nStyle & TEXT_DRAW_MULTILINE )
     {
-        XubString               aLastLine;
+        rtl::OUString           aLastLine;
         ImplMultiTextLineInfo   aMultiLineInfo;
         ImplTextLineInfo*       pLineInfo;
         xub_StrLen              i;
@@ -7821,12 +7821,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sa
                     pLineInfo = aMultiLineInfo.GetLine( nFormatLines );
                     aLastLine = convertLineEnd(aStr.Copy(pLineInfo->GetIndex()), LINEEND_LF);
                     // replace line feed by space
-                    xub_StrLen nLastLineLen = aLastLine.Len();
-                    for ( i = 0; i < nLastLineLen; i++ )
-                    {
-                        if ( aLastLine.GetChar( i ) == _LF )
-                            aLastLine.SetChar( i, ' ' );
-                    }
+                    aLastLine = aLastLine.replace(_LF, ' ');
                     aLastLine = m_pReferenceDevice->GetEllipsisString( aLastLine, nWidth, nStyle );
                     nStyle &= ~(TEXT_DRAW_VCENTER | TEXT_DRAW_BOTTOM);
                     nStyle |= TEXT_DRAW_TOP;
@@ -7858,7 +7853,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sa
 
 
             // output last line left adjusted since it was shortened
-            if ( aLastLine.Len() )
+            if (!aLastLine.isEmpty())
                 drawText( aPos, aLastLine, 0, STRING_LEN, bTextLines );
         }
     }
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 6863d2e..8f3e296 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -262,7 +262,7 @@ void MessBox::ImplPosControls()
 
 
     // Message-Text um Tabs bereinigen
-    XubString   aTabStr( RTL_CONSTASCII_USTRINGPARAM( "    " ) );
+    rtl::OUString   aTabStr("    ");
     sal_uInt16      nIndex = 0;
     while ( nIndex != STRING_NOTFOUND )
         nIndex = aMessText.SearchAndReplace( '\t', aTabStr, nIndex );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8cb1a52..9c45e8b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -217,7 +217,7 @@ void Window::ImplInitAppFontData( Window* pWindow )
 {
     ImplSVData* pSVData = ImplGetSVData();
     long nTextHeight = pWindow->GetTextHeight();
-    long nTextWidth = pWindow->GetTextWidth( XubString( "aemnnxEM"  ) );
+    long nTextWidth = pWindow->GetTextWidth(rtl::OUString("aemnnxEM"));
     long nSymHeight = nTextHeight*4;
     // Make the basis wider if the font is too narrow
     // such that the dialog looks symmetrical and does not become too narrow.
diff --git a/vcl/test/canvasbitmaptest.cxx b/vcl/test/canvasbitmaptest.cxx
index d65ddeb..576810a 100644
--- a/vcl/test/canvasbitmaptest.cxx
+++ b/vcl/test/canvasbitmaptest.cxx
@@ -1033,7 +1033,7 @@ void Main()
 {
     TestWindow aWindow;
     aWindow.Execute();
-    aWindow.SetText( XubString( "VCL - canvasbitmaptest"  ) );
+    aWindow.SetText( rtl::OUString( "VCL - canvasbitmaptest"  ) );
 
     Application::Execute();
 }
diff --git a/vcl/test/dndtest.cxx b/vcl/test/dndtest.cxx
index d35e673..28f2518 100644
--- a/vcl/test/dndtest.cxx
+++ b/vcl/test/dndtest.cxx
@@ -190,7 +190,7 @@ void MyApp::Main()
 
 
     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
-    aMainWin.SetText( XubString( "Drag And Drop - Workbench"  ) );
+    aMainWin.SetText( rtl::OUString( "Drag And Drop - Workbench"  ) );
     aMainWin.Show();
 
     // test the clipboard code
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index 0bbb309..cbdea98 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -75,7 +75,7 @@ public:
 void Main()
 {
     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
-    aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) );
+    aMainWin.SetText(rtl::OUString("VCL - Workbench"));
     aMainWin.Show();
 
     Application::Execute();
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index a059735..4b07940 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -162,7 +162,7 @@ public:
 void Main()
 {
     MyWin aMainWin( NULL, WB_STDWORK );
-    aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "SvpClient" ) ) );
+    aMainWin.SetText( rtl::OUString( "SvpClient" ) );
     aMainWin.Show();
 
     Application::Execute();
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 2c1dd59..6e08dc1 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -95,7 +95,7 @@ public:
 void Main()
 {
     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
-    aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) );
+    aMainWin.SetText( rtl::OUString( "VCL - Workbench" ) );
     aMainWin.Show();
 
     Application::Execute();
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 7df524a..b5fbb89 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -87,7 +87,7 @@ public:
 void Main()
 {
     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
-    aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCLDemo - VCL Workbench" ) ) );
+    aMainWin.SetText( rtl::OUString( "VCLDemo - VCL Workbench" ) );
     aMainWin.Show();
 
     /*
commit 6c759da0442f5123a4a4355e8dc9c926a49d25d7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 29 00:21:52 2012 +0100

    delete workben
    
    Change-Id: Ib07874e03c2a0082ddf9f851e717ac5761b4839d

diff --git a/svtools/workben/cui/loadlib.cxx b/svtools/workben/cui/loadlib.cxx
deleted file mode 100644
index 6b4c116..0000000
--- a/svtools/workben/cui/loadlib.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <osl/module.h>
-#include <rtl/ustring.hxx>
-
-using ::rtl::OUString;
-
-extern "C" {
-struct VersionInfo
-{
-        const char*     pTime;
-        const char*     pDate;
-        const char*     pUpd;
-        const char*     pMinor;
-        const char*     pBuild;
-        const char*     pInpath;
-};
-
-typedef VersionInfo*(__LOADONCALLAPI *GetVersionInfo)(void);
-}
-
-int __LOADONCALLAPI main( int argc, char **argv )
-{
-    VersionInfo *pInfo = NULL;
-
-    if ( argc != 2 )
-    {
-        fprintf( stderr, "USAGE: %s DllName \n", argv[0] );
-        exit(0);
-    }
-    OUString aLib = OUString::createFromAscii(argv[1]);
-    oslModule aLibrary = osl_loadModule( aLib.pData, SAL_LOADMODULE_DEFAULT );
-    if ( aLibrary )
-    {
-        void* pFunc = osl_getSymbol( aLibrary, OUString( RTL_CONSTASCII_USTRINGPARAM( "GetVersionInfo" )).pData );
-        if ( pFunc )
-            pInfo = (*(GetVersionInfo)pFunc)();
-    }
-    if ( pInfo )
-    {
-        fprintf( stdout, "Date : %s\n", pInfo->pDate );
-        fprintf( stdout, "Time : %s\n", pInfo->pTime );
-        fprintf( stdout, "UPD : %s\n", pInfo->pUpd );
-        fprintf( stdout, "Minor : %s\n", pInfo->pMinor );
-        fprintf( stdout, "Build : %s\n", pInfo->pBuild );
-        fprintf( stdout, "Inpath : %s\n", pInfo->pInpath );
-    }
-    else
-        fprintf( stderr, "VersionInfo not Found !\n" );
-
-    if ( aLibrary )
-        osl_unloadModule( aLibrary );
-
-    return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/workben/svdem.cxx b/svtools/workben/svdem.cxx
deleted file mode 100644
index c18e749..0000000
--- a/svtools/workben/svdem.cxx
+++ /dev/null
@@ -1,1110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <stdio.h>
-#include <cppuhelper/servicefactory.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include <unotools/calendarwrapper.hxx>
-#include <unotools/localedatawrapper.hxx>
-
-#include <vcl/wrkwin.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/print.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/help.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
-#include <vcl/scrbar.hxx>
-#include <vcl/slider.hxx>
-#include <vcl/group.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/status.hxx>
-#include <stdmenu.hxx>
-#include <ctrltool.hxx>
-#include <ctrlbox.hxx>
-#include <tabbar.hxx>
-#include <svtools/valueset.hxx>
-#include <svtools/headbar.hxx>
-#include <prgsbar.hxx>
-#include <calendar.hxx>
-#include <svtools/prnsetup.hxx>
-#include <svtools/printdlg.hxx>
-
-using namespace ::com::sun::star;
-
-// -----------------------------------------------------------------------
-
-class MyApp : public Application
-{
-public:
-    void Main();
-};
-
-// -----------------------------------------------------------------------
-
-class ShowBitmap : public WorkWindow
-{
-    Bitmap          aBmp;
-
-public:
-                    ShowBitmap( Window* pParent, const Bitmap& rBmp );
-
-    virtual void    Paint( const Rectangle& );
-    virtual sal_Bool    Close();
-};
-
-// -----------------------------------------------------------------------
-
-class ShowFont : public Control
-{
-public:
-                    ShowFont( Window* pParent );
-
-    virtual void    Paint( const Rectangle& );
-    void            SetFont( const Font& rFont )
-                        { Invalidate(); Control::SetFont( rFont ); }
-};
-
-// --- class OrientSlider ------------------------------------------------
-
-class OrientSlider : public Slider
-{
-public:
-                OrientSlider( Window* pParent );
-
-    short       GetOrientation() const { return (short)GetThumbPos(); }
-};
-
-// -----------------------------------------------------------------------
-
-OrientSlider::OrientSlider( Window* pParent ) :
-    Slider( pParent, WB_HORZ | WB_DRAG )
-{
-    SetThumbPos( 0 );
-    SetLineSize( 10 );
-    SetPageSize( 100 );
-    SetRange( Range( 0, 3600 ) );
-}
-
-// -----------------------------------------------------------------------
-
-class MyFontDialog : public ModalDialog
-{
-private:
-    FontList*       pList;
-    Font            aCurFont;
-    Printer         aPrinter;
-    FontNameBox     aFontBox;
-    FontStyleBox    aStyleBox;
-    FontSizeBox     aSizeBox;
-    ListBox         aUnderlineBox;
-    ListBox         aStrikeoutBox;
-    CheckBox        aWordLineBox;
-    CheckBox        aShadowBox;
-    CheckBox        aOutlineBox;
-    ColorListBox    aColorBox;
-    GroupBox        aEffectBox;
-    OrientSlider    aLineOrientSlider;
-    ShowFont        aShowFont;
-    GroupBox        aSampleBox;
-    FixedText       aMapText;
-    OKButton        aOKBtn;
-    CancelButton    aCancelBtn;
-
-public:
-                    MyFontDialog( Window* pParent );
-
-                    DECL_LINK( SelectFont, ComboBox* );
-                    DECL_LINK( SelectStyle, ComboBox* );
-                    DECL_LINK( AttrHdl, Window * );
-    void            SetAttr();
-    short           Execute();
-};
-
-// -----------------------------------------------------------------------
-
-class MyTabBar : public TabBar
-{
-public:
-                    MyTabBar( Window* pParent,
-                              WinBits nWinStyle = WB_STDTABBAR ) :
-                        TabBar( pParent, nWinStyle ) {}
-
-    virtual long    DeactivatePage();
-    virtual long    AllowRenaming();
-    virtual void    Split();
-};
-
-// -----------------------------------------------------------------------
-
-class MyCalendar : public WorkWindow
-{
-    MenuBar     aMenuBar;
-    PopupMenu   aWeekStartMenu;
-    PopupMenu   aWeekCountMenu;
-    Calendar    aCalendar;
-    Color       aInfoColor;
-    Color       aHolidayColor;
-    Color       aFrameColor;
-
-public:
-                MyCalendar( Window* pParent );
-                ~MyCalendar();
-
-                DECL_LINK( RequestDateInfoHdl, Calendar* );
-                DECL_LINK( DoubleClickHdl, Calendar* );
-                DECL_LINK( MenuSelectHdl, Menu* );
-
-    void        Resize();
-};
-
-// -----------------------------------------------------------------------
-
-class MyWin : public WorkWindow
-{
-private:
-    Printer         aPrn;
-    ToolBox         aBox;
-    StatusBar       aBar;
-    HeaderBar       aHeadBar;
-    ColorListBox    aColorList;
-    LineListBox     aLineList;
-    ValueSet        aValueSet;
-    CalendarField   aCalendarField;
-    CalendarField   aCalendarField2;
-    MyTabBar        aTabBar;
-    ProgressBar     aPrgsBar;
-    PushButton      aFontBtn;
-    PushButton      aCalendarBtn;
-    PushButton      aPrnSetupBtn;
-    PushButton      aPrnDlgBtn;
-    Size            aBoxSize;
-    MyCalendar*     pCalendar;
-    PopupMenu*      pMenu;
-    FontNameMenu*   pNameMenu;
-    FontStyleMenu*  pStyleMenu;
-    FontSizeMenu*   pSizeMenu;
-
-public:
-                    MyWin( Window* pParent, WinBits aWinStyle );
-                    ~MyWin();
-
-                    DECL_LINK( Test, PushButton* );
-                    DECL_LINK( SelectHdl, Window* );
-    void            ContextMenu( const Point& rPos );
-
-    void            Command( const CommandEvent& rCEvt );
-    void            MouseButtonDown( const MouseEvent& rMEvt );
-    void            KeyInput( const KeyEvent& rKEvt );
-    void            Paint( const Rectangle& rRect );
-    void            Resize();
-};
-
-// -----------------------------------------------------------------------
-
-void MyApp::Main()
-{
-    try
-    {
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-              xMSF = cppu::createRegistryServiceFactory(
-                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
-
-        ::comphelper::setProcessServiceFactory( xMSF );
-
-        Help aHelp;
-        SetHelp( &aHelp );
-        Help::EnableContextHelp();
-        Help::EnableExtHelp();
-        Help::EnableBalloonHelp();
-        Help::EnableQuickHelp();
-
-        MyWin aMainWin( NULL, WinBits( WB_APP | WB_STDWORK | WB_CLIPCHILDREN ) );
-        aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "SVTOOLS - Workbench" ) ) );
-        aMainWin.GrabFocus();
-        aMainWin.Show();
-
-        Execute();
-    }
-    catch ( const com::sun::star::uno::Exception & e )
-    {
-        fprintf( stderr, "Error during bootstrapping servicemanager: %s\n" ,
-                 rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
-    }
-}
-
-// -----------------------------------------------------------------------
-
-ShowBitmap::ShowBitmap( Window* pParent, const Bitmap& rBmp ) :
-    WorkWindow( pParent, WB_STDWORK ),
-    aBmp( rBmp )
-{
-    SetOutputSizePixel( rBmp.GetSizePixel() );
-    SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Bitmap-Viewer" ) ) );
-    Show();
-}
-
-// -----------------------------------------------------------------------
-
-void ShowBitmap::Paint( const Rectangle& )
-{
-    DrawBitmap( Point(), GetOutputSizePixel(), aBmp );
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool ShowBitmap::Close()
-{
-    Hide();
-    delete this;
-    return sal_True;
-}
-
-// -----------------------------------------------------------------------
-
-ShowFont::ShowFont( Window* pParent ) :
-    Control( pParent, WB_BORDER )
-{
-    SetMapMode( MapMode( MAP_POINT, Point(),
-                         Fraction( 1, 10 ), Fraction( 1, 10 ) ) );
-    SetBackground( Wallpaper( Color( COL_WHITE ) ) );
-}
-
-// -----------------------------------------------------------------------
-
-void ShowFont::Paint( const Rectangle& )
-{
-    const Font& rFont = GetFont();
-    String      aText;
-    Size        aWindowSize( GetOutputSize() );
-    long        x,y;
-
-    if ( rFont.GetOrientation() )
-    {
-        aText.Append( rtl::OUString::valueOf(static_cast<sal_Int32>(rFont.GetOrientation()/10)) );
-        aText.AppendAscii( " degree." );
-
-        x = aWindowSize.Width()/2;
-        y = aWindowSize.Height()/2;
-    }
-    else
-    {
-        aText = rFont.GetName();
-        if ( !aText.Len() )
-            aText.AssignAscii( "Sample" );
-
-        x = aWindowSize.Width()/2 - GetTextWidth( aText )/2;
-        y = aWindowSize.Height()/2 - GetTextHeight()/2;
-    }
-
-    DrawText( Point( x, y ), aText );
-}
-
-// -----------------------------------------------------------------------
-
-MyFontDialog::MyFontDialog( Window* pParent ) :
-    ModalDialog( pParent, WB_3DLOOK | WB_STDMODAL ),
-    aFontBox( this ),
-    aStyleBox( this ),
-    aSizeBox( this ),
-    aUnderlineBox( this, WB_DROPDOWN ),
-    aStrikeoutBox( this, WB_DROPDOWN ),
-    aWordLineBox( this ),
-    aShadowBox( this ),
-    aOutlineBox( this ),
-    aColorBox( this, WB_DROPDOWN ),
-    aEffectBox( this ),
-    aLineOrientSlider( this ),
-    aShowFont( this ),
-    aSampleBox( this ),
-    aMapText( this, WB_LEFT | WB_WORDBREAK ),
-    aOKBtn( this, WB_DEFBUTTON ),
-    aCancelBtn( this )
-{
-    pList = NULL;
-
-    aFontBox.EnableWYSIWYG( sal_True );
-    aFontBox.EnableSymbols( sal_True );
-    aFontBox.SetPosSizePixel( Point( 10, 10 ), Size( 140, 140 ) );
-    aFontBox.SetSelectHdl( LINK( this, MyFontDialog, SelectFont ) );
-    aFontBox.SetLoseFocusHdl( LINK( this, MyFontDialog, SelectFont ) );
-    aFontBox.Show();
-
-    aStyleBox.SetPosSizePixel( Point( 160, 10 ), Size( 100, 140 ) );
-    aStyleBox.SetSelectHdl( LINK( this, MyFontDialog, SelectStyle ) );
-    aStyleBox.SetLoseFocusHdl( LINK( this, MyFontDialog, SelectStyle ) );
-    aStyleBox.Show();
-
-    aSizeBox.SetPosSizePixel( Point( 270, 10 ), Size( 60, 140 ) );
-    aSizeBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aSizeBox.SetLoseFocusHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aSizeBox.Show();
-
-    aUnderlineBox.SetPosSizePixel( Point( 15, 180 ), Size( 130, 100 ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_NONE" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_SINGLE" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DOUBLE" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DOTTED" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DONTKNOW" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DASH" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_LONGDASH" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DASHDOT" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DASHDOTDOT" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_SMALLWAVE" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_WAVE" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DOUBLEWAVE" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLD" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDOTTED" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDASH" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDLONGDASH" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDASHDOT" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDASHDOTDOT" ) ) );
-    aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDWAVE" ) ) );
-    aUnderlineBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aUnderlineBox.Show();
-
-    aStrikeoutBox.SetPosSizePixel( Point( 15, 210 ), Size( 130, 100 ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_NONE" ) ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_SINGLE" ) ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_DOUBLE" ) ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_DONTKNOW" ) ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_BOLD" ) ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_SLASH" ) ) );
-    aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_X" ) ) );
-    aStrikeoutBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aStrikeoutBox.Show();
-
-    aWordLineBox.SetPosSizePixel( Point( 15, 240 ), Size( 130, 19 ) );
-    aWordLineBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Only ~Words" ) ) );
-    aWordLineBox.SetClickHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aWordLineBox.Show();
-
-    aShadowBox.SetPosSizePixel( Point( 15, 260 ), Size( 130, 19 ) );
-    aShadowBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Shadow" ) ) );
-    aShadowBox.SetClickHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aShadowBox.Show();
-
-    aOutlineBox.SetPosSizePixel( Point( 15, 280 ), Size( 130, 19 ) );
-    aOutlineBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Outline" ) ) );
-    aOutlineBox.SetClickHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aOutlineBox.Show();
-
-    {
-    aColorBox.SetPosSizePixel( Point( 15, 305 ), Size( 130, 100 ) );
-    aColorBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aColorBox.SetUpdateMode( sal_False );
-    aColorBox.InsertEntry( Color( COL_BLACK ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
-    aColorBox.InsertEntry( Color( COL_BLUE ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
-    aColorBox.InsertEntry( Color( COL_GREEN ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
-    aColorBox.InsertEntry( Color( COL_CYAN ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
-    aColorBox.InsertEntry( Color( COL_RED ),           XubString( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
-    aColorBox.InsertEntry( Color( COL_MAGENTA ),       XubString( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
-    aColorBox.InsertEntry( Color( COL_BROWN ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
-    aColorBox.InsertEntry( Color( COL_GRAY ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
-    aColorBox.InsertEntry( Color( COL_LIGHTGRAY ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGray" ) ) );
-    aColorBox.InsertEntry( Color( COL_LIGHTBLUE ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightBlue" ) ) );
-    aColorBox.InsertEntry( Color( COL_LIGHTGREEN ),    XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGreen" ) ) );
-    aColorBox.InsertEntry( Color( COL_LIGHTCYAN ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightCyan" ) ) );
-    aColorBox.InsertEntry( Color( COL_LIGHTRED ),      XubString( RTL_CONSTASCII_USTRINGPARAM( "LightRed" ) ) );
-    aColorBox.InsertEntry( Color( COL_LIGHTMAGENTA ),  XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
-    aColorBox.InsertEntry( Color( COL_YELLOW ),        XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
-    aColorBox.InsertEntry( Color( COL_WHITE ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
-    aColorBox.SetUpdateMode( sal_True );
-    aColorBox.Show();
-    }
-
-    aEffectBox.SetPosSizePixel( Point( 10, 160 ), Size( 140, 175 ) );
-    aEffectBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Effects" ) ) );
-    aEffectBox.Show();
-
-    Size aSliderSize = aLineOrientSlider.GetSizePixel();
-    aLineOrientSlider.SetPosSizePixel( Point( 160, 335-aSliderSize.Height() ),
-                                       Size( 250, aSliderSize.Height() ) );
-    aLineOrientSlider.SetSlideHdl( LINK( this, MyFontDialog, AttrHdl ) );
-    aLineOrientSlider.Show();
-
-    aShowFont.SetPosSizePixel( Point( 165, 180 ), Size( 240, 70 ) );
-    aShowFont.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Sample" ) ) );
-    aShowFont.Show();
-
-    aSampleBox.SetPosSizePixel( Point( 160, 160 ), Size( 250, 100 ) );
-    aSampleBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Sample" ) ) );
-    aSampleBox.Show();
-
-    aMapText.SetPosSizePixel( Point( 160, 270 ), Size( 250, 35 ) );
-    aMapText.Show();
-
-    aOKBtn.SetPosSizePixel( Point( 340, 10 ), Size( 70, 25 ) );
-    aOKBtn.Show();
-
-    aCancelBtn.SetPosSizePixel( Point( 340, 40 ), Size( 70, 25 ) );
-    aCancelBtn.Show();
-
-    SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "FontDialog" ) ) );
-    SetOutputSizePixel( Size( 420, 345 ) );
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(MyFontDialog, SelectFont)
-{
-    aStyleBox.Fill( aFontBox.GetText(), pList );
-    FontInfo aInfo = pList->Get( aFontBox.GetText(), aStyleBox.GetText() );
-    aSizeBox.Fill( &aInfo, pList );
-    SetAttr();
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(MyFontDialog, SelectStyle)
-{
-    FontInfo aInfo = pList->Get( aFontBox.GetText(), aStyleBox.GetText() );
-    aSizeBox.Fill( &aInfo, pList );
-    SetAttr();
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(MyFontDialog, AttrHdl)
-{
-    SetAttr();
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-void MyFontDialog::SetAttr()
-{
-    FontInfo aFont( pList->Get( aFontBox.GetText(), aStyleBox.GetText() ) );
-    aFont.SetSize( Size( 0, aSizeBox.GetValue() ) );
-    aFont.SetUnderline( (FontUnderline)aUnderlineBox.GetSelectEntryPos() );
-    aFont.SetStrikeout( (FontStrikeout)aStrikeoutBox.GetSelectEntryPos() );
-    aFont.SetColor( Color( (ColorData)aColorBox.GetSelectEntryPos() ) );
-    aFont.SetWordLineMode( aWordLineBox.IsChecked() );
-    aFont.SetShadow( aShadowBox.IsChecked() );
-    aFont.SetOutline( aOutlineBox.IsChecked() );
-    aFont.SetOrientation( aLineOrientSlider.GetOrientation() );
-    aFont.SetTransparent( sal_True );
-    aMapText.SetText( pList->GetFontMapText( aFont ) );
-    aShowFont.SetFont( aFont );
-}
-
-// -----------------------------------------------------------------------
-
-short MyFontDialog::Execute()
-{
-    pList = new FontList( &aPrinter, this );
-    aFontBox.Fill( pList );
-    aSizeBox.SetValue( 120 );
-    aUnderlineBox.SelectEntryPos( 0 );
-    aStrikeoutBox.SelectEntryPos( 0 );
-    aColorBox.SelectEntryPos( 0 );
-    SelectFont( &aFontBox );
-    short nRet = ModalDialog::Execute();
-    delete pList;
-    return nRet;
-}
-
-// -----------------------------------------------------------------------
-
-long MyTabBar::DeactivatePage()
-{
-    if ( GetCurPageId() == 6 )
-    {
-        QueryBox aQueryBox( this, WB_YES_NO | WB_DEF_YES,
-                            XubString( RTL_CONSTASCII_USTRINGPARAM( "Deactivate" ) ) );
-        if ( aQueryBox.Execute() == RET_YES )
-            return sal_True;
-        else
-            return sal_False;
-    }
-    else
-        return sal_True;
-}
-
-// -----------------------------------------------------------------------
-
-long MyTabBar::AllowRenaming()
-{
-    XubString aStr( RTL_CONSTASCII_USTRINGPARAM( "Allow renaming: " ) );
-    aStr += GetEditText();
-    QueryBox aQueryBox( this, WB_YES_NO_CANCEL | WB_DEF_YES, aStr );
-    long nRet = aQueryBox.Execute();
-    if ( nRet == RET_YES )
-        return TAB_RENAMING_YES;
-    else if ( nRet == RET_NO )
-        return TAB_RENAMING_NO;
-    else // ( nRet == RET_CANCEL )
-        return TAB_RENAMING_CANCEL;
-}
-
-// -----------------------------------------------------------------------
-
-void MyTabBar::Split()
-{
-    Size    aSize = GetSizePixel();
-    long    nWidth = GetSplitSize();
-    long    nMaxWidth = GetParent()->GetOutputSizePixel().Width()-50;
-    if ( nWidth < GetMinSize() )
-        nWidth = GetMinSize();
-    else if ( nWidth > nMaxWidth )
-        nWidth = nMaxWidth;
-    SetSizePixel( Size( nWidth, aSize.Height() ) );
-}
-
-// -----------------------------------------------------------------------
-
-MyCalendar::MyCalendar( Window* pParent ) :
-    WorkWindow( pParent, WB_STDWORK ),
-    aCalendar( this, WB_TABSTOP | WB_WEEKNUMBER | WB_BOLDTEXT | WB_FRAMEINFO | WB_MULTISELECT ),
-    aInfoColor( COL_LIGHTBLUE ),
-    aHolidayColor( COL_LIGHTRED ),
-    aFrameColor( COL_LIGHTRED )
-{
-    const CalendarWrapper& rCal = aCalendar.GetCalendarWrapper();
-    aMenuBar.InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Wochen~anfang" ) ) );
-    aMenuBar.InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Erste Woche" ) ) );
-    aMenuBar.SetPopupMenu( 1, &aWeekStartMenu );
-    aMenuBar.SetPopupMenu( 2, &aWeekCountMenu );
-    sal_Int16 nDays = rCal.getNumberOfDaysInWeek();
-    uno::Sequence< i18n::CalendarItem2> xItems = rCal.getDays();
-    const i18n::CalendarItem2* pArr = xItems.getArray();
-    for ( sal_Int16 i = 0; i < nDays; i++ )
-        aWeekStartMenu.InsertItem( 10+(sal_uInt16)i, pArr[i].FullName, MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekStartMenu.CheckItem( 10+(sal_uInt16)rCal.getFirstDayOfWeek() );
-    aWeekCountMenu.InsertItem( 20, XubString( RTL_CONSTASCII_USTRINGPARAM( "~1. Januar" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekCountMenu.InsertItem( 21, XubString( RTL_CONSTASCII_USTRINGPARAM( "~2 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekCountMenu.InsertItem( 22, XubString( RTL_CONSTASCII_USTRINGPARAM( "~3 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekCountMenu.InsertItem( 23, XubString( RTL_CONSTASCII_USTRINGPARAM( "Erste 4 ~Tage-Woche" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekCountMenu.InsertItem( 24, XubString( RTL_CONSTASCII_USTRINGPARAM( "~5 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekCountMenu.InsertItem( 25, XubString( RTL_CONSTASCII_USTRINGPARAM( "~6 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    aWeekCountMenu.InsertItem( 26, XubString( RTL_CONSTASCII_USTRINGPARAM( "Erste ~volle Woche" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
-    //was: one of 0, 1, 2;  aWeekCountMenu.CheckItem( 20+(sal_uInt16)rIntn.GetWeekCountStart() );
-    aWeekCountMenu.CheckItem( 20+(sal_uInt16)rCal.getMinimumNumberOfDaysForFirstWeek() );
-    aMenuBar.SetSelectHdl( LINK( this, MyCalendar, MenuSelectHdl ) );
-    SetMenuBar( &aMenuBar );
-
-    Date aCurDate = aCalendar.GetCurDate();
-    aCalendar.SetRequestDateInfoHdl( LINK( this, MyCalendar, RequestDateInfoHdl ) );
-    aCalendar.SetDoubleClickHdl( LINK( this, MyCalendar, DoubleClickHdl ) );
-    aCalendar.SetSaturdayColor( Color( COL_LIGHTGREEN ) );
-    aCalendar.SetSundayColor( aHolidayColor );
-    aCalendar.AddDateInfo( Date(  1,  1, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Neujahr" ) ), &aHolidayColor, NULL );
-    aCalendar.AddDateInfo( Date( 24, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Heiligabend" ) ), &aInfoColor, NULL );
-    aCalendar.AddDateInfo( Date( 25, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "1. Weihnachttag" ) ), &aHolidayColor, NULL );
-    aCalendar.AddDateInfo( Date( 26, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "2. Weihnachttag" ) ), &aHolidayColor, NULL );
-    aCalendar.AddDateInfo( Date( 31, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Silvester" ) ), &aInfoColor, NULL );
-    aCalendar.SetPosPixel( Point() );
-    aCalendar.SetFirstDate( Date( 1, 1, aCurDate.GetYear() ) );
-    aCalendar.Show();
-
-    SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Calendar" ) ) );
-    SetOutputSizePixel( aCalendar.CalcWindowSizePixel( 3, 4 ) );
-}
-
-// -----------------------------------------------------------------------
-
-MyCalendar::~MyCalendar()
-{
-    SetMenuBar( NULL );
-    aMenuBar.SetPopupMenu( 1, NULL );
-    aMenuBar.SetPopupMenu( 2, NULL );
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(MyCalendar, RequestDateInfoHdl)
-{
-    sal_uInt16 nRequestYear = aCalendar.GetRequestYear();
-    if ( (nRequestYear >= 1954) && (nRequestYear <= 1989) )
-        aCalendar.AddDateInfo( Date(  17, 6, nRequestYear ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Tag der deutschen Einheit" ) ), &aHolidayColor, NULL );
-    else if ( nRequestYear >=  1990 )
-        aCalendar.AddDateInfo( Date(  3, 10, nRequestYear ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Tag der deutschen Einheit" ) ), &aHolidayColor, NULL );
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(MyCalendar, DoubleClickHdl)
-{
-    Date aDate = aCalendar.GetCurDate();
-    String aStr( RTL_CONSTASCII_USTRINGPARAM( "Info: " ) );
-    aStr += Application::GetAppLocaleDataWrapper().getDate( aDate );
-    aCalendar.AddDateInfo( aDate, aStr, NULL, &aFrameColor, DIB_BOLD );
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( MyCalendar, MenuSelectHdl, Menu*, pMenu )
-{
-    sal_uInt16          nItemId = pMenu->GetCurItemId();
-
-    if ( (nItemId >= 10) && (nItemId <= 19) )
-        aCalendar.SetWeekStart( nItemId-10 );
-    else if ( (nItemId >= 20) && (nItemId <= 29) )
-        aCalendar.SetMinimumNumberOfDaysInWeek( nItemId-20 );
-
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-void MyCalendar::Resize()
-{
-    aCalendar.SetSizePixel( GetOutputSizePixel() );
-}
-
-// -----------------------------------------------------------------------
-
-MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
-    WorkWindow(pParent, aWinStyle | WB_3DLOOK ),
-    aBox( this, WB_BORDER | WB_3DLOOK ),
-    aBar( this, WB_BORDER | WB_3DLOOK | WB_RIGHT ),
-    aHeadBar( this, WB_BORDER | WB_3DLOOK | WB_DRAG | WB_BUTTONSTYLE ),
-    aColorList( this ),
-    aLineList( this ),
-    aValueSet( this, WB_TABSTOP | WB_NAMEFIELD | WB_NONEFIELD | WB_BORDER | WB_ITEMBORDER | WB_VSCROLL /* | WB_FLATVALUESET */ ),
-    aCalendarField( this, WB_TABSTOP | WB_SPIN | WB_REPEAT | WB_DROPDOWN | WB_BORDER ),
-    aCalendarField2( this, WB_TABSTOP | WB_SPIN | WB_REPEAT | WB_DROPDOWN | WB_BORDER ),
-    aTabBar( this, WB_BORDER | WB_MULTISELECT | WB_SCROLL | WB_SIZEABLE | WB_DRAG ),
-    aPrgsBar( this ),
-    aFontBtn( this ),
-    aCalendarBtn( this ),
-    aPrnSetupBtn( this ),
-    aPrnDlgBtn( this )
-{
-    SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFaceColor() ) );
-
-    pCalendar = NULL;
-    pMenu = NULL;
-
-    Bitmap aBmp;
-    aBox.InsertItem(  1, aBmp );
-    aBox.InsertItem(  2, aBmp );
-    aBox.InsertItem(  3, aBmp );
-    aBox.InsertItem(  4, aBmp );
-    aBox.InsertSeparator();
-    aBox.InsertItem(  5, aBmp );
-    aBox.InsertItem(  6, aBmp );
-    aBox.InsertItem(  7, aBmp );
-    aBox.InsertItem(  8, aBmp );
-    aBox.InsertSpace();
-    aBox.InsertItem(  9, aBmp );
-    aBox.SetPosPixel( Point( 0, 0 ) );
-    aBoxSize = aBox.GetSizePixel();
-    aBox.Show();
-
-    aBar.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Ready" ) ) );
-    aBar.InsertItem( 1, 35 );
-    aBar.InsertItem( 2, 55 );
-    aBar.InsertItem( 3, 55 );
-    aBar.SetItemText( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ) );
-    aBar.SetItemText( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "21.01.93" ) ) );
-    aBar.SetItemText( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "12:00:00" ) ) );
-    aBar.Show();
-
-    long nY = aBox.GetSizePixel().Height()+10;
-    {
-    aHeadBar.SetPosPixel( Point( 0, nY ) );
-    aHeadBar.InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Sender" ) ), 150 );
-    aHeadBar.InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Subject" ) ), 150, HIB_CENTER | HIB_VCENTER | HIB_CLICKABLE );
-    aHeadBar.InsertItem( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) ), 75 );
-    aHeadBar.InsertItem( 4, XubString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), 60, HIB_RIGHT | HIB_VCENTER | HIB_CLICKABLE );
-    aHeadBar.InsertItem( 9999, String(), HEADERBAR_FULLSIZE, HIB_RIGHT | HIB_VCENTER | HIB_FIXEDPOS );
-    aHeadBar.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
-    aHeadBar.Show();
-    nY += aHeadBar.GetSizePixel().Height() += 10;
-    }
-
-    {
-    aColorList.SetPosSizePixel( Point( 10, nY ), Size( 130, 180 ) );
-    aColorList.SetUpdateMode( sal_False );
-    aColorList.InsertEntry( Color( COL_BLACK ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
-    aColorList.InsertEntry( Color( COL_BLUE ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
-    aColorList.InsertEntry( Color( COL_GREEN ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
-    aColorList.InsertEntry( Color( COL_CYAN ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
-    aColorList.InsertEntry( Color( COL_RED ),           XubString( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
-    aColorList.InsertEntry( Color( COL_MAGENTA ),       XubString( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
-    aColorList.InsertEntry( Color( COL_BROWN ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
-    aColorList.InsertEntry( Color( COL_GRAY ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
-    aColorList.InsertEntry( Color( COL_LIGHTGRAY ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGray" ) ) );
-    aColorList.InsertEntry( Color( COL_LIGHTBLUE ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightBlue" ) ) );
-    aColorList.InsertEntry( Color( COL_LIGHTGREEN ),    XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGreen" ) ) );
-    aColorList.InsertEntry( Color( COL_LIGHTCYAN ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightCyan" ) ) );
-    aColorList.InsertEntry( Color( COL_LIGHTRED ),      XubString( RTL_CONSTASCII_USTRINGPARAM( "LightRed" ) ) );
-    aColorList.InsertEntry( Color( COL_LIGHTMAGENTA ),  XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
-    aColorList.InsertEntry( Color( COL_YELLOW ),        XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
-    aColorList.InsertEntry( Color( COL_WHITE ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
-    aColorList.SetUpdateMode( sal_True );
-    aColorList.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
-    aColorList.Show();
-    }
-
-    {
-    aLineList.SetPosSizePixel( Point( 150, nY ), Size( 130, 180 ) );
-    aLineList.SetUnit( FUNIT_POINT );
-    aLineList.SetSourceUnit( FUNIT_TWIP );
-    aLineList.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Hairline" ) ) );
-    aLineList.InsertEntry( 1500 );
-    aLineList.InsertEntry( 3000 );
-    aLineList.InsertEntry( 4500 );
-    aLineList.InsertEntry( 6000 );
-    aLineList.InsertEntry( 7500 );
-    aLineList.InsertEntry( 9000 );
-    aLineList.InsertEntry( 1500, 1500, 1500 );
-    aLineList.InsertEntry( 3000, 1500, 1500 );
-    aLineList.InsertEntry( 4500, 1500, 1500 );
-    aLineList.InsertEntry( 3000, 3000, 1500 );
-    aLineList.InsertEntry( 4500, 3000, 1500 );
-    aLineList.InsertEntry( 4500, 4500, 1500 );
-    aLineList.Show();
-    }
-
-    {
-    aValueSet.SetPosSizePixel( Point( 290, nY ), Size( 130, 180 ) );
-    aValueSet.InsertItem(  9, Color( COL_BLACK ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
-    aValueSet.InsertItem( 10, Color( COL_BLUE ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
-    aValueSet.InsertItem( 11, Color( COL_GREEN ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
-    aValueSet.InsertItem( 12, Color( COL_CYAN ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
-    aValueSet.InsertItem( 13, Color( COL_RED ),           XubString( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
-    aValueSet.InsertItem( 14, Color( COL_MAGENTA ),       XubString( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
-    aValueSet.InsertItem( 15, Color( COL_BROWN ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
-    aValueSet.InsertItem( 16, Color( COL_GRAY ),          XubString( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
-    aValueSet.InsertItem( 17, Color( COL_LIGHTGRAY ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGray" ) ) );
-    aValueSet.InsertItem( 18, Color( COL_LIGHTBLUE ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightBlue" ) ) );
-    aValueSet.InsertItem( 19, Color( COL_LIGHTGREEN ),    XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGreen" ) ) );
-    aValueSet.InsertItem( 20, Color( COL_LIGHTCYAN ),     XubString( RTL_CONSTASCII_USTRINGPARAM( "LightCyan" ) ) );
-    aValueSet.InsertItem( 21, Color( COL_LIGHTRED ),      XubString( RTL_CONSTASCII_USTRINGPARAM( "LightRed" ) ) );
-    aValueSet.InsertItem( 22, Color( COL_LIGHTMAGENTA ),  XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
-    aValueSet.InsertItem( 23, Color( COL_YELLOW ),        XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
-    aValueSet.InsertItem( 24, Color( COL_WHITE ),         XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
-    aValueSet.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) );
-    aValueSet.SetColCount( 4 );
-    aValueSet.SetLineCount( 4 );
-    aValueSet.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
-    aValueSet.Show();
-    }
-
-    {
-    aCalendarField.EnableEmptyFieldValue( sal_True );
-    aCalendarField.SetCalendarStyle( aCalendarField.GetCalendarStyle() | WB_RANGESELECT );
-    aCalendarField.SetEmptyDate();
-    aCalendarField.EnableToday();
-    aCalendarField.EnableNone();
-    aCalendarField.SetPosSizePixel( Point( 430, nY ), Size( 130, 20 ) );
-    aCalendarField.Show();
-    }
-
-    {
-    aCalendarField2.SetDate( Date() );
-    aCalendarField2.SetPosSizePixel( Point( 570, nY ), Size( 130, 20 ) );
-    aCalendarField2.Show();
-    }
-
-    nY += 200;
-    {
-    aTabBar.SetPosSizePixel( Point( 10, nY ),
-                             Size( 300, aTabBar.GetSizePixel().Height() ) );
-    aTabBar.InsertPage(  1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 1" ) ) );
-    aTabBar.InsertPage(  2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 2" ) ) );
-    aTabBar.InsertPage(  3, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 3" ) ) );
-    aTabBar.InsertPage(  4, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 4" ) ) );
-    aTabBar.InsertPage(  5, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 5" ) ) );
-    aTabBar.InsertPage(  6, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 6" ) ) );
-    aTabBar.InsertPage(  7, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 7" ) ) );
-    aTabBar.InsertPage(  8, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 8" ) ) );
-    aTabBar.InsertPage(  9, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 9" ) ) );
-    aTabBar.InsertPage( 10, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 10" ) ) );
-    aTabBar.InsertPage( 11, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 11" ) ) );
-    aTabBar.InsertPage( 12, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 12" ) ) );
-    aTabBar.InsertPage( 13, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 13" ) ) );
-    aTabBar.InsertPage( 14, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 14" ) ) );
-    aTabBar.InsertPage( 15, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 15" ) ) );
-    aTabBar.InsertPage( 16, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 16" ) ) );
-    aTabBar.InsertPage( 17, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 17" ) ) );
-    aTabBar.InsertPage( 18, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 18" ) ) );
-    aTabBar.InsertPage( 19, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 19" ) ) );
-    aTabBar.InsertPage( 20, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 20" ) ) );
-    aTabBar.InsertPage( 21, XubString( RTL_CONSTASCII_USTRINGPARAM( "This is a long Page Text" ) ) );
-    aTabBar.InsertPage( 22, XubString( RTL_CONSTASCII_USTRINGPARAM( "Short Text" ) ) );
-    aTabBar.InsertPage( 23, XubString( RTL_CONSTASCII_USTRINGPARAM( "And now a very very long Page Text" ) ) );
-    aTabBar.InsertPage( 24, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 24" ) ) );
-    aTabBar.InsertPage( 25, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 25" ) ) );
-    aTabBar.InsertPage( 26, XubString( RTL_CONSTASCII_USTRINGPARAM( "And now a very long Page Text" ) ) );
-    aTabBar.InsertPage( 27, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 27" ) ) );
-    aTabBar.InsertPage( 28, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 28" ) ) );
-    aTabBar.InsertPage( 29, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 29" ) ) );
-    aTabBar.InsertPage( 30, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 30" ) ) );
-    aTabBar.EnableEditMode();
-    aTabBar.Show();
-    }
-
-    nY += 35;
-    {
-    aPrgsBar.SetPosPixel( Point( 10, nY ) );
-    aPrgsBar.Show();
-    }
-
-    nY += 40;
-    {
-    aFontBtn.SetPosSizePixel( Point( 10, nY ), Size( 100, 30 ) );
-    aFontBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Font..." ) ) );
-    aFontBtn.SetClickHdl( LINK( this, MyWin, Test ) );
-    aFontBtn.Show();
-
-    aCalendarBtn.SetPosSizePixel( Point( 120, nY ), Size( 100, 30 ) );
-    aCalendarBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Calendar" ) ) );
-    aCalendarBtn.SetClickHdl( LINK( this, MyWin, Test ) );
-    aCalendarBtn.Show();
-
-    aPrnSetupBtn.SetPosSizePixel( Point( 230, nY ), Size( 100, 30 ) );
-    aPrnSetupBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "PrnSetup..." ) ) );
-    aPrnSetupBtn.SetClickHdl( LINK( this, MyWin, Test ) );
-    aPrnSetupBtn.Show();
-
-    aPrnDlgBtn.SetPosSizePixel( Point( 340, nY ), Size( 100, 30 ) );
-    aPrnDlgBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Print...." ) ) );
-    aPrnDlgBtn.SetClickHdl( LINK( this, MyWin, Test ) );
-    aPrnDlgBtn.Show();
-    }
-}
-
-// -----------------------------------------------------------------------
-
-MyWin::~MyWin()
-{
-    if ( pCalendar )
-        delete pCalendar;
-
-    if ( pMenu )
-    {
-        delete pMenu;
-        delete pNameMenu;
-        delete pStyleMenu;
-        delete pSizeMenu;
-    }
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( MyWin, Test, PushButton*, pBtn )
-{
-    if ( pBtn == &aFontBtn )
-    {
-        MyFontDialog* pDlg = new MyFontDialog( this );
-        pDlg->Execute();
-        delete pDlg;
-    }
-    else if ( pBtn == &aCalendarBtn )
-    {
-        if ( !pCalendar )
-            pCalendar = new MyCalendar( this );
-        pCalendar->ToTop();
-        pCalendar->Show();
-    }
-    else if ( pBtn == &aPrnSetupBtn )
-    {
-        PrinterSetupDialog* pDlg = new PrinterSetupDialog( this );
-        pDlg->SetPrinter( &aPrn );
-        pDlg->Execute();
-        delete pDlg;
-    }
-    else if ( pBtn == &aPrnDlgBtn )
-    {
-        PrintDialog* pDlg = new PrintDialog( this, false );
-        pDlg->SetPrinter( &aPrn );
-        pDlg->EnableRange( PRINTDIALOG_ALL );
-        pDlg->EnableRange( PRINTDIALOG_RANGE );
-        pDlg->Execute();
-        delete pDlg;
-    }
-
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( MyWin, SelectHdl, Window*, pCtrl )
-{
-    if ( pCtrl == &aColorList )
-    {
-        Color aColor = aColorList.GetSelectEntryColor();
-        aValueSet.SetColor( aColor );
-        aLineList.SetColor( aColor );
-    }
-    else if ( pCtrl == &aValueSet )
-    {
-        sal_uInt16 nId = aValueSet.GetSelectItemId();
-        if ( nId > 8 )
-        {
-            Color aColor = aValueSet.GetItemColor( nId );
-            aValueSet.SetFillColor( aColor );
-        }
-    }
-    else if ( pCtrl == &aHeadBar )
-    {
-        sal_uInt16 nCurItemId = aHeadBar.GetCurItemId();
-        for ( sal_uInt16 i = 0; i < aHeadBar.GetItemCount(); i++ )
-        {
-            sal_uInt16 nItemId = aHeadBar.GetItemId( i );
-            HeaderBarItemBits nBits = aHeadBar.GetItemBits( nItemId );
-            if ( nItemId == nCurItemId )
-            {
-                HeaderBarItemBits nOldBits = nBits;
-                nBits &= ~(HIB_DOWNARROW | HIB_UPARROW);
-                if ( nOldBits & HIB_DOWNARROW )
-                    nBits |= HIB_UPARROW;
-                else
-                    nBits |= HIB_DOWNARROW;
-            }
-            else
-                nBits &= ~(HIB_DOWNARROW | HIB_UPARROW);
-            aHeadBar.SetItemBits( nItemId, nBits );
-        }
-    }
-
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::ContextMenu( const Point& rPos )
-{
-    FontList aList( this );
-
-    if ( !pMenu )
-    {
-        pMenu       = new PopupMenu;
-        pNameMenu   = new FontNameMenu;
-        pStyleMenu  = new FontStyleMenu;
-        pSizeMenu   = new FontSizeMenu;
-
-        pMenu->InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Font" ) ) );
-        pMenu->InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Attribute" ) ) );
-        pMenu->InsertItem( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) );
-        pMenu->SetPopupMenu( 1, pNameMenu );
-        pMenu->SetPopupMenu( 2, pStyleMenu );
-        pMenu->SetPopupMenu( 3, pSizeMenu );
-
-        pNameMenu->Fill( &aList );
-        pNameMenu->SetCurName( aList.GetFontName( 0 ).GetName() );
-
-        pStyleMenu->InsertSeparator();
-        pStyleMenu->InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Underline" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
-        pStyleMenu->InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Stri~keout" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
-        pStyleMenu->InsertItem( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Shadow" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
-        pStyleMenu->InsertItem( 4, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Outline" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
-    }
-
-    pStyleMenu->Fill( pNameMenu->GetCurName(), &aList );
-    pSizeMenu->Fill( aList.Get( pNameMenu->GetCurName(),
-                                pStyleMenu->GetCurStyle() ), &aList );
-
-    pMenu->Execute( this, rPos );
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::Command( const CommandEvent& rCEvt )
-{
-    if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
-        ContextMenu( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) );
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
-{
-    aValueSet.StartSelection();
-    WorkWindow::MouseButtonDown( rMEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::KeyInput( const KeyEvent& rKEvt )
-{
-    if ( rKEvt.GetKeyCode().GetCode() == KEY_P )
-    {
-        for ( sal_uInt16 i = 0; i <= 130; i += 2 )
-        {
-            for ( sal_uInt16 j = 0; j < 6000; j++ )
-            {
-                aPrgsBar.SetValue( i );
-                Application::Reschedule();
-            }
-        }
-    }
-    else if ( rKEvt.GetCharCode() == '+' )
-        aHeadBar.SetOffset( aHeadBar.GetOffset()+1 );
-    else if ( rKEvt.GetCharCode() == '-' )
-        aHeadBar.SetOffset( aHeadBar.GetOffset()-1 );
-
-    WorkWindow::KeyInput( rKEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::Paint( const Rectangle& rRect )
-{
-    WorkWindow::Paint( rRect );
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::Resize()
-{
-    Size aWinSize = GetOutputSizePixel();
-
-    aBox.SetSizePixel( Size( aWinSize.Width(), aBoxSize.Height() ) );
-
-    Size aSize = aBar.GetSizePixel();
-    aBar.SetPosSizePixel( Point( 0, aWinSize.Height()-aSize.Height() ),
-                          Size( aWinSize.Width(), aSize.Height() ) );
-
-    Size aBarSize = aSize;
-    Point aPos = aHeadBar.GetPosPixel();
-    aSize = aHeadBar.GetSizePixel();
-    aHeadBar.SetSizePixel( Size( aWinSize.Width(), aSize.Height() ) );
-    aHeadBar.SetDragSize( aWinSize.Height() - aSize.Height() - aPos.Y() - aBarSize.Height() );
-
-    aPos = aPrgsBar.GetPosPixel();
-    aSize = aPrgsBar.GetSizePixel();
-    if ( aPos.X() < aWinSize.Width()-10 )
-        aPrgsBar.SetSizePixel( Size( aWinSize.Width()-aPos.X()-10, aSize.Height() ) );
-}
-
-// -----------------------------------------------------------------------
-
-MyApp aMyApp;
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx
deleted file mode 100644
index 5bd56c4..0000000
--- a/svtools/workben/toolpanel/toolpaneltest.cxx
+++ /dev/null
@@ -1,883 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2009 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org.  If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-
-#include "ctrlbox.hxx"
-#include "svtools/toolpanel/toolpaneldeck.hxx"
-#include "svtools/toolpanel/tablayouter.hxx"
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/bootstrap.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <tools/diagnose_ex.h>
-#include <ucbhelper/contentbroker.hxx>
-#include <vcl/button.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/help.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/tabctrl.hxx>
-#include <vcl/taskpanelist.hxx>
-#include <vcl/wrkwin.hxx>
-#include <sal/macros.h>
-
-namespace svt { namespace toolpanel
-{
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::uno::Any;
-using ::com::sun::star::lang::XMultiServiceFactory;
-using ::com::sun::star::uno::XComponentContext;
-using ::com::sun::star::accessibility::XAccessible;
-
-//=============================================================================
-//= PanelDemo
-//=============================================================================
-class PanelDemo : public Application
-{
-public:
-    virtual int Main();
-
-private:
-    static Reference< XMultiServiceFactory > createApplicationServiceManager();
-};
-
-//=============================================================================
-//= ColoredPanelWindow
-//=============================================================================
-class ColoredPanelWindow : public Window
-{
-public:
-    ColoredPanelWindow( Window& i_rParent, const Color& i_rColor, const String& i_rTitle )
-        :Window( &i_rParent )
-        ,m_aEdit( this, WB_BORDER )
-        ,m_aTabControl( this )
-        ,m_sTitle( i_rTitle )
-    {
-        SetLineColor();
-        SetFillColor( i_rColor );
-
-        m_aEdit.Show();
-        m_aTabControl.Show();
-
-        const sal_Char* pTabTitles[] =
-        {
-            "This", "is a", "Tab", "Control", "intended", "for", "comparison"
-        };
-        for ( size_t i=0; i < SAL_N_ELEMENTS( pTabTitles ); ++i )
-        {
-            String sText( String::CreateFromAscii( pTabTitles[i] ) );
-            m_aTabControl.InsertPage( i + 1, sText );
-        }
-    }
-
-    virtual void Paint( const Rectangle& /*i_rRect*/ )
-    {
-        const Size aOutputSize( GetOutputSizePixel() );
-        const Rectangle aTitleRect( Point( 10, 10 ), Size( aOutputSize.Width() - 20, 20 ) );
-        DrawRect( aTitleRect );
-        SetTextColor( GetFillColor().IsDark() ? COL_WHITE : COL_BLACK );
-        DrawText( aTitleRect, m_sTitle, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER );
-    }
-
-    virtual void GetFocus()
-    {
-        m_aEdit.GrabFocus();
-    }
-
-    virtual void Resize()
-    {
-        const Size aOutputSize( GetOutputSizePixel() );
-        m_aEdit.SetPosSizePixel(
-            Point( 20, 40 ),
-            Size( aOutputSize.Width() - 40, 20 )
-        );
-        m_aTabControl.SetPosSizePixel(
-            Point( 20, 70 ),
-            Size( aOutputSize.Width() - 40, 150 )
-        );
-    }
-
-private:
-    Edit        m_aEdit;
-    TabControl  m_aTabControl;
-    String      m_sTitle;
-};
-
-//=============================================================================
-//= ColoredPanel
-//=============================================================================
-class ColoredPanel : public IToolPanel
-{
-public:
-    ColoredPanel( Window& i_rParent, const Color& i_rColor, const sal_Char* i_pAsciiPanelName );
-    ColoredPanel( Window& i_rParent, const Color& i_rColor, const String& i_rPanelName );
-    ~ColoredPanel();
-
-    // IToolPanel
-    virtual ::rtl::OUString GetDisplayName() const;
-    virtual Image GetImage() const;
-    virtual rtl::OString GetHelpID() const;
-    virtual void Activate( Window& i_rParentWindow );
-    virtual void Deactivate();
-    virtual void SetSizePixel( const Size& i_rPanelWindowSize );
-    virtual void GrabFocus();
-    virtual void Dispose();
-    virtual Reference< XAccessible > CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible );
-
-    // IReference
-    virtual oslInterlockedCount SAL_CALL acquire();
-    virtual oslInterlockedCount SAL_CALL release();
-
-private:
-    oslInterlockedCount m_refCount;
-    ::std::auto_ptr< ColoredPanelWindow >
-                        m_pWindow;
-    ::rtl::OUString     m_aPanelName;
-    BitmapEx            m_aPanelIcon;
-};
-
-//=============================================================================
-//= ColoredPanel
-//=============================================================================
-//-----------------------------------------------------------------------------
-ColoredPanel::ColoredPanel( Window& i_rParent, const Color& i_rColor, const sal_Char* i_pAsciiPanelName )
-    :m_refCount(0)
-    ,m_pWindow( new ColoredPanelWindow( i_rParent, i_rColor, ::rtl::OUString::createFromAscii( i_pAsciiPanelName ) ) )
-    ,m_aPanelName( ::rtl::OUString::createFromAscii( i_pAsciiPanelName ) )
-    ,m_aPanelIcon()
-{
-    Bitmap aBitmap( Size( 16, 16 ), 8 );
-    m_aPanelIcon = BitmapEx( aBitmap );
-    m_aPanelIcon.Erase( i_rColor );
-}
-
-//-----------------------------------------------------------------------------
-ColoredPanel::ColoredPanel( Window& i_rParent, const Color& i_rColor, const String& i_rPanelName )
-    :m_refCount(0)
-    ,m_pWindow( new ColoredPanelWindow( i_rParent, i_rColor, i_rPanelName ) )
-    ,m_aPanelName( i_rPanelName )
-    ,m_aPanelIcon()
-{
-    Bitmap aBitmap( Size( 16, 16 ), 8 );
-    m_aPanelIcon = BitmapEx( aBitmap );
-    m_aPanelIcon.Erase( i_rColor );
-}
-
-//-----------------------------------------------------------------------------
-ColoredPanel::~ColoredPanel()
-{
-}
-
-//-----------------------------------------------------------------------------
-oslInterlockedCount SAL_CALL ColoredPanel::acquire()
-{
-    return osl_incrementInterlockedCount( &m_refCount );
-}
-
-//-----------------------------------------------------------------------------
-oslInterlockedCount SAL_CALL ColoredPanel::release()
-{
-    oslInterlockedCount newCount = osl_decrementInterlockedCount( &m_refCount );
-    if ( 0 == newCount )
-        delete this;
-    return newCount;
-}
-
-//-----------------------------------------------------------------------------
-void ColoredPanel::Activate( Window& i_rParentWindow )
-{
-    ENSURE_OR_RETURN_VOID( m_pWindow.get(), "disposed!" );
-    OSL_ENSURE( &i_rParentWindow == m_pWindow->GetParent(), "ColoredPanel::Activate: unexpected new parent window!" );
-        // the documentation of IToolPanel::Activate says it is guaranteed that the parent window is
-        // always the same ...
-    m_pWindow->SetPosSizePixel( Point(), i_rParentWindow.GetSizePixel() );
-    m_pWindow->Show();
-}
-
-//-----------------------------------------------------------------------------
-void ColoredPanel::Deactivate()
-{
-    ENSURE_OR_RETURN_VOID( m_pWindow.get(), "disposed!" );
-    m_pWindow->Hide();
-}
-
-//-----------------------------------------------------------------------------
-void ColoredPanel::SetSizePixel( const Size& i_rPanelWindowSize )
-{
-    ENSURE_OR_RETURN_VOID( m_pWindow.get(), "disposed!" );
-    m_pWindow->SetSizePixel( i_rPanelWindowSize );
-}
-
-//-----------------------------------------------------------------------------
-void ColoredPanel::GrabFocus()
-{
-    ENSURE_OR_RETURN_VOID( m_pWindow.get(), "disposed!" );
-    m_pWindow->GrabFocus();
-}
-
-//-----------------------------------------------------------------------------
-void ColoredPanel::Dispose()
-{
-    ENSURE_OR_RETURN_VOID( m_pWindow.get(), "disposed!" );
-    m_pWindow.reset();
-}
-
-//-----------------------------------------------------------------------------
-Reference< XAccessible > ColoredPanel::CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible )
-{
-    ENSURE_OR_RETURN( m_pWindow.get(), "disposed!", NULL );
-    (void)i_rParentAccessible;
-    return m_pWindow->GetAccessible();
-}
-
-//-----------------------------------------------------------------------------
-::rtl::OUString ColoredPanel::GetDisplayName() const
-{
-    return m_aPanelName;
-}
-
-//-----------------------------------------------------------------------------
-Image ColoredPanel::GetImage() const
-{
-    return Image( m_aPanelIcon );
-}
-
-//-----------------------------------------------------------------------------
-rtl::OString ColoredPanel::GetHelpID() const
-{
-    return rtl::OString();
-}
-
-//=============================================================================
-//= OptionsWindow
-//=============================================================================
-class PanelDemoMainWindow;
-class OptionsWindow :public Window
-                    ,public ::svt::IToolPanelDeckListener
-{
-public:
-    OptionsWindow( PanelDemoMainWindow& i_rParent );
-    ~OptionsWindow();
-
-    // Window overridables
-    virtual void    Resize();
-    virtual void    GetFocus();
-    virtual void    StateChanged( StateChangedType i_nStateChange );
-
-    // IToolPanelDeckListener
-    virtual void PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition );
-    virtual void PanelRemoved( const size_t i_nPosition );
-    virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive );
-    virtual void LayouterChanged( const PDeckLayouter& i_rNewLayouter );
-    virtual void Dying();
-
-private:
-    DECL_LINK( OnRadioToggled, RadioButton* );
-    DECL_LINK( OnListEntrySelected, ListBox* );
-    DECL_LINK( OnListEntryDoubleClicked, ListBox* );
-    DECL_LINK( OnButtonClicked, PushButton* );
-    DECL_LINK( OnEditModified, Edit* );
-
-    void    impl_initPanelList();
-    void    impl_updateRemoveButton();
-    void    impl_updateInsertButton();
-
-private:
-    FixedLine       m_aAlignmentHeader;
-    RadioButton     m_aAlignLeft;
-    RadioButton     m_aAlignRight;
-    RadioButton     m_aAlignTop;
-    RadioButton     m_aAlignBottom;
-    FixedLine       m_aTabItemContent;
-    RadioButton     m_aImagesAndText;
-    RadioButton     m_aImagesOnly;
-    RadioButton     m_aTextOnly;
-    RadioButton     m_aAutomaticContent;
-
-    FixedLine       m_aPanelsHeader;
-    ListBox         m_aPanelList;
-    PushButton      m_aRemovePanel;
-    ColorListBox    m_aColors;
-    Edit            m_aNewPanelName;
-    PushButton      m_aInsertPanel;
-};
-
-//=============================================================================
-//= PanelDemoMainWindow
-//=============================================================================
-class PanelDemoMainWindow : public WorkWindow
-{
-public:
-                    PanelDemoMainWindow();
-                    ~PanelDemoMainWindow();
-
-    // window overridables
-    virtual void    Resize();
-
-public:
-    // operations
-    void AlignTabs( const ::svt::TabAlignment i_eAlignment );
-    void SetTabItemContent( const TabItemContent i_eItemContent );
-
-    // member access
-    IToolPanelDeck& GetToolPanelDeck();
-    PToolPanel      CreateToolPanel( const Color& i_rColor, const String& i_rPanelName );
-
-protected:
-    virtual void    GetFocus();
-
-private:
-    ToolPanelDeck   m_aToolPanelDeck;
-    OptionsWindow   m_aDemoOptions;
-};
-
-//=============================================================================
-//= PanelDemoMainWindow - implementation
-//=============================================================================
-//-----------------------------------------------------------------------------
-OptionsWindow::OptionsWindow( PanelDemoMainWindow& i_rParent )
-    :Window( &i_rParent, WB_BORDER | WB_DIALOGCONTROL )
-    ,m_aAlignmentHeader( this )
-    ,m_aAlignLeft( this, WB_GROUP )
-    ,m_aAlignRight( this, 0 )
-    ,m_aAlignTop( this, 0 )
-    ,m_aAlignBottom( this, 0 )
-    ,m_aTabItemContent( this )
-    ,m_aImagesAndText( this )
-    ,m_aImagesOnly( this )
-    ,m_aTextOnly( this )
-    ,m_aAutomaticContent( this )
-    ,m_aPanelsHeader( this )
-    ,m_aPanelList( this )
-    ,m_aRemovePanel( this )
-    ,m_aColors( this, WB_DROPDOWN )
-    ,m_aNewPanelName( this, WB_BORDER )
-    ,m_aInsertPanel( this )
-{
-    SetBorderStyle( WINDOW_BORDER_MONO );
-
-    m_aColors.InsertEntry( Color( COL_BLACK ),         String( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
-    m_aColors.InsertEntry( Color( COL_BLUE ),          String( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
-    m_aColors.InsertEntry( Color( COL_GREEN ),         String( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
-    m_aColors.InsertEntry( Color( COL_CYAN ),          String( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
-    m_aColors.InsertEntry( Color( COL_RED ),           String( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
-    m_aColors.InsertEntry( Color( COL_MAGENTA ),       String( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
-    m_aColors.InsertEntry( Color( COL_BROWN ),         String( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
-    m_aColors.InsertEntry( Color( COL_GRAY ),          String( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
-    m_aColors.InsertEntry( Color( COL_LIGHTGRAY ),     String( RTL_CONSTASCII_USTRINGPARAM( "Light Gray" ) ) );
-    m_aColors.InsertEntry( Color( COL_LIGHTBLUE ),     String( RTL_CONSTASCII_USTRINGPARAM( "Light Blue" ) ) );
-    m_aColors.InsertEntry( Color( COL_LIGHTGREEN ),    String( RTL_CONSTASCII_USTRINGPARAM( "Light Green" ) ) );
-    m_aColors.InsertEntry( Color( COL_LIGHTCYAN ),     String( RTL_CONSTASCII_USTRINGPARAM( "Light Cyan" ) ) );
-    m_aColors.InsertEntry( Color( COL_LIGHTRED ),      String( RTL_CONSTASCII_USTRINGPARAM( "Light Red" ) ) );
-    m_aColors.InsertEntry( Color( COL_LIGHTMAGENTA ),  String( RTL_CONSTASCII_USTRINGPARAM( "Light Magenta" ) ) );
-    m_aColors.InsertEntry( Color( COL_YELLOW ),        String( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
-    m_aColors.InsertEntry( Color( COL_WHITE ),         String( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
-    m_aColors.SetDropDownLineCount( 16 );
-
-    Window* pControls[] =
-    {
-        &m_aAlignmentHeader, &m_aAlignLeft, &m_aAlignRight, &m_aAlignTop, &m_aAlignBottom, &m_aTabItemContent,
-        &m_aImagesAndText, &m_aImagesOnly, &m_aTextOnly, &m_aAutomaticContent, &m_aPanelsHeader, &m_aPanelList,
-        &m_aRemovePanel, &m_aColors, &m_aNewPanelName, &m_aInsertPanel
-    };
-    const sal_Char* pTexts[] =
-    {
-        "Tab Bar Alignment", "Left", "Right", "Top", "Bottom", "Tab Items", "Images and Text", "Images only",
-        "Text only", "Automatic", "Panels", "", "Remove Panel", "", "", "Insert Panel"
-    };
-    for ( size_t i=0; i < SAL_N_ELEMENTS( pControls ); ++i )
-    {
-        const WindowType eWindowType = pControls[i]->GetType();
-
-        pControls[i]->SetText( String::CreateFromAscii( pTexts[i] ) );
-        pControls[i]->Show();
-
-        if ( eWindowType == WINDOW_RADIOBUTTON )
-            static_cast< RadioButton* >( pControls[i] )->SetToggleHdl( LINK( this, OptionsWindow, OnRadioToggled ) );
-
-        if  ( eWindowType == WINDOW_LISTBOX )
-        {
-            static_cast< ListBox* >( pControls[i] )->SetSelectHdl( LINK( this, OptionsWindow, OnListEntrySelected ) );
-            static_cast< ListBox* >( pControls[i] )->SetDoubleClickHdl( LINK( this, OptionsWindow, OnListEntryDoubleClicked ) );
-        }
-
-        if ( eWindowType == WINDOW_PUSHBUTTON )
-        {
-            static_cast< PushButton* >( pControls[i] )->SetClickHdl( LINK( this, OptionsWindow, OnButtonClicked ) );
-        }
-
-        if ( eWindowType == WINDOW_EDIT )
-        {
-            static_cast< Edit* >( pControls[i] )->SetModifyHdl( LINK( this, OptionsWindow, OnEditModified ) );
-        }
-    }
-
-    m_aAlignRight.Check();
-    m_aImagesAndText.Check();
-
-    Show();
-}
-
-//-----------------------------------------------------------------------------
-OptionsWindow::~OptionsWindow()
-{
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::impl_updateInsertButton()
-{
-    m_aInsertPanel.Enable( ( m_aColors.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) && ( m_aNewPanelName.GetText().Len() > 0 ) );
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::impl_updateRemoveButton()
-{
-    m_aRemovePanel.Enable( m_aPanelList.GetSelectEntryCount() > 0 );
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::impl_initPanelList()
-{
-    m_aPanelList.Clear();
-
-    PanelDemoMainWindow& rController( dynamic_cast< PanelDemoMainWindow& >( *GetParent() ) );
-    IToolPanelDeck& rPanelDeck( rController.GetToolPanelDeck() );
-
-    for ( size_t i=0; i<rPanelDeck.GetPanelCount(); ++i )
-    {
-        PToolPanel pPanel = rPanelDeck.GetPanel( i );
-        m_aPanelList.InsertEntry( pPanel->GetDisplayName(), pPanel->GetImage() );
-    }
-    ActivePanelChanged( ::boost::optional< size_t >(), rPanelDeck.GetActivePanel() );
-
-    impl_updateRemoveButton();
-    impl_updateInsertButton();
-
-    rPanelDeck.AddListener( *this );
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::StateChanged( StateChangedType i_nStateChange )
-{
-    Window::StateChanged( i_nStateChange );
-
-    if ( i_nStateChange == STATE_CHANGE_INITSHOW )
-    {
-        impl_initPanelList();
-    }
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::GetFocus()
-{
-    Window::GetFocus();
-    RadioButton* pRadios[] =
-    {
-        &m_aAlignLeft, &m_aAlignRight, &m_aAlignTop, &m_aAlignBottom
-    };
-    for ( size_t i=0; i < SAL_N_ELEMENTS( pRadios ); ++i )
-    {
-        if ( pRadios[i]->IsChecked() )
-        {
-            pRadios[i]->GrabFocus();
-            break;
-        }
-    }
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::Resize()
-{
-    Window::Resize();
-
-    const Size aOutputSize( GetOutputSizePixel() );
-
-    const Size aSpacing( LogicToPixel( Size( 3, 3 ), MAP_APPFONT ) );
-    const long nIndent( LogicToPixel( Size( 6, 9 ), MAP_APPFONT ).Width() );
-    const long nFixedLineHeight( LogicToPixel( Size( 0, 8 ), MAP_APPFONT ).Height() );
-    const long nEditLineHeight( LogicToPixel( Size( 0, 12 ), MAP_APPFONT ).Height() );
-    const long nButtonLineHeight( LogicToPixel( Size( 0, 14 ), MAP_APPFONT ).Height() );
-
-    const long nSuperordinateWidth = aOutputSize.Width() - 2 * aSpacing.Width();
-    const long nSuperordinateX = aSpacing.Width();
-
-    const long nSubordinateWidth = aOutputSize.Width() - 2 * aSpacing.Width() - nIndent;
-    const long nSubordinateX = aSpacing.Width() + nIndent;
-
-    Point aItemPos( nSuperordinateX, aSpacing.Height() );
-
-    struct ControlRow
-    {
-        Window* pWindow;
-        bool    bSubordinate;
-        size_t  nRows;
-
-        ControlRow( Window& i_rWindow, const bool i_bSubordinate, const size_t i_nRows = 1 )
-            :pWindow( &i_rWindow )
-            ,bSubordinate( i_bSubordinate )
-            ,nRows( i_nRows )
-        {
-        }
-    };
-    ControlRow aControlRows[] =
-    {
-        ControlRow( m_aAlignmentHeader,     false ),
-        ControlRow( m_aAlignLeft,           true ),
-        ControlRow( m_aAlignRight,          true ),
-        ControlRow( m_aAlignTop,            true ),
-        ControlRow( m_aAlignBottom,         true ),
-        ControlRow( m_aTabItemContent,      false ),
-        ControlRow( m_aImagesAndText,       true ),
-        ControlRow( m_aImagesOnly,          true ),
-        ControlRow( m_aTextOnly,            true ),
-        ControlRow( m_aAutomaticContent,    true ),
-        ControlRow( m_aPanelsHeader,        false ),
-        ControlRow( m_aPanelList,           true, 6 ),
-        ControlRow( m_aRemovePanel,         true ),
-        ControlRow( m_aColors,              true ),
-        ControlRow( m_aNewPanelName,        true ),
-        ControlRow( m_aInsertPanel,         true )
-    };
-    bool bPreviousWasSubordinate = false;
-    for ( size_t i=0; i < SAL_N_ELEMENTS( aControlRows ); ++i )
-    {
-        aItemPos.X() = ( aControlRows[i].bSubordinate ) ? nSubordinateX : nSuperordinateX;
-
-        if ( bPreviousWasSubordinate && !aControlRows[i].bSubordinate )
-            aItemPos.Y() += aSpacing.Height();
-        bPreviousWasSubordinate = aControlRows[i].bSubordinate;
-
-        // height depends on the window type
-        const WindowType eWindowType = aControlRows[i].pWindow->GetType();
-        long nControlHeight( nFixedLineHeight );
-        if  (   ( eWindowType == WINDOW_EDIT )
-            ||  ( eWindowType == WINDOW_LISTBOX )
-            )
-        {
-            nControlHeight = nEditLineHeight;
-        }
-        else
-        if  (   ( eWindowType == WINDOW_PUSHBUTTON )
-            )
-        {
-            nControlHeight = nButtonLineHeight;
-        }
-
-        Size aControlSize(
-            aControlRows[i].bSubordinate ? nSubordinateWidth : nSuperordinateWidth,
-            nControlHeight * aControlRows[i].nRows
-        );
-        aControlRows[i].pWindow->SetPosSizePixel( aItemPos, aControlSize );
-
-        aItemPos.Move( 0, aControlSize.Height() + aSpacing.Height() );
-    }
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition )
-{
-    m_aPanelList.InsertEntry( i_pPanel->GetDisplayName(), i_pPanel->GetImage(), sal_uInt16( i_nPosition ) );
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::PanelRemoved( const size_t i_nPosition )
-{
-    m_aPanelList.RemoveEntry( sal_uInt16( i_nPosition ) );
-    impl_updateRemoveButton();
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive )
-{
-    (void)i_rOldActive;
-
-    if ( !i_rNewActive )
-        m_aPanelList.SetNoSelection();
-    else
-        m_aPanelList.SelectEntryPos( sal_uInt16( *i_rNewActive ) );
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::LayouterChanged( const PDeckLayouter& i_rNewLayouter )
-{
-    (void)i_rNewLayouter;
-    // not interested in
-}
-
-//-----------------------------------------------------------------------------
-void OptionsWindow::Dying()
-{
-    // not interested in
-}
-
-//-----------------------------------------------------------------------------
-IMPL_LINK( OptionsWindow, OnListEntrySelected, ListBox*, i_pListBox )
-{
-    if ( i_pListBox == &m_aColors )
-    {
-        m_aNewPanelName.SetText( m_aColors.GetEntry( m_aColors.GetSelectEntryPos()  ) );
-        impl_updateInsertButton();
-    }
-    else if ( i_pListBox == &m_aPanelList )
-    {
-        impl_updateRemoveButton();
-    }
-    return 0L;
-}
-
-//-----------------------------------------------------------------------------
-IMPL_LINK( OptionsWindow, OnListEntryDoubleClicked, ListBox*, i_pListBox )
-{
-    PanelDemoMainWindow& rController( dynamic_cast< PanelDemoMainWindow& >( *GetParent() ) );
-
-    if ( i_pListBox == &m_aPanelList )
-    {
-        size_t nActivatePanel = size_t( m_aPanelList.GetSelectEntryPos() );
-        rController.GetToolPanelDeck().ActivatePanel( nActivatePanel );
-    }
-
-    return 0L;
-}
-
-//-----------------------------------------------------------------------------
-IMPL_LINK( OptionsWindow, OnEditModified, Edit*, i_pEdit )
-{
-    if ( i_pEdit && &m_aNewPanelName )
-    {
-        impl_updateInsertButton();
-    }
-

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list