[Libreoffice-commits] .: Branch 'integration/dev300_m101' - svl/inc svl/prj svl/source svtools/inc svtools/Library_svt.mk svtools/prj svtools/source toolkit/inc toolkit/source tools/Library_tl.mk tools/prj tools/source vcl/prj vcl/unx

Michael Meeks mmeeks at kemper.freedesktop.org
Fri Mar 11 10:09:29 PST 2011


 svl/inc/svl/zforlist.hxx                                   |    4 
 svl/prj/build.lst                                          |    2 
 svl/source/memtools/svarray.cxx                            |    1 
 svl/source/numbers/zforlist.cxx                            |    4 
 svl/source/numbers/zformat.cxx                             |   18 
 svtools/Library_svt.mk                                     |    2 
 svtools/inc/svtools/accessibletableprovider.hxx            |    2 
 svtools/inc/svtools/borderhelper.hxx                       |   49 
 svtools/inc/svtools/ctrlbox.hxx                            |   11 
 svtools/prj/build.lst                                      |    2 
 svtools/source/contnr/ivctrl.cxx                           |    2 
 svtools/source/contnr/svtabbx.cxx                          |    2 
 svtools/source/contnr/svtreebx.cxx                         |    2 
 svtools/source/control/ctrlbox.cxx                         |   24 
 svtools/source/control/ruler.cxx                           |    2 
 svtools/source/control/tabbar.cxx                          |   23 
 svtools/source/control/valueacc.cxx                        |    2 
 svtools/source/dialogs/filedlg2.cxx                        |    2 
 svtools/source/edit/texteng.cxx                            |    2 
 svtools/source/filter.vcl/filter/sgfbram.cxx               |    2 
 svtools/source/filter.vcl/wmf/enhwmf.cxx                   |   42 
 svtools/source/filter.vcl/wmf/winmtf.cxx                   |   10 
 svtools/source/filter.vcl/wmf/winmtf.hxx                   |    6 
 svtools/source/hatchwindow/hatchwindow.cxx                 |    4 
 svtools/source/hatchwindow/hatchwindowfactory.cxx          |    2 
 svtools/source/misc/imagemgr.cxx                           |   74 
 svtools/source/table/tablecontrol.cxx                      |    2 
 svtools/source/uno/svtxgridcontrol.cxx                     |   27 
 svtools/source/uno/unocontroltablemodel.cxx                |    3 
 svtools/source/uno/unogridcolumnfacade.cxx                 |    6 
 toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx |    1 
 toolkit/inc/toolkit/controls/dialogcontrol.hxx             |  235 -
 toolkit/inc/toolkit/controls/unocontrols.hxx               |   12 
 toolkit/source/awt/animatedimagespeer.cxx                  |   21 
 toolkit/source/awt/vclxtabpagecontainer.cxx                |   13 
 toolkit/source/awt/xsimpleanimation.cxx                    |    6 
 toolkit/source/awt/xthrobber.cxx                           |    4 
 toolkit/source/controls/controlmodelcontainerbase.cxx      |   59 
 toolkit/source/controls/dialogcontrol.cxx                  | 2315 -------------
 toolkit/source/controls/unocontrols.cxx                    |    9 
 toolkit/source/helper/registerservices.cxx                 |   13 
 tools/Library_tl.mk                                        |    1 
 tools/prj/build.lst                                        |    1 
 tools/source/string/reversemap.hxx                         |  943 +++++
 vcl/prj/build.lst                                          |    2 
 vcl/unx/gtk/a11y/makefile.mk                               |    4 
 vcl/unx/inc/kde_headers.h                                  |   98 
 vcl/unx/kde/kdedata.cxx                                    |    2 
 vcl/unx/kde/salnativewidgets-kde.cxx                       |    2 
 49 files changed, 1330 insertions(+), 2745 deletions(-)

New commits:
commit 12fe68a979649987aa7f104b0ac8755299e10bb3
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Mar 11 18:04:44 2011 +0000

    fix up merging issues, so it compiles

diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 437021d..a842cb8 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -425,7 +425,7 @@ public:
     /** Same as <method>PutEntry</method> but the format code string is
          considered to be of language/country eLnge and is converted to
         language/country eNewLnge */
-    sal_Bool PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
+    bool PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
                              short& nType, sal_uInt32& nKey,
                              LanguageType eLnge, LanguageType eNewLnge );
 
@@ -433,7 +433,7 @@ public:
          is considered to be of the System language/country eLnge and is
         converted to another System language/country eNewLnge. In this case
          the automatic currency is converted too. */
-    sal_Bool PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
+    bool PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
                              short& nType, sal_uInt32& nKey,
                              LanguageType eLnge, LanguageType eNewLnge );
 
diff --git a/svl/prj/build.lst b/svl/prj/build.lst
index c47d112..1b88fab 100644
--- a/svl/prj/build.lst
+++ b/svl/prj/build.lst
@@ -1,3 +1,3 @@
 sl	svl	:	L10N:l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot  LIBXSLT:libxslt NULL
 sl	svl\prj	nmake	-	all	svl_prj NULL
-sl	svl\qa\unit	nmake	-	all	svl_qa_cppunit svl_util NULL
+# sl	svl\qa\unit	nmake	-	all	svl_qa_cppunit svl_util NULL
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index d1628c9..574e7fa 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -67,6 +67,7 @@ sal_uInt16 SvPtrarr::GetPos( const VoidPtr& aElement ) const
 }
 
 SV_IMPL_VARARR( SvULongs, sal_uLong )
+SV_IMPL_VARARR( SvUShorts, sal_uInt16 )
 SV_IMPL_VARARR( SvLongs, long)
 
 SV_IMPL_VARARR_SORT( SvULongsSort, sal_uLong )
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 04e05ce..20a7448 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -573,7 +573,7 @@ bool SvNumberFormatter::PutandConvertEntry(String& rString,
 }
 
 
-sal_Bool SvNumberFormatter::PutandConvertEntrySystem(String& rString,
+bool SvNumberFormatter::PutandConvertEntrySystem(String& rString,
                                            xub_StrLen& nCheckPos,
                                            short& nType,
                                            sal_uInt32& nKey,
@@ -2755,7 +2755,7 @@ void SvNumberFormatter::GenerateFormat(String& sString,
     const String& rThSep = GetNumThousandSep();
 
     SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nIndex);
-    BOOL insertBrackets = pFormat->IsNegativeInBracket();
+    sal_Bool insertBrackets = pFormat->IsNegativeInBracket();
 
     if (nAnzLeading == 0)
     {
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index f4db791..579c494 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2052,9 +2052,9 @@ void lcl_GetOutputStringScientific(
         fNumber, rtl_math_StringFormat_E, nPrec, rFormatter.GetNumDecimalSep().GetChar(0));
 }
 
-sal_Int32 lcl_GetForcedDenominator(ImpSvNumberformatInfo &rInfo, USHORT nAnz)
+sal_Int32 lcl_GetForcedDenominator(ImpSvNumberformatInfo &rInfo, sal_uInt16 nAnz)
 {
-    USHORT i;
+    sal_uInt16 i;
     rtl::OUString aDiv;
     for( i = 0; i < nAnz; i++ )
     {
@@ -2065,11 +2065,11 @@ sal_Int32 lcl_GetForcedDenominator(ImpSvNumberformatInfo &rInfo, USHORT nAnz)
 }
 
 // TODO: More optimizations?
-void lcl_ForcedDenominator(ULONG &nFrac, ULONG &nDiv, ULONG nForcedDiv)
+void lcl_ForcedDenominator(sal_uLong &nFrac, sal_uLong &nDiv, sal_uLong nForcedDiv)
 {
     double fFrac = (double)nFrac / (double)nDiv;
     double fMultiplier = (double)nForcedDiv / (double)nDiv;
-    nFrac = (ULONG)( (double)nFrac * fMultiplier );
+    nFrac = (sal_uLong)( (double)nFrac * fMultiplier );
 
     double fFracNew = (double)nFrac / (double)nForcedDiv;
     double fFracNew1 = (double)(nFrac + 1) / (double)nForcedDiv;
@@ -4114,19 +4114,19 @@ sal_Bool SvNumberformat::IsNegativeWithoutSign() const
     return sal_False;
 }
 
-BOOL SvNumberformat::IsNegativeInBracket() const
+sal_Bool SvNumberformat::IsNegativeInBracket() const
 {
-    USHORT nAnz = NumFor[1].GetCount();
+    sal_uInt16 nAnz = NumFor[1].GetCount();
     if (!nAnz)
-        return FALSE;
+        return sal_False;
 
     String *tmpStr = NumFor[1].Info().sStrArray;
     return (tmpStr[0] == '(' && tmpStr[nAnz-1] == ')' );
 }
 
-BOOL SvNumberformat::HasPositiveBracketPlaceholder() const
+sal_Bool SvNumberformat::HasPositiveBracketPlaceholder() const
 {
-    USHORT nAnz = NumFor[0].GetCount();
+    sal_uInt16 nAnz = NumFor[0].GetCount();
     String *tmpStr = NumFor[0].Info().sStrArray;
     return (tmpStr[nAnz-1].EqualsAscii( "_)" ));
 }
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index ebcdb7a..5a3e3d2 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_Library_add_linked_libs,svt,\
     i18nutil \
     icuuc \
     jvmfwk \
+    salhelper \
     sal \
     sot \
     svl \
@@ -225,6 +226,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
     svtools/source/misc/imap3 \
     svtools/source/misc/itemdel \
     svtools/source/misc/langtab \
+    svtools/source/misc/langhelp \
     svtools/source/misc/stringtransfer \
     svtools/source/misc/svtaccessiblefactory \
     svtools/source/misc/svtdata \
diff --git a/svtools/inc/svtools/accessibletableprovider.hxx b/svtools/inc/svtools/accessibletableprovider.hxx
index a28e088..fdfb684 100644
--- a/svtools/inc/svtools/accessibletableprovider.hxx
+++ b/svtools/inc/svtools/accessibletableprovider.hxx
@@ -88,7 +88,7 @@ public:
     virtual sal_Bool				HasRowHeader() const = 0; //GetColumnId
     /** @return  <TRUE/>, if the object can focus a cell. */
     virtual sal_Bool				IsCellFocusable() const = 0;
-    virtual BOOL                    GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0;
+    virtual sal_Bool                GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0;
 
     virtual void					SetNoSelection() = 0;
     virtual void					SelectAll() = 0;
diff --git a/svtools/inc/svtools/borderhelper.hxx b/svtools/inc/svtools/borderhelper.hxx
new file mode 100644
index 0000000..18bad89
--- /dev/null
+++ b/svtools/inc/svtools/borderhelper.hxx
@@ -0,0 +1,49 @@
+/* -*- 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 2008 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.
+ *
+ ************************************************************************/
+
+#ifndef _BORDERHELPER_HXX
+#define _BORDERHELPER_HXX
+
+#include "svtools/svtdllapi.h"
+
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <vcl/outdev.hxx>
+
+namespace svtools
+{
+    SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon,
+            sal_uInt16 nDashing, MapUnit eUnit );
+
+    SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const Point& rBeg,
+            const Point& rEnd, sal_uInt32 nWidth, sal_uInt16 nDashing );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 6169483..b321e7f 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -47,9 +47,9 @@ typedef ::std::vector< ImplColorListData*    > ImpColorList;
 typedef ::std::vector< ImpLineListData*      > ImpLineList;
 typedef ::std::vector< ImplFontNameListData* > ImplFontList;
 
-#define STYLE_SOLID     ( ( USHORT ) 0 )
-#define STYLE_DOTTED    ( ( USHORT ) 1 )
-#define STYLE_DASHED    ( ( USHORT ) 2 )
+#define STYLE_SOLID     ( ( sal_uInt16 ) 0 )
+#define STYLE_DOTTED    ( ( sal_uInt16 ) 1 )
+#define STYLE_DASHED    ( ( sal_uInt16 ) 2 )
 
 /*************************************************************************
 
@@ -253,7 +253,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
     FieldUnit		eSourceUnit;
 
     SVT_DLLPRIVATE void			ImpGetLine( long nLine1, long nLine2, long nDistance,
-                                    USHORT nStyle, Bitmap& rBmp, XubString& rStr );
+                                    sal_uInt16 nStyle, Bitmap& rBmp, XubString& rStr );
     using Window::ImplInit;
     SVT_DLLPRIVATE void			ImplInit();
     void			UpdateLineColors( void );
@@ -277,9 +277,10 @@ public:
     using ListBox::GetEntryPos;
     sal_uInt16			GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0,
                                  sal_uInt16 nStyle = STYLE_SOLID ) const;
+    long			GetEntryLine1( sal_uInt16 nPos ) const;
     long			GetEntryLine2( sal_uInt16 nPos ) const;
     long			GetEntryDistance( sal_uInt16 nPos ) const;
-    USHORT          GetEntryStyle( USHORT nPos ) const;
+    sal_uInt16          GetEntryStyle( sal_uInt16 nPos ) const;
 
     inline void		SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
     void			SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0,
diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst
index ff9aa6a..33ac3d4 100644
--- a/svtools/prj/build.lst
+++ b/svtools/prj/build.lst
@@ -1,2 +1,2 @@
-st	svtools	:	L10N:l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL
+st	svtools	:	L10N:l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal salhelper sot jvmfwk LIBXSLT:libxslt NULL
 st	svtools\prj					        nmake	-	all	st_prj NULL
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 572268a..a0ac823 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -156,7 +156,7 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, con
 
 sal_Bool SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, sal_Bool )
 {
-    return TRUE;
+    return sal_True;
 }
 
 sal_Bool SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 7a65df1..9d08309 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -838,7 +838,7 @@ sal_Bool SvHeaderTabListBox::IsCellFocusable() const
     return IsCellFocusEnabled();
 }
 // -----------------------------------------------------------------------
-BOOL SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
+sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
 {
     sal_Bool bRet = ( IsCellFocusEnabled() == sal_True );
     if ( bRet )
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 9e9d81c..fd15384 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -397,7 +397,7 @@ IMPL_LINK_INLINE_END( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData
 SvLBoxEntry* SvTreeListBox::InsertEntry(
     const XubString& aText,
     SvLBoxEntry* pParent,
-    BOOL bChildsOnDemand, ULONG nPos,
+    sal_Bool bChildsOnDemand, sal_uLong nPos,
     void* pUser,
     SvLBoxButtonKind eButtonKind
 )
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 0683b8c..4da9b86 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -41,7 +41,7 @@
 #include <svtools/svtools.hrc>
 #include <svtools/ctrlbox.hxx>
 #include <svtools/ctrltool.hxx>
-#include <borderhelper.hxx>
+#include <svtools/borderhelper.hxx>
 
 #include <vcl/i18nhelp.hxx>
 #include <vcl/fontcapabilities.hxx>
@@ -288,7 +288,7 @@ struct ImpLineListData
     long    nLine1;
     long    nLine2;
     long    nDistance;
-    USHORT  nStyle;
+    sal_uInt16  nStyle;
 };
 
 // -----------------------------------------------------------------------
@@ -301,9 +301,9 @@ inline const Color& LineListBox::GetPaintColor( void ) const
 // -----------------------------------------------------------------------
 
 
-inline void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, USHORT nDashing )
+inline void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, sal_uInt16 nDashing )
 {
-    USHORT nOldAA = rDev.GetAntialiasing();
+    sal_uInt16 nOldAA = rDev.GetAntialiasing();
     rDev.SetAntialiasing( nOldAA & !ANTIALIASING_ENABLE_B2DDRAW );
 
     Color aOldColor = rDev.GetFillColor( );
@@ -337,7 +337,7 @@ inline void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPoly
 
 namespace svtools
 {
-    basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, USHORT nDashing, MapUnit eUnit )
+    basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, MapUnit eUnit )
     {
         ::std::vector < double >aPattern;
         switch ( nDashing )
@@ -390,7 +390,7 @@ namespace svtools
     }
 
     void DrawLine( OutputDevice& rDev, const Point& rP1, const Point& rP2,
-        sal_uInt32 nWidth, USHORT nDashing )
+        sal_uInt32 nWidth, sal_uInt16 nDashing )
     {
         basegfx::B2DPolygon aPolygon;
         aPolygon.append( basegfx::B2DPoint( rP1.X(), rP1.Y() ) );
@@ -400,7 +400,7 @@ namespace svtools
 }
 
 void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
-                            USHORT nStyle, Bitmap& rBmp, XubString& rStr )
+                            sal_uInt16 nStyle, Bitmap& rBmp, XubString& rStr )
 {
     Size aSize = GetOutputSizePixel();
     aSize.Width() -= 20;
@@ -613,7 +613,7 @@ void LineListBox::Clear()
 // -----------------------------------------------------------------------
 
 sal_uInt16 LineListBox::GetEntryPos( long nLine1, long nLine2,
-                                long nDistance, USHORT nStyle ) const
+                                long nDistance, sal_uInt16 nStyle ) const
 {
     for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
         ImpLineListData* pData = (*pLineList)[ i ];
@@ -624,7 +624,7 @@ sal_uInt16 LineListBox::GetEntryPos( long nLine1, long nLine2,
                && (pData->nDistance == nDistance)
                && (pData->nStyle    == nStyle)
             ) {
-                return (USHORT)i;
+                return (sal_uInt16)i;
             }
         }
     }
@@ -649,7 +649,7 @@ long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const
 
 // -----------------------------------------------------------------------
 
-long LineListBox::GetEntryDistance( USHORT nPos ) const
+long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const
 {
     ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
     return ( pData ) ? pData->nDistance : 0;
@@ -657,7 +657,7 @@ long LineListBox::GetEntryDistance( USHORT nPos ) const
 
 // -----------------------------------------------------------------------
 
-USHORT LineListBox::GetEntryStyle( USHORT nPos ) const
+sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
 {
     ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
     return ( pData ) ? pData->nStyle : STYLE_SOLID;
@@ -679,7 +679,7 @@ void LineListBox::UpdateLineColors( void )
         // exchange entries which containing lines
         SetUpdateMode( sal_False );
 
-        USHORT nSelEntry = GetSelectEntryPos();
+        sal_uInt16 nSelEntry = GetSelectEntryPos();
         for( size_t n = 0 ; n < nCount ; ++n )
         {
             ImpLineListData* pData = (*pLineList)[ n ];
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index df39d8f..a457f06 100755
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -3235,7 +3235,7 @@ const RulerIndent*  Ruler::GetIndents() const { return mpData->pIndents; }
  * ---------------------------------------------------*/
 void Ruler::DrawTicks()
 {
-    mbFormat = TRUE;
+    mbFormat = sal_True;
     ImplDraw();
 }
 
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index b969483..9b61f88 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -38,9 +38,11 @@
 #include <vcl/decoview.hxx>
 #include <vcl/button.hxx>
 #include <vcl/edit.hxx>
+#include <vcl/image.hxx>
 #include "svtaccessiblefactory.hxx"
 #include <filectrl.hrc>
 #include <svtools/svtdata.hxx>
+#include <svtools/svtools.hrc>
 #include <limits>
 
 // =======================================================================
@@ -371,7 +373,7 @@ struct TabBar_Impl
 
 const sal_uInt16 TabBar::APPEND         = ::std::numeric_limits<sal_uInt16>::max();
 const sal_uInt16 TabBar::PAGE_NOT_FOUND = ::std::numeric_limits<sal_uInt16>::max();
-const sal_uInt16 TabBar::INSERT_TAB_POS = ::std::numeric_limits<USHORT>::max() - 1;
+const sal_uInt16 TabBar::INSERT_TAB_POS = ::std::numeric_limits<sal_uInt16>::max() - 1;
 
 void TabBar::ImplInit( WinBits nWinStyle )
 {
@@ -1249,7 +1251,8 @@ public:
 
     void drawPlusImage()
     {
-        Image aPlusImg( SvtResId(BMP_LIST_ADD) );
+        SvtResId id( BMP_LIST_ADD );
+        Image aPlusImg( id );
         // Center the image within the bounding rectangle.
         Size aSize = aPlusImg.GetSizePixel();
         Point pt = maRect.TopLeft();
@@ -1330,7 +1333,7 @@ private:
 void TabBar::Paint( const Rectangle& )
 {
     // Items berechnen und ausgeben
-    USHORT nItemCount = (USHORT)mpItemList->size();
+    sal_uInt16 nItemCount = (sal_uInt16)mpItemList->size();
     if (!nItemCount)
         return;
 
@@ -1700,7 +1703,7 @@ long TabBar::ImplDeactivatePage()
 
 void TabBar::ImplPrePaint()
 {
-    USHORT nItemCount = (USHORT)mpItemList->size();
+    sal_uInt16 nItemCount = (sal_uInt16)mpItemList->size();
     if (!nItemCount)
         return;
 
@@ -1713,7 +1716,7 @@ void TabBar::ImplPrePaint()
     // sichtbar wird
     if ( mbFirstFormat )
     {
-        mbFirstFormat = FALSE;
+        mbFirstFormat = sal_False;
 
         if ( mnCurPageId && (mnFirstPos == 0) && !mbDropPos )
         {
@@ -1722,9 +1725,9 @@ void TabBar::ImplPrePaint()
             {
                 // mbDropPos setzen (bzw. misbrauchen) um Invalidate()
                 // zu unterbinden
-                mbDropPos = TRUE;
+                mbDropPos = sal_True;
                 SetFirstPageId( mnCurPageId );
-                mbDropPos = FALSE;
+                mbDropPos = sal_False;
                 if ( mnFirstPos != 0 )
                     ImplFormat();
             }
@@ -1732,10 +1735,10 @@ void TabBar::ImplPrePaint()
     }
 }
 
-ImplTabBarItem* TabBar::ImplGetLastTabBarItem( USHORT nItemCount )
+ImplTabBarItem* TabBar::ImplGetLastTabBarItem( sal_uInt16 nItemCount )
 {
     // letzten sichtbaren Eintrag suchen
-    USHORT n = mnFirstPos+1;
+    sal_uInt16 n = mnFirstPos+1;
     if ( n >= nItemCount )
         n = nItemCount-1;
     ImplTabBarItem* pItem = seek( n );
@@ -2060,7 +2063,7 @@ sal_uInt16 TabBar::GetPagePos( sal_uInt16 nPageId ) const
 {
     for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) {
         if ( (*mpItemList)[ i ]->mnId == nPageId ) {
-            return USHORT( i );
+            return sal_uInt16( i );
         }
     }
     return PAGE_NOT_FOUND;
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 25f3a48..9c32008 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -455,7 +455,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible
     const sal_uInt16                                    nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) );
     uno::Reference< accessibility::XAccessible >    xRet;
 
-    if( ((USHORT)-1) != nItemId )
+    if( ((sal_uInt16)-1) != nItemId )
     {
         const size_t nItemPos = mpParent->GetItemPos( nItemId );
 
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index 1c57868..4e6b1d0 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -1216,7 +1216,7 @@ void ImpFileDialog::SetCurFilter( const UniString& rFilter )
 
     for ( size_t i = 0, n = aFilterList.size(); i < n; ++i ) {
         if ( aFilterList[ i ]->aName == rFilter ) {
-            pTypeList->SelectEntryPos( USHORT( i ) );
+            pTypeList->SelectEntryPos( sal_uInt16( i ) );
             return;
         }
     }
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index 7c3cbe2..5c18d14 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -2098,7 +2098,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
             // Ueber die Zeilen des Absatzes...
             // --------------------------------------------------
             sal_uInt16 nLines = pPortion->GetLines().Count();
-            USHORT nIndex = 0;
+            sal_uInt16 nIndex = 0;
             for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
             {
                 TextLine* pLine = pPortion->GetLines().GetObject(nLine);
diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx
index f5e4724..00b72e3 100644
--- a/svtools/source/filter.vcl/filter/sgfbram.cxx
+++ b/svtools/source/filter.vcl/filter/sgfbram.cxx
@@ -308,7 +308,7 @@ sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntr
             rOut.Write((char*)pBuf,nWdtOut);
         }
     } else if (nColors==16) {
-        BYTE pl2= 0;     // Masken fuer die Planes
+        sal_uInt8 pl2= 0;     // Masken fuer die Planes
 
         rOut<<RGBQuad(0x00,0x00,0x00); // Schwarz
         rOut<<RGBQuad(0x24,0x24,0x24); // Grau 80%
diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx
index 0feeb21..ef141ff 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx
@@ -272,8 +272,8 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
     length -= 4;
 
     while (length > 0) {
-        UINT16 type, flags;
-        UINT32 size, dataSize;
+        sal_uInt16 type, flags;
+        sal_uInt32 size, dataSize;
         sal_uInt32 next;
 
         *pWMF >> type >> flags >> size >> dataSize;
@@ -384,7 +384,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
             EMFP_DEBUG(printf ("\tGDI comment\n\t\tlength: %d\n", length));
 
             if( length >= 4 ) {
-                UINT32 id;
+                sal_uInt32 id;
 
                 *pWMF >> id;
 
@@ -1337,14 +1337,14 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 
             case EMR_CREATEDIBPATTERNBRUSHPT :
             {
-                UINT32	nStart = pWMF->Tell() - 8;
+                sal_uInt32	nStart = pWMF->Tell() - 8;
                 Bitmap aBitmap;
 
                 *pWMF >> nIndex;
 
                 if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
                 {
-                    UINT32 usage, offBmi, cbBmi, offBits, cbBits;
+                    sal_uInt32 usage, offBmi, cbBmi, offBits, cbBits;
 
                     *pWMF >> usage;
                     *pWMF >> offBmi;
@@ -1353,28 +1353,28 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
                     *pWMF >> cbBits;
 
                     if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) )
-                       bStatus = FALSE;
+                       bStatus = sal_False;
                     else if ( offBmi )
                     {
-                        UINT32	nSize = cbBmi + cbBits + 14;
+                        sal_uInt32	nSize = cbBmi + cbBits + 14;
                         if ( nSize <= ( nEndPos - nStartPos ) )
                         {
                             char*	pBuf = new char[ nSize ];
 
                             SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE );
-                            aTmp.ObjectOwnsMemory( TRUE );
-                            aTmp << (BYTE)'B'
-                                 << (BYTE)'M'
-                                 << (UINT32)cbBits
-                                 << (UINT16)0
-                                 << (UINT16)0
-                                 << (UINT32)cbBmi + 14;
+                            aTmp.ObjectOwnsMemory( sal_True );
+                            aTmp << (sal_uInt8)'B'
+                                 << (sal_uInt8)'M'
+                                 << (sal_uInt32)cbBits
+                                 << (sal_uInt16)0
+                                 << (sal_uInt16)0
+                                 << (sal_uInt32)cbBmi + 14;
                             pWMF->Seek( nStart + offBmi );
                             pWMF->Read( pBuf + 14, cbBmi );
                             pWMF->Seek( nStart + offBits );
                             pWMF->Read( pBuf + 14 + cbBmi, cbBits );
                             aTmp.Seek( 0 );
-                            aBitmap.Read( aTmp, TRUE );
+                            aBitmap.Read( aTmp, sal_True );
                         }
                     }
                 }
@@ -1457,13 +1457,13 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 
 sal_Bool EnhWMFReader::ReadHeader()
 {
-    sal_uInt32		nUINT32, nHeaderSize, nPalEntries;
+    sal_uInt32		nsal_uInt32, nHeaderSize, nPalEntries;
     sal_Int32		nLeft, nTop, nRight, nBottom;
 
     // METAFILEHEADER SPARE ICH MIR HIER
     // Einlesen des METAHEADER
-    *pWMF >> nUINT32 >> nHeaderSize;
-    if ( nUINT32 != 1 )			// Typ
+    *pWMF >> nsal_uInt32 >> nHeaderSize;
+    if ( nsal_uInt32 != 1 )			// Typ
         return sal_False;
 
     // bound size
@@ -1482,12 +1482,12 @@ sal_Bool EnhWMFReader::ReadHeader()
     rclFrame.Right() = nRight;
     rclFrame.Bottom() = nBottom;
 
-    *pWMF >> nUINT32;									// signature
+    *pWMF >> nsal_uInt32;									// signature
 
-    if ( nUINT32 != 0x464d4520 )
+    if ( nsal_uInt32 != 0x464d4520 )
         return sal_False;
 
-    *pWMF >> nUINT32;									// nVersion
+    *pWMF >> nsal_uInt32;									// nVersion
     *pWMF >> nEndPos;									// size of metafile
     nEndPos += nStartPos;
 
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index 221bde4..40635d9 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.cxx
@@ -1352,7 +1352,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath )
                     aMemStm << aFill;
 
                     mpGDIMetaFile->AddAction( new MetaCommentAction( "XPATHFILL_SEQ_BEGIN", 0,
-                                                            static_cast<const BYTE*>(aMemStm.GetData()),
+                                                            static_cast<const sal_uInt8*>(aMemStm.GetData()),
                                                             aMemStm.Seek( STREAM_SEEK_TO_END ) ) );
                     mpGDIMetaFile->AddAction( new MetaCommentAction( "XPATHFILL_SEQ_END" ) );
                 }
@@ -2216,14 +2216,14 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
     // rotate and scale operations
     mem << one << zero << zero << one << zero << zero;
 
-    mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const BYTE*) mem.GetData(), mem.GetEndOfData() ) );
-    mpGDIMetaFile->UseCanvas( TRUE );
+    mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const sal_uInt8*) mem.GetData(), mem.GetEndOfData() ) );
+    mpGDIMetaFile->UseCanvas( sal_True );
 }
 
-void WinMtfOutput::PassEMFPlus( void* pBuffer, UINT32 nLength )
+void WinMtfOutput::PassEMFPlus( void* pBuffer, sal_uInt32 nLength )
 {
     EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS comment length %d\n", nLength));
-    mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS", 0, static_cast<const BYTE*>(pBuffer), nLength ) );
+    mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS", 0, static_cast<const sal_uInt8*>(pBuffer), nLength ) );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx
index c4fbd0c..0db1d65 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.hxx
@@ -682,7 +682,7 @@ class WinMtfOutput
         void				UpdateClipRegion();
         void				AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile );
 
-        void                PassEMFPlus( void* pBuffer, UINT32 nLength );
+        void                PassEMFPlus( void* pBuffer, sal_uInt32 nLength );
         void                PassEMFPlusHeaderInfo();
 
                             WinMtfOutput( GDIMetaFile& rGDIMetaFile );
@@ -723,7 +723,7 @@ class EnhWMFReader : public WinMtf
 {
     sal_Bool		bRecordPath;
     sal_Int32		nRecordCount;
-    BOOL            bEMFPlus;
+    sal_Bool        bEMFPlus;
 
 
     sal_Bool			ReadHeader();
@@ -732,7 +732,7 @@ class EnhWMFReader : public WinMtf
 
 public:
                     EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
-                                    : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ), bEMFPlus (FALSE) {};
+                                    : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ), bEMFPlus( sal_False ) {};
                     ~EnhWMFReader();
 
     sal_Bool			ReadEnhWMF();
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index 96849d5..da471fa 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -34,7 +34,7 @@
 #include "ipwin.hxx"
 
 #include <toolkit/helper/convert.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
 
 using namespace ::com::sun::star;
@@ -53,7 +53,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer >
                 const awt::Rectangle& aBounds,
                 const awt::Size& aSize )
 {
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
 
     Window* pParent = NULL;
     VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent );
diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx
index 0292463..d08bb8d 100644
--- a/svtools/source/hatchwindow/hatchwindowfactory.cxx
+++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx
@@ -71,7 +71,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW
     if ( !xParent.is() )
         throw lang::IllegalArgumentException(); // TODO
 
-    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+    SolarMutexGuard aGuard;
     VCLXHatchWindow* pResult = new VCLXHatchWindow();
     pResult->initializeWindow( xParent, aBounds, aHandlerSize );
     return uno::Reference< embed::XHatchWindow >( static_cast< embed::XHatchWindow* >( pResult ) );
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 87e99ba..b5a9c26 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -529,77 +529,6 @@ static sal_uInt16 GetFolderDescriptionId_Impl( const String& rURL )
     return nRet;
 }
 
-/*
-static ResMgr* GetIsoResMgr_Impl()
-{
-    static ResMgr* pIsoResMgr = NULL;
-
-    if ( !pIsoResMgr )
-    {
-        ByteString aResMgrName( "iso" );
-        pIsoResMgr = ResMgr::CreateResMgr(
-            aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-        if ( !pIsoResMgr )
-        {
-            // no "iso" resource -> search for "ooo" resource
-            aResMgrName = ByteString( "ooo" );
-            pIsoResMgr = ResMgr::CreateResMgr(
-                aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-        }
-    }
-
-    return pIsoResMgr;
-}
-
-static ImageList* CreateImageList_Impl( sal_uInt16 nResId )
-{
-    ImageList* pList = NULL;
-    ResMgr* pResMgr = GetIsoResMgr_Impl();
-    DBG_ASSERT( pResMgr, "SvFileInformationManager::CreateImageList_Impl(): no resmgr" );
-    ResId aResId( nResId, *pResMgr );
-    aResId.SetRT( RSC_IMAGELIST );
-    if ( pResMgr->IsAvailable( aResId ) )
-        pList = new ImageList( aResId );
-    else
-        pList = new ImageList();
-    return pList;
-}
-
-static Image GetOfficeImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig )
-{
-    ImageList* pList = NULL;
-
-    static ImageList* _pSmallOfficeImgList = NULL;
-    static ImageList* _pBigOfficeImgList = NULL;
-    static sal_uLong nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
-
-    // If the style has been changed, throw away our cache of the older images
-    if ( nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle() )
-    {
-        delete _pSmallOfficeImgList, _pSmallOfficeImgList = NULL;
-        delete _pBigOfficeImgList, _pBigOfficeImgList = NULL;
-        nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
-    }
-
-    if ( bBig )
-    {
-        if ( !_pBigOfficeImgList )
-            _pBigOfficeImgList = CreateImageList_Impl( RID_SVTOOLS_IMAGELIST_BIG );
-        pList = _pBigOfficeImgList;
-    }
-    else
-    {
-        if ( !_pSmallOfficeImgList )
-            _pSmallOfficeImgList = CreateImageList_Impl( RID_SVTOOLS_IMAGELIST_SMALL );
-        pList = _pSmallOfficeImgList;
-    }
-
-    Image aImage = pList->GetImage( nImageId );
-
-    return aImage;
-}
-*/
-
 static Image GetImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig )
 {
     if ( !bBig && IMG_FOLDER == nImageId )
@@ -636,7 +565,8 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig )
     if ( pList->HasImageAtPos( nImageId ) )
         return pList->GetImage( nImageId );
     else
-        return GetOfficeImageFromList_Impl( nImageId, bBig );
+        return Image();
+//      return GetOfficeImageFromList_Impl( nImageId, bBig );
 }
 
 String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder )
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index d500453..886f481 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -594,7 +594,6 @@ namespace svt { namespace table
     {
         ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_pImpl->getSelectHandler(), this );
     }
-}} // namespace svt::table
 //........................................................................
 
     //------------------------------------------------------------------------------------------------------------------
@@ -608,6 +607,7 @@ namespace svt { namespace table
     {
         return m_pImpl->getSelectHandler();
     }
+}} // namespace svt::table
 
 //......................................................................................................................
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index 4f5a0fc..98d9a7d 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -83,7 +83,7 @@ void SVTXGridControl::SetWindow( Window* pWindow )
 // ---------------------------------------------------------------------------------------------------------------------
 sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getRowAtPoint: no control (anymore)!", -1 );
@@ -95,7 +95,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y)
 // ---------------------------------------------------------------------------------------------------------------------
 sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getColumnAtPoint: no control (anymore)!", -1 );
@@ -107,7 +107,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32
 // ---------------------------------------------------------------------------------------------------------------------
 sal_Int32 SAL_CALL SVTXGridControl::getCurrentColumn(  ) throw (RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentColumn: no control (anymore)!", -1 );
@@ -119,7 +119,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getCurrentColumn(  ) throw (RuntimeException
 // ---------------------------------------------------------------------------------------------------------------------
 sal_Int32 SAL_CALL SVTXGridControl::getCurrentRow(  ) throw (RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentRow: no control (anymore)!", -1 );
@@ -531,7 +531,7 @@ void SAL_CALL//-----------------------------------------------------------------
 //----------------------------------------------------------------------------------------------------------------------
 void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     m_pTableModel->notifyDataChanged( i_event );
 
@@ -596,7 +596,7 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj
 //----------------------------------------------------------------------------------------------------------------------
 void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException)
 {	
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectRow: no control (anymore)!" );
@@ -607,7 +607,7 @@ void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com:
 //----------------------------------------------------------------------------------------------------------------------
 void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectAllRows: no control (anymore)!" );
@@ -618,7 +618,7 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run
 //----------------------------------------------------------------------------------------------------------------------
 void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException)
 {	
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectRow: no control (anymore)!" );
@@ -629,7 +629,7 @@ void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::co
 //----------------------------------------------------------------------------------------------------------------------
 void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectAllRows: no control (anymore)!" );
@@ -640,7 +640,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R
 //----------------------------------------------------------------------------------------------------------------------
 ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", Sequence< sal_Int32 >() );
@@ -655,7 +655,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R
 //----------------------------------------------------------------------------------------------------------------------
 ::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", sal_True );
@@ -666,7 +666,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R
 //----------------------------------------------------------------------------------------------------------------------
 ::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex( ::sal_Int32 index ) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
     ENSURE_OR_RETURN( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!", sal_False );
@@ -686,7 +686,7 @@ void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException)
 //----------------------------------------------------------------------------------------------------------------------
 void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
 {
-    ::vos::OGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this );
     switch ( rVclWindowEvent.GetId() )
@@ -781,4 +781,4 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow()
     }
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx
index e0baa86..b7fac36 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/svtools/source/uno/unocontroltablemodel.cxx
@@ -47,7 +47,7 @@
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
 
 // .....................................................................................................................
 namespace svt { namespace table
@@ -892,4 +892,4 @@ namespace svt { namespace table
 // .....................................................................................................................
 } } // svt::table
 // .....................................................................................................................
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx
index d2f5e7b..e0d8212 100755
--- a/svtools/source/uno/unogridcolumnfacade.cxx
+++ b/svtools/source/uno/unogridcolumnfacade.cxx
@@ -44,7 +44,7 @@
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
 
 // .....................................................................................................................
 namespace svt { namespace table
@@ -150,7 +150,7 @@ namespace svt { namespace table
     {
         if ( i_event.AttributeName.equalsAscii( "DataColumnIndex" ) )
         {
-            ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+	    SolarMutexGuard aGuard;
             if ( m_pColumnImplementation != NULL )
                 m_pColumnImplementation->dataColumnIndexChanged();
             return;
@@ -173,7 +173,7 @@ namespace svt { namespace table
         OSL_ENSURE( nChangedAttributes != COL_ATTRS_NONE,
             "ColumnChangeMultiplexer::columnChanged: unknown column attributed changed!" );
 
-        ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+	SolarMutexGuard aGuard;
         if ( m_pColumnImplementation != NULL )
             m_pColumnImplementation->columnChanged( nChangedAttributes );
     }
diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
index c93e747..6898f24 100644
--- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -72,6 +72,7 @@ public:
 private:
     typedef ::std::list< UnoControlModelHolder >		UnoControlModelHolderList;
 
+public:
     // for grouping control models (XTabControllerModel::getGroupXXX)
     typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >	
                                                         ModelGroup;
diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index 730adc3..207d028 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -1,8 +1,7 @@
-/* -*- 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
@@ -32,18 +31,12 @@
 #include <toolkit/controls/controlmodelcontainerbase.hxx>
 #include <com/sun/star/awt/XTopWindow.hpp>
 #include <com/sun/star/awt/XDialog.hpp>
-#include <com/sun/star/awt/XTabListener.hpp>
-#include <com/sun/star/awt/XSimpleTabController.hpp>
 #include <com/sun/star/resource/XStringResourceResolver.hpp>
-#include <com/sun/star/graphic/XGraphicObject.hpp>
-#include <cppuhelper/implbase2.hxx>
 #include "toolkit/helper/servicenames.hxx"
 #include "toolkit/helper/macros.hxx"
 #include <toolkit/controls/unocontrolcontainer.hxx>
 #include <cppuhelper/basemutex.hxx>
 #include <list>
-#include <map>
-#include <com/sun/star/graphic/XGraphicObject.hpp>
 
 //	----------------------------------------------------
 //	class UnoControlDialogModel
@@ -51,45 +44,24 @@
 
 class UnoControlDialogModel :	public ControlModelContainerBase
 {
-    enum ChildOperation { Insert = 0, Remove };
-protected:
-    void updateUserFormChildren(  const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xAllChildren, const rtl::OUString& aName, ChildOperation Operation,  const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xTarget ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-    ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
-    bool mbAdjustingGraphic;
-
+protected:	
     ::com::sun::star::uno::Any			ImplGetDefaultValue( sal_uInt16 nPropId ) const;
     ::cppu::IPropertyArrayHelper&		SAL_CALL getInfoHelper();
 public:
                         UnoControlDialogModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
-                        UnoControlDialogModel(  bool bRegProps = true );
                         UnoControlDialogModel( const UnoControlDialogModel& rModel );
                         ~UnoControlDialogModel();
 
     UnoControlModel*	Clone() const;
-
-
     // ::com::sun::star::beans::XMultiPropertySet
     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
-
-
+    
     // ::com::sun::star::io::XPersistObject
     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
 
     // XServiceInfo
     DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, szServiceName2_UnoControlDialogModel )
 
-    // ::cppu::OPropertySetHelper
-    void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
-private:
-    void AddRadioButtonToGroup (
-            const ::com::sun::star::uno::Reference< XControlModel >& rControlModel,
-            const ::rtl::OUString& rPropertyName,
-            ::std::map< ::rtl::OUString, ModelGroup >& pNamedGroups,
-            ModelGroup*& rpCurrentGroup );
-    void AddRadioButtonGroup (
-            ::std::map< ::rtl::OUString, ModelGroup >& pNamedGroups );
-
-
 };
 
 class UnoDialogControl :public ControlContainerBase,
@@ -102,7 +74,6 @@ private:
     TopWindowListenerMultiplexer	                                            maTopWindowListeners;
     bool                                                                        mbWindowListener;
 
-
 public:
 
                                 UnoDialogControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
@@ -130,8 +101,7 @@ public:
     virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
-
-
+    
     // ::com::sun::star::awt::XDialog
     void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
     ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
@@ -147,210 +117,15 @@ public:
 
     // XModifyListener
     virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
-
+    
     // ::com::sun::star::lang::XServiceInfo
     DECLIMPL_SERVICEINFO( UnoDialogControl, szServiceName2_UnoControlDialog )
 
 protected:
    // virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
     virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc );
-protected:
-    virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
-    virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
-};
-
-
-typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener,
-                             ::com::sun::star::util::XChangesListener >
-                             UnoParentControl_IBase;
-
-class UnoParentControl : public UnoControlContainer, public UnoParentControl_IBase
-{
-protected:
-    bool                                                                        mbSizeModified;
-    bool                                                                        mbPosModified;
-    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >	mxTabController;
-    void		ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName );
-    void		ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel );
-    virtual void		ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
-
-public:
-    UnoParentControl();
-    ~UnoParentControl();
-
-    DECLIMPL_SERVICEINFO_DERIVED( UnoParentControl, UnoControlBase, "com.sun.star.awt.UnoParentControl" )
-    ::com::sun::star::uno::Any	SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::queryInterface(rType); }
-    ::com::sun::star::uno::Any	SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL acquire() throw()	{ OWeakAggObject::acquire(); }
-    void SAL_CALL release() throw()	{ OWeakAggObject::release(); }
-
-    void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
-
-    void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::container::XContainerListener
-    void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::lang::XTypeProvider
-    ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-    ::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
-    // XChangesListener
-    virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::awt::XControl
-    sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
-protected:
     virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
-    virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
-    virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
-};
-
-class UnoMultiPageModel : public UnoControlDialogModel
-{
-public:
-    UnoMultiPageModel();
-    ~UnoMultiPageModel();
-    UnoMultiPageModel( const UnoMultiPageModel& rModel );
-
-    UnoControlModel*	Clone() const;
-
-    DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, UnoControlDialogModel, szServiceName_UnoMultiPageModel )
-
-    virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw( ::com::sun::star::uno::RuntimeException);
-    // XNamedContainer
-    void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
-    // Override the method of parent Class
-    virtual sal_Bool SAL_CALL getGroupControl(  ) throw (::com::sun::star::uno::RuntimeException);
 protected:
-    virtual ::com::sun::star::uno::Any			ImplGetDefaultValue( sal_uInt16 nPropId ) const;
-    ::cppu::IPropertyArrayHelper&		SAL_CALL getInfoHelper();
-
-};
-
-class UnoMultiPageControl :  public UnoParentControl
-                            ,public ::com::sun::star::awt::XSimpleTabController
-                            ,public ::com::sun::star::awt::XTabListener
-{
-    TabListenerMultiplexer maTabListeners;
-    void bindPage( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
-public:
-    UnoMultiPageControl();
-    ~UnoMultiPageControl();
-    ::rtl::OUString		GetComponentServiceName();
-
-    // ::com::sun::star::lang::XServiceInfo
-    DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageControl, UnoParentControl, szServiceName_UnoMultiPageControl )
-    ::com::sun::star::uno::Any	SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoParentControl::queryInterface(rType); }
-    ::com::sun::star::uno::Any	SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-    void						SAL_CALL acquire() throw()	{ OWeakAggObject::acquire(); }
-    void						SAL_CALL release() throw()	{ OWeakAggObject::release(); }
-    // ::com::sun::star::lang::XTypeProvider
-    ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-    ::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
-    // com::sun::star::awt::XSimpleTabController
-    virtual ::sal_Int32 SAL_CALL insertTab() throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removeTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
-    virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
-    virtual void SAL_CALL activateTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Int32 SAL_CALL getActiveTabID() throw (::com::sun::star::uno::RuntimeException);
-
-    virtual void SAL_CALL addTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removeTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
-    // XTabListener
-    virtual void SAL_CALL inserted( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removed( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL changed( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL activated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL deactivated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException);
-    // XComponent
-    void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
-
-protected:
-    virtual void    impl_createControlPeerIfNecessary(
-        const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl
-    );
-
-};
-
-
-class UnoPageModel : public UnoControlDialogModel
-{
-public:
-    UnoPageModel();
-    ~UnoPageModel();
-    UnoPageModel( const UnoPageModel& rModel );
-
-    UnoControlModel*	Clone() const;
-
-    DECLIMPL_SERVICEINFO_DERIVED( UnoPageModel, UnoControlDialogModel, szServiceName_UnoPageModel )
-
-    virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw( ::com::sun::star::uno::RuntimeException);
-
-    // Override the method of parent Class
-    virtual sal_Bool SAL_CALL getGroupControl(  ) throw (::com::sun::star::uno::RuntimeException);
-protected:
-    virtual ::com::sun::star::uno::Any			ImplGetDefaultValue( sal_uInt16 nPropId ) const;
-    ::cppu::IPropertyArrayHelper&		SAL_CALL getInfoHelper();
-
-};
-
-class UnoPageControl :  public UnoParentControl
-{
-public:
-    UnoPageControl();
-    ~UnoPageControl();
-    ::rtl::OUString		GetComponentServiceName();
-
-
-    // ::com::sun::star::lang::XServiceInfo
-    DECLIMPL_SERVICEINFO_DERIVED( UnoPageControl, UnoParentControl, szServiceName_UnoPageControl )
-};
-
-class UnoFrameModel : public UnoControlDialogModel
-{
-public:
-    UnoFrameModel();
-    ~UnoFrameModel();
-    UnoFrameModel( const UnoFrameModel& rModel );
-
-    UnoControlModel*	Clone() const;
-
-    DECLIMPL_SERVICEINFO_DERIVED( UnoFrameModel, UnoControlDialogModel, szServiceName_UnoFrameModel )
-
-    virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw( ::com::sun::star::uno::RuntimeException);
-
-protected:
-    virtual ::com::sun::star::uno::Any			ImplGetDefaultValue( sal_uInt16 nPropId ) const;
-    ::cppu::IPropertyArrayHelper&		SAL_CALL getInfoHelper();
-};
-
-class UnoFrameControl :  public UnoParentControl
-{
-protected:
-    virtual void		ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
-public:
-    UnoFrameControl();
-    ~UnoFrameControl();
-    ::rtl::OUString		GetComponentServiceName();
-
-// ::com::sun::star::lang::XServiceInfo
-DECLIMPL_SERVICEINFO_DERIVED( UnoFrameControl, UnoParentControl, szServiceName_UnoPageControl )
 };
 
 #endif // TOOLKIT_DIALOG_CONTROL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 6599708..91b8e2a 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -72,17 +72,6 @@
 #define UNO_NAME_GRAPHOBJ_URLPREFIX                             "vnd.sun.star.GraphicObject:"
 #define UNO_NAME_GRAPHOBJ_URLPKGPREFIX                  "vnd.sun.star.Package:"
 
-class ImageHelper
-{
-public:
-    // The routine will always attempt to return a valid XGraphic for the passed _rURL
-    // additionallly xOutGraphicObject will container the associated XGraphicObject ( if url
-    // is valid for that )
-    // and is set appropriately ( e.g. NULL if non GraphicObject scheme ) or valid object
-    // if the rURL points to a valid object
-    static ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicAndGraphicObjectFromURL_nothrow( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject >& xOutGraphicObject, const ::rtl::OUString& _rURL );
-};
-
 //	----------------------------------------------------
 //	class UnoControlEditModel
 //	----------------------------------------------------
@@ -234,6 +223,7 @@ private:
     bool                                                                                    mbAdjustingGraphic;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
+    ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL );
 
 protected:
     GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
index adfca37..80b459f 100755
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -45,6 +45,7 @@
 #include <tools/diagnose_ex.h>
 #include <tools/urlobj.hxx>
 #include <vcl/throbber.hxx>
+#include <vcl/svapp.hxx>
 
 #include <limits>
 
@@ -318,7 +319,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void SAL_CALL AnimatedImagesPeer::startAnimation(  ) throw (RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             pThrobber->start();
@@ -327,7 +328,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void SAL_CALL AnimatedImagesPeer::stopAnimation(  ) throw (RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             pThrobber->stop();
@@ -336,7 +337,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     ::sal_Bool SAL_CALL AnimatedImagesPeer::isAnimationRunning(  ) throw (RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             return pThrobber->isRunning();
@@ -346,7 +347,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void SAL_CALL AnimatedImagesPeer::setProperty( const ::rtl::OUString& i_propertyName, const Any& i_value ) throw(RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
 
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber == NULL )
@@ -393,7 +394,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     Any SAL_CALL AnimatedImagesPeer::getProperty( const ::rtl::OUString& i_propertyName ) throw(RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
 
         Any aReturn;
 
@@ -443,7 +444,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void AnimatedImagesPeer::impl_updateImages_nolck( const Reference< XInterface >& i_animatedImages )
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
 
         lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) );
     }
@@ -451,7 +452,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void SAL_CALL AnimatedImagesPeer::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
 
         sal_Int32 nPosition(0);
@@ -474,7 +475,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void SAL_CALL AnimatedImagesPeer::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
 
         sal_Int32 nPosition(0);
@@ -493,7 +494,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     void SAL_CALL AnimatedImagesPeer::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException)
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
 
         sal_Int32 nPosition(0);
@@ -529,7 +530,7 @@ namespace toolkit
     void SAL_CALL AnimatedImagesPeer::dispose(  ) throw(RuntimeException)
     {
         AnimatedImagesPeer_Base::dispose();
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         m_pData->aCachedImageSets.resize(0);
     }
 
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index f8e632c..9975f94 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/awt/XControl.hpp>
 #include <vcl/tabpage.hxx>
 #include <vcl/tabctrl.hxx>
+#include <vcl/svapp.hxx>
 #include <toolkit/helper/property.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <toolkit/helper/tkresmgr.hxx>
@@ -65,7 +66,7 @@ VCLXTabPageContainer::~VCLXTabPageContainer()
 
 void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(RuntimeException)
 {
-    ::osl::MutexGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     TabControl* pTabControl = (TabControl*)GetWindow();
     if ( pTabControl )
     {
@@ -107,7 +108,7 @@ void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(Run
 
 void SAL_CALL VCLXTabPageContainer::setProperty(const ::rtl::OUString& PropertyName,   const Any& Value ) throw(RuntimeException)
 {
-    ::osl::MutexGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     TabControl* pTabPage = (TabControl*)GetWindow();
     if ( pTabPage )
@@ -141,7 +142,7 @@ Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer:
 }
 Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer::getTabPageByID( ::sal_Int16 tabPageID ) throw (RuntimeException)
 {
-    ::osl::ClearableMutexGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage;
     ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aIter = m_aTabPages.begin();
     ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aEnd = m_aTabPages.end();
@@ -168,7 +169,7 @@ void SAL_CALL VCLXTabPageContainer::removeTabPageListener( const Reference< ::co
 
 void VCLXTabPageContainer::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
 {
-    ::osl::ClearableMutexGuard aGuard( GetMutex() );
+    SolarMutexClearableGuard aGuard;
     TabControl* pTabControl = static_cast< TabControl* >( GetWindow() );
     if ( pTabControl )
     {
@@ -194,7 +195,7 @@ void SAL_CALL VCLXTabPageContainer::disposing( const ::com::sun::star::lang::Eve
 }
 void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::MutexGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     TabControl* pTabCtrl = (TabControl*)GetWindow();
     Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY);
     if ( pTabCtrl && xTabPage.is() )
@@ -217,7 +218,7 @@ void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::con
 }
 void SAL_CALL VCLXTabPageContainer::elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::MutexGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     TabControl* pTabCtrl = (TabControl*)GetWindow();
     Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY);
     if ( pTabCtrl && xTabPage.is() )
diff --git a/toolkit/source/awt/xsimpleanimation.cxx b/toolkit/source/awt/xsimpleanimation.cxx
index 04933f1..65254d1 100644
--- a/toolkit/source/awt/xsimpleanimation.cxx
+++ b/toolkit/source/awt/xsimpleanimation.cxx
@@ -61,7 +61,7 @@ namespace toolkit
     //--------------------------------------------------------------------
     void SAL_CALL XSimpleAnimation::start() throw ( uno::RuntimeException )
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             pThrobber->start();
@@ -70,7 +70,7 @@ namespace toolkit
     //--------------------------------------------------------------------
     void SAL_CALL XSimpleAnimation::stop() throw ( uno::RuntimeException )
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             pThrobber->stop();
@@ -80,7 +80,7 @@ namespace toolkit
     void SAL_CALL XSimpleAnimation::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList )
         throw ( uno::RuntimeException )
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             pThrobber->setImageList( rImageList );
diff --git a/toolkit/source/awt/xthrobber.cxx b/toolkit/source/awt/xthrobber.cxx
index d577d58..04cd37d 100644
--- a/toolkit/source/awt/xthrobber.cxx
+++ b/toolkit/source/awt/xthrobber.cxx
@@ -66,7 +66,7 @@ namespace toolkit
     //--------------------------------------------------------------------
     void SAL_CALL XThrobber::start() throw ( uno::RuntimeException )
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber != NULL)
             pThrobber->start();
@@ -92,7 +92,7 @@ namespace toolkit
     void SAL_CALL XThrobber::InitImageList()
         throw( uno::RuntimeException )
     {
-        ::osl::MutexGuard aGuard( GetMutex() );
+        SolarMutexGuard aGuard;
 
         Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
         if ( pThrobber == NULL)
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index c23f9f0..d61d394 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -32,13 +32,16 @@
 #include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
 #include <vcl/wall.hxx>
+#include <osl/mutex.hxx>
 #include <toolkit/helper/property.hxx>
 #include <toolkit/helper/unopropertyarrayhelper.hxx>
 #include <toolkit/controls/geometrycontrolmodel.hxx>
 #include <toolkit/controls/unocontrols.hxx>
 #include "toolkit/controls/formattedcontrol.hxx"
 #include "toolkit/controls/roadmapcontrol.hxx"
+#ifndef TOOLKIT_INC_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
 #include "toolkit/controls/tkscrollbar.hxx"
+#endif
 #include <toolkit/controls/stdtabcontroller.hxx>
 #include <com/sun/star/awt/PosSize.hpp>
 #include <com/sun/star/awt/WindowAttribute.hpp>
@@ -64,14 +67,14 @@
 #include "grid/gridcontrol.hxx"
 #include <toolkit/controls/tabpagecontainer.hxx>
 
+#include <boost/bind.hpp>
+
 #include <map>
 #include <algorithm>
 #include <functional>
 #include "tools/urlobj.hxx"
 #include "osl/file.hxx"
 
-#include <boost/bind.hpp>
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::awt;
@@ -335,7 +338,7 @@ ControlModelContainerBase::UnoControlModelHolderList::iterator ControlModelConta
 // ::XMultiServiceFactory
 Reference< XInterface > ControlModelContainerBase::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(Exception, RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     OGeometryControlModel_Base* pNewModel = NULL;
 
@@ -482,7 +485,7 @@ sal_Bool ControlModelContainerBase::hasElements() throw(RuntimeException)
 // XNameContainer, XNameReplace, XNameAccess
 void ControlModelContainerBase::replaceByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XControlModel > xNewModel;
     aElement >>= xNewModel;
@@ -542,7 +545,7 @@ sal_Bool ControlModelContainerBase::hasByName( const ::rtl::OUString& aName ) th
 
 void ControlModelContainerBase::insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XControlModel > xM;
     aElement >>= xM;
@@ -595,7 +598,7 @@ void ControlModelContainerBase::insertByName( const ::rtl::OUString& aName, cons
 
 void ControlModelContainerBase::removeByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
     if ( maModels.end() == aElementPos )
@@ -638,7 +641,7 @@ void SAL_CALL ControlModelContainerBase::setGroupControl( sal_Bool ) throw (Runt
 // ----------------------------------------------------------------------------
 void SAL_CALL ControlModelContainerBase::setControlModels( const Sequence< Reference< XControlModel > >& _rControls ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     // set the tab indexes according to the order of models in the sequence
     const Reference< XControlModel >* pControls = _rControls.getConstArray( );
@@ -675,7 +678,7 @@ typedef ::std::multimap< sal_Int32, Reference< XControlModel >, ::std::less< sal
 // ----------------------------------------------------------------------------
 Sequence< Reference< XControlModel > > SAL_CALL ControlModelContainerBase::getControlModels(  ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     MapIndexToModel aSortedModels;
         // will be the sorted container of all models which have a tab index property
@@ -757,7 +760,7 @@ void SAL_CALL ControlModelContainerBase::setEnabled( ::sal_Bool _enabled ) throw
 }
 ::rtl::OUString SAL_CALL ControlModelContainerBase::getTitle() throw (::com::sun::star::uno::RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
     Reference<XPropertySet> xThis(*this,UNO_QUERY);
     ::rtl::OUString sTitle;
     xThis->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)) >>= sTitle;
@@ -766,7 +769,7 @@ void SAL_CALL ControlModelContainerBase::setEnabled( ::sal_Bool _enabled ) throw
 }
 void SAL_CALL ControlModelContainerBase::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
     Reference<XPropertySet> xThis(*this,UNO_QUERY);
     xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),makeAny(_title));
 }
@@ -816,7 +819,7 @@ namespace
 // ----------------------------------------------------------------------------
 sal_Int32 SAL_CALL ControlModelContainerBase::getGroupCount(  ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     implUpdateGroupStructure();
 
@@ -826,7 +829,7 @@ sal_Int32 SAL_CALL ControlModelContainerBase::getGroupCount(  ) throw (RuntimeEx
 // ----------------------------------------------------------------------------
 void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence< Reference< XControlModel > >& _rGroup, ::rtl::OUString& _rName ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     implUpdateGroupStructure();
 
@@ -850,7 +853,7 @@ void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence<
 // ----------------------------------------------------------------------------
 void SAL_CALL ControlModelContainerBase::getGroupByName( const ::rtl::OUString& _rName, Sequence< Reference< XControlModel > >& _rGroup ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     ::rtl::OUString sDummyName;
     getGroup( _rName.toInt32( ), _rGroup, sDummyName );
@@ -1030,7 +1033,7 @@ void ControlModelContainerBase::implUpdateGroupStructure()
 // ----------------------------------------------------------------------------
 void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     DBG_ASSERT( 0 == _rEvent.PropertyName.compareToAscii( "TabIndex" ),
         "UnoControlDialogModel::propertyChange: not listening for this property!" );
@@ -1061,7 +1064,7 @@ void SAL_CALL ControlModelContainerBase::disposing( const EventObject& /*rEvent*
 // ----------------------------------------------------------------------------
 void ControlModelContainerBase::startControlListening( const Reference< XControlModel >& _rxChildModel )
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY );
     Reference< XPropertySetInfo > xPSI;
@@ -1075,7 +1078,7 @@ void ControlModelContainerBase::startControlListening( const Reference< XControl
 // ----------------------------------------------------------------------------
 void ControlModelContainerBase::stopControlListening( const Reference< XControlModel >& _rxChildModel )
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY );
     Reference< XPropertySetInfo > xPSI;
@@ -1330,7 +1333,7 @@ ControlContainerBase::~ControlContainerBase()
 
 void ControlContainerBase::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer >  & rParentPeer ) throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
     UnoControlContainer::createPeer( rxToolkit, rParentPeer );
 }
 
@@ -1435,13 +1438,12 @@ void ControlContainerBase::ImplSetPosSize( Reference< XControl >& rxCtrl )
 
 void ControlContainerBase::dispose() throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
-
     EventObject aEvt;
     aEvt.Source = static_cast< ::cppu::OWeakObject* >( this );
     // Notify our listener helper about dispose
     // --- SAFE ---
-    ::osl::ResettableGuard< ::osl::Mutex > aGuard( GetMutex() );
+    
+    SolarMutexClearableGuard aGuard;
     Reference< XEventListener > xListener( mxListener, UNO_QUERY );
     mxListener.clear();
     aGuard.clear();
@@ -1461,7 +1463,7 @@ throw(RuntimeException)
 
 sal_Bool ControlContainerBase::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     // destroy the old tab controller, if existent
     if ( mxTabController.is() )
@@ -1534,8 +1536,7 @@ sal_Bool ControlContainerBase::setModel( const Reference< XControlModel >& rxMod
 }
 void ControlContainerBase::setDesignMode( sal_Bool bOn ) throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoControl::setDesignMode( bOn );
 
@@ -1554,7 +1555,7 @@ void ControlContainerBase::setDesignMode( sal_Bool bOn ) throw(RuntimeException)
 
 void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XControlModel > xModel;
     ::rtl::OUString aName;
@@ -1575,7 +1576,7 @@ void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw(
 
 void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XControlModel > xModel;
     Event.Element >>= xModel;
@@ -1593,7 +1594,7 @@ void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(R
 
 void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw(RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
 
     Reference< XControlModel > xModel;
     Event.ReplacedElement >>= xModel;
@@ -1670,7 +1671,7 @@ void ControlContainerBase::ImplModelPropertiesChanged( const Sequence< PropertyC
 
 void ControlContainerBase::addingControl( const Reference< XControl >& _rxControl )
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
     UnoControlContainer::addingControl( _rxControl );
 
     if ( _rxControl.is() )
@@ -1692,7 +1693,7 @@ void ControlContainerBase::addingControl( const Reference< XControl >& _rxContro
 
 void ControlContainerBase::removingControl( const Reference< XControl >& _rxControl )
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
     UnoControlContainer::removingControl( _rxControl );
 
     if ( _rxControl.is() )
@@ -1706,7 +1707,7 @@ void ControlContainerBase::removingControl( const Reference< XControl >& _rxCont
 
 void SAL_CALL ControlContainerBase::changesOccurred( const ChangesEvent& ) throw (RuntimeException)
 {
-    SolarMutexGuard aSolarGuard;
+    SolarMutexGuard aGuard;
     // a tab controller model may have changed
 
     // #109067# in design mode don't notify the tab controller
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 792a329..93aea99 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -1,8 +1,7 @@
-/* -*- 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
@@ -41,6 +40,7 @@
 #include <com/sun/star/awt/WindowAttribute.hpp>
 #include <com/sun/star/resource/XStringResourceResolver.hpp>
 #include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <tools/list.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
@@ -53,16 +53,10 @@
 #include <vcl/graph.hxx>
 #include <vcl/image.hxx>
 #include <map>
-#include <boost/unordered_map.hpp>
 #include <algorithm>
-#include <o3tl/compat_functional.hxx>
+#include <functional>
 #include "tools/urlobj.hxx"
 #include "osl/file.hxx"
-#include <com/sun/star/awt/XSimpleTabController.hpp>
-#include <vcl/tabctrl.hxx>
-#include <vcl/tabpage.hxx>
-#include <vcl/button.hxx>
-#include <toolkit/awt/vclxwindows.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -71,7 +65,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::script;
 
 #define PROPERTY_DIALOGSOURCEURL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogSourceURL" ))
 #define PROPERTY_IMAGEURL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ImageURL" ))
@@ -80,95 +73,12 @@ using namespace ::com::sun::star::script;
 ////HELPER
 ::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
 
-uno::Reference< graphic::XGraphic > getGraphicFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& rxGrfObj, const ::rtl::OUString& _rURL );
-
-// we probably will need both a hash of control models and hash of controls
-// => use some template magic
-
-typedef ::cppu::WeakImplHelper1< container::XNameContainer > SimpleNameContainer_BASE;
-
-template< typename T >
-class SimpleNamedThingContainer : public SimpleNameContainer_BASE
-{
-    typedef boost::unordered_map< rtl::OUString, Reference< T >, ::rtl::OUStringHash,
-       ::std::equal_to< ::rtl::OUString > > NamedThingsHash;
-    NamedThingsHash things;
-    ::osl::Mutex m_aMutex;
-public:
-    // ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        if ( !hasByName( aName ) )
-            throw NoSuchElementException();
-        Reference< T > xElement;
-        if ( ! ( aElement >>= xElement ) )
-            throw IllegalArgumentException();
-        things[ aName ] = xElement;
-    }
-    virtual Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        if ( !hasByName( aName ) )
-            throw NoSuchElementException();
-        return uno::makeAny( things[ aName ] );
-    }
-    virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames(  ) throw(RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        Sequence< ::rtl::OUString > aResult( things.size() );
-        typename NamedThingsHash::iterator it = things.begin();
-        typename NamedThingsHash::iterator it_end = things.end();
-        rtl::OUString* pName = aResult.getArray();
-        for (; it != it_end; ++it, ++pName )
-            *pName = it->first;
-        return aResult;
-    }
-    virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        return ( things.find( aName ) != things.end() );
-    }
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        if ( hasByName( aName ) )
-            throw ElementExistException();
-        Reference< T > xElement;
-        if ( ! ( aElement >>= xElement ) )
-            throw IllegalArgumentException();
-        things[ aName ] = xElement;
-    }
-    virtual void SAL_CALL removeByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        if ( !hasByName( aName ) )
-            throw NoSuchElementException();
-        things.erase( things.find( aName ) );
-    }
-    virtual Type SAL_CALL getElementType(  ) throw (RuntimeException)
-    {
-        return T::static_type( NULL );
-    }
-    virtual ::sal_Bool SAL_CALL hasElements(  ) throw (RuntimeException)
-    {
-        ::osl::MutexGuard aGuard( m_aMutex );
-        return ( things.size() > 0 );
-    }
-};
-
-
 //	----------------------------------------------------
 //	class UnoControlDialogModel
 //	----------------------------------------------------
-UnoControlDialogModel::UnoControlDialogModel( bool regProps )
-    :maContainerListeners( *this )
-    ,maChangeListeners ( GetMutex() )
-    ,mbGroupsUpToDate( sal_False ), mbAdjustingGraphic( false )
+UnoControlDialogModel::UnoControlDialogModel( const Reference< XMultiServiceFactory >& i_factory )
+    :ControlModelContainerBase( i_factory )
 {
-    if ( !regProps ) // Register properties elsewhere ( probably in class derived from this )
-        return;
-
     ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
 //	ImplRegisterProperty( BASEPROPERTY_BORDER );
     ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
@@ -189,24 +99,15 @@ UnoControlDialogModel::UnoControlDialogModel( bool regProps )
     aBool <<= (sal_Bool) sal_True;
     ImplRegisterProperty( BASEPROPERTY_MOVEABLE, aBool );
     ImplRegisterProperty( BASEPROPERTY_CLOSEABLE, aBool );
-    // #TODO separate class for 'UserForm' ( instead of re-using Dialog ? )
-    uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >();
-    ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) );
 }
 
 UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel )
-    : UnoControlDialogModel_IBase( rModel )
-    , UnoControlDialogModel_Base( rModel )
-    , maContainerListeners( *this )
-    , maChangeListeners ( GetMutex() )
-    , mbGroupsUpToDate( sal_False ), mbAdjustingGraphic( false )
+    : ControlModelContainerBase( rModel )
 {
 }
 
 UnoControlDialogModel::~UnoControlDialogModel()
 {
-    maModels.clear();
-    mbGroupsUpToDate = sal_False;
 }
 
 UnoControlModel* UnoControlDialogModel::Clone() const
@@ -219,45 +120,12 @@ UnoControlModel* UnoControlDialogModel::Clone() const
     return pClone;
 }
 
+
 ::rtl::OUString UnoControlDialogModel::getServiceName( ) throw(RuntimeException)
 {
     return ::rtl::OUString::createFromAscii( szServiceName_UnoControlDialogModel );
 }
 
-void SAL_CALL UnoControlDialogModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception)
-{
-    UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
-    try
-    {
-        switch ( nHandle )
-        {
-        case BASEPROPERTY_IMAGEURL:
-            if ( !mbAdjustingGraphic && ImplHasProperty( BASEPROPERTY_GRAPHIC ) )
-            {
-                mbAdjustingGraphic = true;
-                ::rtl::OUString sImageURL;
-                OSL_VERIFY( rValue >>= sImageURL );
-                setPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC ), uno::makeAny( ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( mxGrfObj, sImageURL ) ) );
-                mbAdjustingGraphic = false;
-            }
-            break;
-
-        case BASEPROPERTY_GRAPHIC:
-            if ( !mbAdjustingGraphic && ImplHasProperty( BASEPROPERTY_IMAGEURL ) )
-            {
-                mbAdjustingGraphic = true;
-                setPropertyValue( GetPropertyName( BASEPROPERTY_IMAGEURL ), uno::makeAny( ::rtl::OUString() ) );
-                mbAdjustingGraphic = false;
-            }
-            break;
-    }
-    }
-    catch( const ::com::sun::star::uno::Exception& )
-    {
-        OSL_ENSURE( sal_False, "UnoControlDialogModel::setFastPropertyValue_NoBroadcast: caught an exception while setting Graphic/ImageURL properties!" );
-    }
-}
-
 Any UnoControlDialogModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
 {
     Any aAny;
@@ -292,903 +160,21 @@ Reference< XPropertySetInfo > UnoControlDialogModel::getPropertySetInfo(  ) thro
     return xInfo;
 }
 
-void UnoControlDialogModel::updateUserFormChildren( const Reference< XNameContainer >& xAllChildren, const rtl::OUString& aName, ChildOperation Operation, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xTarget ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
-{
-    if ( Operation < Insert || Operation > Remove )
-        throw IllegalArgumentException();
-
-    if ( xAllChildren.is() )
-    {
-        if ( Operation == Remove )
-        {
-            Reference< XControlModel > xOldModel( xAllChildren->getByName( aName ), UNO_QUERY );
-            xAllChildren->removeByName( aName );
-
-            Reference< XNameContainer > xChildContainer( xOldModel, UNO_QUERY );
-            if ( xChildContainer.is() )
-            {
-                Reference< XPropertySet > xProps( xChildContainer, UNO_QUERY );
-                // container control is being removed from this container, reset the
-                // global list of containees
-                if ( xProps.is() )
-                    xProps->setPropertyValue(  GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::makeAny( uno::Reference< XNameContainer >() ) );
-                Sequence< rtl::OUString > aChildNames = xChildContainer->getElementNames();
-                for ( sal_Int32 index=0; index< aChildNames.getLength(); ++index )
-                    updateUserFormChildren( xAllChildren, aChildNames[ index ], Operation,  Reference< XControlModel > () );
-            }
-        }
-        else if ( Operation == Insert )
-        {
-            xAllChildren->insertByName( aName, uno::makeAny( xTarget ) );
-            Reference< XNameContainer > xChildContainer( xTarget, UNO_QUERY );
-            if ( xChildContainer.is() )
-            {
-                // container control is being added from this container, reset the
-                // global list of containees to point to the correct global list

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list