diff --git a/binfilter/bf_sc/source/core/data/sc_documen2.cxx b/binfilter/bf_sc/source/core/data/sc_documen2.cxx
index 9695514..0e864cf 100644
--- binfilter/bf_sc/source/core/data/sc_documen2.cxx
+++ binfilter/bf_sc/source/core/data/sc_documen2.cxx
@@ -496,9 +496,9 @@ namespace binfilter {
 /*N*/ 	// delete the EditEngine before destroying the xPoolHelper
 /*N*/ 	delete pCacheFieldEditEngine;
 /*N*/ 
-/*N*/ 	if ( xPoolHelper.isValid() && !bIsClip )
+/*N*/ 	if ( xPoolHelper.is() && !bIsClip )
 /*N*/ 		xPoolHelper->SourceDocumentGone();
-/*N*/ 	xPoolHelper.unbind();
+/*N*/ 	xPoolHelper.clear();
 /*N*/ 
 /*N*/ 	DeleteColorTable();
 /*N*/ 	delete pScriptTypeData;
diff --git a/binfilter/bf_sc/source/core/data/sc_documen3.cxx b/binfilter/bf_sc/source/core/data/sc_documen3.cxx
index b883066..affded4 100644
--- binfilter/bf_sc/source/core/data/sc_documen3.cxx
+++ binfilter/bf_sc/source/core/data/sc_documen3.cxx
@@ -884,7 +884,7 @@ using namespace ::com::sun::star;
 /*N*/ 	eLanguage = eLatin;
 /*N*/ 	eCjkLanguage = eCjk;
 /*N*/ 	eCtlLanguage = eCtl;
-/*N*/ 	if ( xPoolHelper.isValid() )
+/*N*/ 	if ( xPoolHelper.is() )
 /*N*/ 	{
 /*N*/ 		ScDocumentPool* pPool = xPoolHelper->GetDocPool();
 /*N*/ 		pPool->SetPoolDefaultItem( SvxLanguageItem( eLanguage, ATTR_FONT_LANGUAGE ) );
diff --git a/binfilter/bf_sc/source/core/data/sc_documen9.cxx b/binfilter/bf_sc/source/core/data/sc_documen9.cxx
index 877be6f..1f51f4b 100644
--- binfilter/bf_sc/source/core/data/sc_documen9.cxx
+++ binfilter/bf_sc/source/core/data/sc_documen9.cxx
@@ -546,12 +546,12 @@ namespace binfilter {
 /*N*/ 		pDrawLayer->EnableAdjust(!bImportingXML);
 /*N*/ }
 
-/*N*/ vos::ORef<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
 /*N*/ {
 /*N*/ 	return xForbiddenCharacters;
 /*N*/ }
 
-/*N*/ void ScDocument::SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew )
+/*N*/ void ScDocument::SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew )
 /*N*/ {
 /*N*/ 	xForbiddenCharacters = xNew;
 /*N*/ 	if ( pEditEngine )
diff --git a/binfilter/bf_sc/source/core/data/sc_document.cxx b/binfilter/bf_sc/source/core/data/sc_document.cxx
index 75128b8..e36c2a3 100644
--- binfilter/bf_sc/source/core/data/sc_document.cxx
+++ binfilter/bf_sc/source/core/data/sc_document.cxx
@@ -1011,7 +1011,7 @@ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ 						Rectangle aObjRect = GetMMRect
 /*N*/ BOOL ScDocument::IsClipboardSource() const
 /*N*/ {
 /*N*/ 	ScDocument* pClipDoc = SC_MOD()->GetClipDoc();
-/*N*/ 	return pClipDoc && pClipDoc->xPoolHelper.isValid() &&
+/*N*/ 	return pClipDoc && pClipDoc->xPoolHelper.is() &&
 /*N*/ 			xPoolHelper->GetDocPool() == pClipDoc->xPoolHelper->GetDocPool();
 /*N*/ }
 
@@ -2803,7 +2803,7 @@ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ 			RefreshAutoFilter( nStartCol, nSt
 /*N*/
 /*N*/ 	ScPatternAttr::pDoc = this;
 /*N*/
-/*N*/ 	if ( xPoolHelper.isValid() && !bIsClip )
+/*N*/ 	if ( xPoolHelper.is() && !bIsClip )
 /*N*/ 		xPoolHelper->SourceDocumentGone();
 /*N*/
 /*N*/ 	xPoolHelper = new ScPoolHelper( this );
diff --git a/binfilter/bf_sc/source/core/inc/poolhelp.hxx b/binfilter/bf_sc/source/core/inc/poolhelp.hxx
index 032140a..a9a8ce8 100644
--- binfilter/bf_sc/source/core/inc/poolhelp.hxx
+++ binfilter/bf_sc/source/core/inc/poolhelp.hxx
@@ -36,8 +36,8 @@
 #ifndef SC_POOLHELP_HXX
 #define SC_POOLHELP_HXX
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 class SvNumberFormatter;
@@ -50,7 +50,7 @@ class ScDocumentPool;
 class ScStyleSheetPool;
 
 
-class ScPoolHelper : public vos::OReference
+class ScPoolHelper : public salhelper::SimpleReferenceObject
 {
 private:
 	ScDocumentPool*		pDocPool;
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLDDELinksContext.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLDDELinksContext.cxx
index 315ecb0..de74bdf 100644
--- binfilter/bf_sc/source/filter/xml/sc_XMLDDELinksContext.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_XMLDDELinksContext.cxx
@@ -68,6 +68,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScXMLDDELinksContext::ScXMLDDELinksContext( ScXMLImport& rImport,
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLTableHeaderFooterContext.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLTableHeaderFooterContext.cxx
index 164f161..ba4fff5 100644
--- binfilter/bf_sc/source/filter/xml/sc_XMLTableHeaderFooterContext.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_XMLTableHeaderFooterContext.cxx
@@ -46,7 +46,6 @@
 #include "unonames.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -54,6 +53,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 
 TYPEINIT1( XMLTableHeaderFooterContext, SvXMLImportContext );
 
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLTableMasterPageExport.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLTableMasterPageExport.cxx
index 590d6cd..393e86a 100644
--- binfilter/bf_sc/source/filter/xml/sc_XMLTableMasterPageExport.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_XMLTableMasterPageExport.cxx
@@ -50,13 +50,14 @@
 #include "unonames.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 XMLTableMasterPageExport::XMLTableMasterPageExport( ScXMLExport& rExp ) :
 		XMLTextMasterPageExport ( rExp )
 {
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx
index 233d652..7781b0c 100644
--- binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx
@@ -68,6 +68,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 XMLTableShapeImportHelper::XMLTableShapeImportHelper(
 		ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper ) :
 	XMLShapeImportHelper(rImp, rImp.GetModel(), pImpMapper )
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx
index 0ed0841..0039de2 100644
--- binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx
@@ -84,6 +84,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //-----------------------------------------------------------------------------
 
 class ScXMLChangeInfoContext : public SvXMLImportContext
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmldpimp.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmldpimp.cxx
index 2fe578e..a9483f4 100644
--- binfilter/bf_sc/source/filter/xml/sc_xmldpimp.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_xmldpimp.cxx
@@ -59,6 +59,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScXMLDataPilotTablesContext::ScXMLDataPilotTablesContext( ScXMLImport& rImport,
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx
index 63510ed..a742daf 100644
--- binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx
@@ -112,6 +112,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 OUString SAL_CALL ScXMLImport_getImplementationName() throw()
 {
 	return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Calc.XMLImporter" ) );
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlsceni.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlsceni.cxx
index a46be03..41ae382 100644
--- binfilter/bf_sc/source/filter/xml/sc_xmlsceni.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_xmlsceni.cxx
@@ -58,6 +58,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScXMLTableScenarioContext::ScXMLTableScenarioContext(
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx
index 34a5685..07ba121 100644
--- binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx
@@ -87,6 +87,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 #define MAP(name,prefix,token,type,context)  { name, sizeof(name)-1, prefix, token, type, context }
 #define MAP_END()	{ NULL, 0, 0, XML_TOKEN_INVALID, 0 }
 
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx
index 6ec249f..8a49332 100644
--- binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx
@@ -79,7 +79,6 @@ namespace binfilter {
 #define XML_LINE_TOP 2
 #define XML_LINE_BOTTOM 3
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -88,6 +87,8 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace xmloff::token;
+
+using rtl::OUString;
 //using namespace ::com::sun::star::text;
 
 ScXMLCellImportPropertyMapper::ScXMLCellImportPropertyMapper(
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlwrap.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlwrap.cxx
index c2f208f..0e253e7 100644
--- binfilter/bf_sc/source/filter/xml/sc_xmlwrap.cxx
+++ binfilter/bf_sc/source/filter/xml/sc_xmlwrap.cxx
@@ -114,6 +114,8 @@ namespace binfilter {
 
 using namespace ::com::sun::star;
 
+using rtl::OUString;
+
 // -----------------------------------------------------------------------
 
 ScXMLImportWrapper::ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, SvStorage* pS) :
diff --git a/binfilter/bf_sc/source/filter/xml/xmlimprt.hxx b/binfilter/bf_sc/source/filter/xml/xmlimprt.hxx
index 4c09eeb..db6a211 100644
--- binfilter/bf_sc/source/filter/xml/xmlimprt.hxx
+++ binfilter/bf_sc/source/filter/xml/xmlimprt.hxx
@@ -99,8 +99,6 @@ class XMLNumberFormatAttributesExportHelper;
 class SvXMLTokenMap;
 class SvXMLStyleContext;
 
-using namespace ::rtl;
-
 enum ScXMLDocTokens
 {
 	XML_TOK_DOC_FONTDECLS,
diff --git a/binfilter/bf_sc/source/filter/xml/xmlstyle.hxx b/binfilter/bf_sc/source/filter/xml/xmlstyle.hxx
index 99f634f..69ac98b 100644
--- binfilter/bf_sc/source/filter/xml/xmlstyle.hxx
+++ binfilter/bf_sc/source/filter/xml/xmlstyle.hxx
@@ -62,8 +62,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
-
 extern const XMLPropertyMapEntry aXMLScCellStylesProperties[];
 extern const XMLPropertyMapEntry aXMLScColumnStylesProperties[];
 extern const XMLPropertyMapEntry aXMLScRowStylesProperties[];
diff --git a/binfilter/bf_sc/source/ui/docshell/sc_docsh2.cxx b/binfilter/bf_sc/source/ui/docshell/sc_docsh2.cxx
index 39ca190..6a7dd62 100644
--- binfilter/bf_sc/source/ui/docshell/sc_docsh2.cxx
+++ binfilter/bf_sc/source/ui/docshell/sc_docsh2.cxx
@@ -153,19 +153,19 @@ using namespace ::com::sun::star;
 /*N*/ 		PutItem( SvxColorTableItem( OFF_APP()->GetStdColorTable() ) );
 /*N*/ 	}
 /*N*/ 
-/*N*/ 	if ( !aDocument.GetForbiddenCharacters().isValid() ||
+/*N*/ 	if ( !aDocument.GetForbiddenCharacters().is() ||
 /*N*/ 			!aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning() )
 /*N*/ 	{
 /*N*/ 		//	get settings from SvxAsianConfig
 /*N*/ 		SvxAsianConfig aAsian( sal_False );
 /*N*/ 
-/*N*/ 		if ( !aDocument.GetForbiddenCharacters().isValid() )
+/*N*/ 		if ( !aDocument.GetForbiddenCharacters().is() )
 /*N*/ 		{
 /*N*/ 			// set forbidden characters if necessary
 /*N*/ 			uno::Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
 /*N*/ 			if (aLocales.getLength())
 /*N*/ 			{
-/*?*/ 				vos::ORef<SvxForbiddenCharactersTable> xForbiddenTable =
+/*?*/ 				rtl::Reference<SvxForbiddenCharactersTable> xForbiddenTable =
 /*?*/ 						new SvxForbiddenCharactersTable( aDocument.GetServiceManager() );
 /*?*/ 
 /*?*/ 				const lang::Locale* pLocales = aLocales.getConstArray();
diff --git a/binfilter/bf_sc/source/ui/unoobj/sc_forbiuno.cxx b/binfilter/bf_sc/source/ui/unoobj/sc_forbiuno.cxx
index 26f0ebb..f6d5aae 100644
--- binfilter/bf_sc/source/ui/unoobj/sc_forbiuno.cxx
+++ binfilter/bf_sc/source/ui/unoobj/sc_forbiuno.cxx
@@ -48,14 +48,14 @@ using namespace ::com::sun::star;
 
 //------------------------------------------------------------------------
 
-vos::ORef<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* pDocSh )
+rtl::Reference<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* pDocSh )
 {
-	vos::ORef<SvxForbiddenCharactersTable> xRet;
+	rtl::Reference<SvxForbiddenCharactersTable> xRet;
 	if ( pDocSh )
 	{
 		ScDocument* pDoc = pDocSh->GetDocument();
 		xRet = pDoc->GetForbiddenCharacters();
-		if ( !xRet.isValid() )
+		if ( !xRet.is() )
 		{
 			//	create an empty SvxForbiddenCharactersTable for SvxUnoForbiddenCharsTable,
 			//	so changes can be stored.
diff --git a/binfilter/bf_sc/util/makefile.mk b/binfilter/bf_sc/util/makefile.mk
index 02b8a74..a21bd3e 100644
--- binfilter/bf_sc/util/makefile.mk
+++ binfilter/bf_sc/util/makefile.mk
@@ -92,6 +92,7 @@ SHL1STDLIBS+=       \
 	$(TKLIB)		\
 	$(VOSLIB)		\
 	$(SALLIB)		\
+	$(SALHELPERLIB)		\
 	$(TOOLSLIB)		\
 	$(I18NISOLANGLIB)   \
 	$(UNOTOOLSLIB)  \
diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx
index 7fd810d..544cf42 100644
--- binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx
+++ binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx
@@ -142,11 +142,12 @@ namespace
 namespace binfilter {
 
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 
+using rtl::OUString;
+
 extern SchUnoPropertyMapProvider aSchMapProvider;
 
 #if defined(MACOSX) && ( __GNUC__ < 3 )
diff --git a/binfilter/bf_sd/source/filter/xml/sd_sdxmlwrp.cxx b/binfilter/bf_sd/source/filter/xml/sd_sdxmlwrp.cxx
index e2727bf..0f981f8 100644
--- binfilter/bf_sd/source/filter/xml/sd_sdxmlwrp.cxx
+++ binfilter/bf_sd/source/filter/xml/sd_sdxmlwrp.cxx
@@ -117,9 +117,10 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::document;
-using namespace rtl;
 using namespace comphelper;
 
+using rtl::OUString;
+
 #define SD_XML_READERROR 1234
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/binfilter/bf_sd/source/ui/unoidl/sd_UnoDocumentSettings.cxx b/binfilter/bf_sd/source/ui/unoidl/sd_UnoDocumentSettings.cxx
index 280acc3..ff21f32 100644
--- binfilter/bf_sd/source/ui/unoidl/sd_UnoDocumentSettings.cxx
+++ binfilter/bf_sd/source/ui/unoidl/sd_UnoDocumentSettings.cxx
@@ -105,7 +105,6 @@ namespace binfilter {
 
 using namespace ::comphelper;
 using namespace ::osl;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::vos;
 using namespace ::com::sun::star;
@@ -119,6 +118,8 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::i18n;
 
+using rtl::OUString;
+
 namespace sd
 {
 	class DocumentSettings : public WeakImplHelper3< XPropertySet, XMultiPropertySet, XServiceInfo >,
diff --git a/binfilter/bf_sd/source/ui/unoidl/sd_unopool.cxx b/binfilter/bf_sd/source/ui/unoidl/sd_unopool.cxx
index 7896d0c..4d0ae1b 100644
--- binfilter/bf_sd/source/ui/unoidl/sd_unopool.cxx
+++ binfilter/bf_sd/source/ui/unoidl/sd_unopool.cxx
@@ -56,7 +56,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::comphelper;
 
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx b/binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx
index 2f67b6f..e27aabb 100644
--- binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx
+++ binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx
@@ -96,7 +96,8 @@ namespace binfilter {
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 // ------------------------------------------------------------------------
 
diff --git a/binfilter/bf_svx/source/editeng/eerdll2.hxx b/binfilter/bf_svx/source/editeng/eerdll2.hxx
index 53b0111..833c7c6 100644
--- binfilter/bf_svx/source/editeng/eerdll2.hxx
+++ binfilter/bf_svx/source/editeng/eerdll2.hxx
@@ -37,7 +37,7 @@
 #define _EERDLL2_HXX
 
 #include <forbiddencharacterstable.hxx>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 class SfxPoolItem; 
 namespace binfilter {
 
@@ -51,7 +51,7 @@ private:
 
 	Link			aGetAutoCorrectHdl;
 
-	vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
+	rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
 
 public:
 					GlobalEditData();
@@ -63,8 +63,8 @@ public:
 	void			SetGetAutoCorrectHdl( const Link& rHdl ) { aGetAutoCorrectHdl = rHdl; }
 	SvxAutoCorrect*	GetAutoCorrect() const { return (SvxAutoCorrect*) aGetAutoCorrectHdl.Call( NULL ); }
 
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable();
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; }
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable();
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; }
 };
 
 
diff --git a/binfilter/bf_svx/source/editeng/impedit.hxx b/binfilter/bf_svx/source/editeng/impedit.hxx
index ecaab21..b28a368 100644
--- binfilter/bf_svx/source/editeng/impedit.hxx
+++ binfilter/bf_svx/source/editeng/impedit.hxx
@@ -73,7 +73,7 @@
 #include <com/sun/star/i18n/WordType.hpp>
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 class SvKeyValueIterator;
 class SvtCTLOptions;
 class SvUShorts;
@@ -397,7 +397,7 @@ private:
     Link                aEndPasteOrDropHdl;
     Link                aModifyHdl;
 
-	vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
+	rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
 
 
 	// ================================================================
@@ -697,8 +697,8 @@ public:
 	void                SetKernAsianPunctuation( BOOL b );
 	BOOL				IsKernAsianPunctuation() const { return bKernAsianPunctuation; }
 
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const;
-	void				SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const;
+	void				SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
 };
 
 inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM )
diff --git a/binfilter/bf_svx/source/editeng/svx_editeng.cxx b/binfilter/bf_svx/source/editeng/svx_editeng.cxx
index 0a9dfcc..9a9d97f 100644
--- binfilter/bf_svx/source/editeng/svx_editeng.cxx
+++ binfilter/bf_svx/source/editeng/svx_editeng.cxx
@@ -974,7 +974,7 @@ SV_IMPL_VARARR( EECharAttribArray, EECharAttrib );
 /*N*/ 	pImpEditEngine->EraseVirtualDevice();
 /*N*/ }
 
-/*N*/ void EditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 /*N*/ {
 /*N*/ 	DBG_CHKTHIS( EditEngine, 0 );
 /*N*/ 	pImpEditEngine->SetForbiddenCharsTable( xForbiddenChars );
diff --git a/binfilter/bf_svx/source/editeng/svx_eerdll.cxx b/binfilter/bf_svx/source/editeng/svx_eerdll.cxx
index 48eef99..a6fecb8 100644
--- binfilter/bf_svx/source/editeng/svx_eerdll.cxx
+++ binfilter/bf_svx/source/editeng/svx_eerdll.cxx
@@ -209,9 +209,9 @@ namespace binfilter {
 /*N*/ 	return ppDefItems;
 /*N*/ }
 
-/*N*/ vos::ORef<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable()
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable()
 /*N*/ {
-/*N*/ 	if ( !xForbiddenCharsTable.isValid() )
+/*N*/ 	if ( !xForbiddenCharsTable.is() )
 /*N*/ 	{
 /*N*/ 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF = ::legacy_binfilters::getLegacyProcessServiceFactory();
 /*N*/ 		xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF );
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit2.cxx b/binfilter/bf_svx/source/editeng/svx_impedit2.cxx
index f0086b8..0e9ea8f 100644
--- binfilter/bf_svx/source/editeng/svx_impedit2.cxx
+++ binfilter/bf_svx/source/editeng/svx_impedit2.cxx
@@ -2040,15 +2040,15 @@ using namespace ::com::sun::star;
 /*N*/ }
 
 
-/*N*/ vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const
 /*N*/ {
-/*N*/ 	vos::ORef<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
-/*N*/ 	if ( !xF.isValid() && bGetInternal )
+/*N*/ 	rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
+/*N*/ 	if ( !xF.is() && bGetInternal )
 /*N*/ 		xF = EE_DLL()->GetGlobalData()->GetForbiddenCharsTable();
 /*N*/ 	return xF;
 /*N*/ }
 
-/*N*/ void ImpEditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ void ImpEditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 /*N*/ {
 /*N*/ 	EE_DLL()->GetGlobalData()->SetForbiddenCharsTable( xForbiddenChars );
 /*N*/ }
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit3.cxx b/binfilter/bf_svx/source/editeng/svx_impedit3.cxx
index 026ab00..a69427f 100644
--- binfilter/bf_svx/source/editeng/svx_impedit3.cxx
+++ binfilter/bf_svx/source/editeng/svx_impedit3.cxx
@@ -114,12 +114,13 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::linguistic2;
 
+using rtl::OUString;
+
 /*N*/ SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16, 8 )//STRIP008 ;
 /*N*/ SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
 
diff --git a/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx b/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
index 9a70f45..1b5b8c6 100644
--- binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
+++ binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
@@ -49,12 +49,13 @@
 #include "xmlcnitm.hxx"
 namespace binfilter {
 
-using namespace rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml;
 
+using rtl::OUString;
+
 // ------------------------------------------------------------------------
 
 /*N*/ TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem);
diff --git a/binfilter/bf_svx/source/outliner/svx_outlin2.cxx b/binfilter/bf_svx/source/outliner/svx_outlin2.cxx
index a513ba6..1b70586 100644
--- binfilter/bf_svx/source/outliner/svx_outlin2.cxx
+++ binfilter/bf_svx/source/outliner/svx_outlin2.cxx
@@ -313,7 +313,7 @@ using namespace ::com::sun::star::linguistic2;
 /*N*/ 	return pEditEngine->GetEditTextObjectPool();
 /*N*/ }
 
-/*N*/ void Outliner::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 /*N*/ {
 /*N*/ 	DBG_CHKTHIS(Outliner,0);
 /*N*/ 	pEditEngine->SetForbiddenCharsTable( xForbiddenChars );
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
index cc097e5..82af05c 100644
--- binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
+++ binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
@@ -2229,12 +2229,12 @@ using namespace ::com::sun::star;
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
-/*N*/ void SdrModel::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ void SdrModel::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 /*N*/ {
 /*N*/ 	if( mpForbiddenCharactersTable )
 /*N*/ 		mpForbiddenCharactersTable->release();
 /*N*/ 
-/*N*/ 	mpForbiddenCharactersTable = xForbiddenChars.getBodyPtr();
+/*N*/ 	mpForbiddenCharactersTable = xForbiddenChars.get();
 /*N*/ 
 /*N*/ 	if( mpForbiddenCharactersTable )
 /*N*/ 		mpForbiddenCharactersTable->acquire();
@@ -2243,7 +2243,7 @@ using namespace ::com::sun::star;
 /*N*/ 	ImpSetOutlinerDefaults( pHitTestOutliner );
 /*N*/ }
 
-/*N*/ vos::ORef<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const
 /*N*/ {
 /*N*/ 	return mpForbiddenCharactersTable;
 /*N*/ }
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoipset.cxx b/binfilter/bf_svx/source/unodraw/svx_unoipset.cxx
index d951004..e6a9636 100644
--- binfilter/bf_svx/source/unodraw/svx_unoipset.cxx
+++ binfilter/bf_svx/source/unodraw/svx_unoipset.cxx
@@ -51,7 +51,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 //----------------------------------------------------------------------
 
diff --git a/binfilter/bf_svx/source/unodraw/svx_unopage.cxx b/binfilter/bf_svx/source/unodraw/svx_unopage.cxx
index f76f4c6..5a3b9e1 100644
--- binfilter/bf_svx/source/unodraw/svx_unopage.cxx
+++ binfilter/bf_svx/source/unodraw/svx_unopage.cxx
@@ -69,7 +69,6 @@
 namespace binfilter {
 
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -77,6 +76,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::drawing;
 
+using rtl::OUString;
+
 #define INTERFACE_TYPE( xint ) \
 	::getCppuType((const Reference< xint >*)0)
 
diff --git a/binfilter/bf_svx/source/unodraw/svx_unopool.cxx b/binfilter/bf_svx/source/unodraw/svx_unopool.cxx
index 9f5cbe1..3721e9f 100644
--- binfilter/bf_svx/source/unodraw/svx_unopool.cxx
+++ binfilter/bf_svx/source/unodraw/svx_unopool.cxx
@@ -77,9 +77,10 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
 using namespace ::cppu;
 
+using rtl::OUString;
+
 SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw()
 : PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( nServiceId ) ), mpModel( pModel )
 {
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
index e59808d..bf8ed2b 100644
--- binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
+++ binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
@@ -75,13 +75,14 @@ namespace binfilter {
 
 using namespace ::osl;
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 
+using rtl::OUString;
+
 #define INTERFACE_TYPE( xint ) \
 	::getCppuType((const Reference< xint >*)0)
 
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx
index 7f77880..8e26913 100644
--- binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx
+++ binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx
@@ -64,13 +64,14 @@
 namespace binfilter {
 
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 
+using rtl::OUString;
+
 #define INTERFACE_TYPE( xint ) \
 	::getCppuType((const Reference< xint >*)0)
 
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshape.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshape.cxx
index bee0bae..e5a09aa 100644
--- binfilter/bf_svx/source/unodraw/svx_unoshape.cxx
+++ binfilter/bf_svx/source/unodraw/svx_unoshape.cxx
@@ -128,13 +128,14 @@ namespace binfilter {
 
 using namespace ::osl;
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 
+using rtl::OUString;
+
 #define QUERYINT( xint ) \
 	if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
 		aAny <<= uno::Reference< xint >(this)
diff --git a/binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx b/binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx
index a636638..588a333 100644
--- binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx
+++ binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx
@@ -62,7 +62,7 @@ using namespace ::rtl;
 using namespace ::vos;
 using namespace ::cppu;
 
-SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(ORef<SvxForbiddenCharactersTable> xForbiddenChars) :
+SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars) :
 	mxForbiddenChars( xForbiddenChars )
 {
 }
@@ -80,7 +80,7 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Loc
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		throw RuntimeException();
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -96,7 +96,7 @@ sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocal
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		return sal_False;
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -110,7 +110,7 @@ void SvxUnoForbiddenCharsTable::setForbiddenCharacters(const Locale& rLocale, co
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		throw RuntimeException();
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -124,7 +124,7 @@ void SvxUnoForbiddenCharsTable::removeForbiddenCharacters( const Locale& rLocale
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		throw RuntimeException();
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -139,7 +139,7 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales()
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	const sal_Int32 nCount = mxForbiddenChars.isValid() ? mxForbiddenChars->Count() : 0;
+	const sal_Int32 nCount = mxForbiddenChars.is() ? mxForbiddenChars->Count() : 0;
 
 	Sequence< Locale > aLocales( nCount );
 	if( nCount )
diff --git a/binfilter/bf_svx/source/xml/svx_xmlexport.cxx b/binfilter/bf_svx/source/xml/svx_xmlexport.cxx
index da56a2b..1e101d8 100644
--- binfilter/bf_svx/source/xml/svx_xmlexport.cxx
+++ binfilter/bf_svx/source/xml/svx_xmlexport.cxx
@@ -81,10 +81,11 @@
 #include <legacysmgr/legacy_binfilters_smgr.hxx>	//STRIP002 
 #endif
 namespace binfilter {
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+
 /*N*/ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, uno::Reference<io::XOutputStream> xOut, Reference< lang::XComponent > xComponent )
 /*N*/ {
 /*N*/ 	return SvxDrawingLayerExport( pModel, xOut, xComponent, "com.sun.star.comp.DrawingLayer.XMLExporter" );
diff --git a/binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx b/binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx
index 43d9433..eb0ddf9 100644
--- binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx
+++ binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx
@@ -99,9 +99,10 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml::sax;
-using namespace ::rtl;
 using namespace cppu;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 class SvxEditEngineSourceImpl;
diff --git a/binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx b/binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx
index 2fafc3d..7ffe7f9 100644
--- binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx
+++ binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx
@@ -75,10 +75,11 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::text;
-using namespace ::rtl;
 using namespace cppu;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 
 ///////////////////////////////////////////////////////////////////////
 
diff --git a/binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx b/binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx
index 696857a..0115a2a 100644
--- binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx
+++ binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx
@@ -127,9 +127,10 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml::sax;
-using namespace ::rtl;
 using namespace cppu;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 enum SvxXMLTableImportContextEnum { stice_unknown, stice_color, stice_marker, stice_dash, stice_hatch, stice_gradient, stice_bitmap };
diff --git a/binfilter/bf_sw/source/core/doc/sw_docnew.cxx b/binfilter/bf_sw/source/core/doc/sw_docnew.cxx
index c21a94d..c9c66ce 100644
--- binfilter/bf_sw/source/core/doc/sw_docnew.cxx
+++ binfilter/bf_sw/source/core/doc/sw_docnew.cxx
@@ -783,9 +783,9 @@ const sal_Char __FAR_DATA sGrfCollStr[] = "Graphikformatvorlage";
 /*N*/ 	return pUnoCallBack;
 /*N*/ }
 
-/*N*/ vos::ORef < SvxForbiddenCharactersTable > & SwDoc::GetForbiddenCharacterTbl()
+/*N*/ rtl::Reference < SvxForbiddenCharactersTable > & SwDoc::GetForbiddenCharacterTbl()
 /*N*/ {
-/*N*/ 	if( !xForbiddenCharsTable.isValid() )
+/*N*/ 	if( !xForbiddenCharsTable.is() )
 /*N*/ 	{
 /*N*/ 		::com::sun::star::uno::Reference<
 /*N*/ 			::com::sun::star::lang::XMultiServiceFactory > xMSF =
@@ -801,7 +801,7 @@ const sal_Char __FAR_DATA sGrfCollStr[] = "Graphikformatvorlage";
 /*N*/ 							BOOL bLocaleData ) const
 /*N*/ {
 /*N*/ 	const ::com::sun::star::i18n::ForbiddenCharacters* pRet = 0;
-/*N*/ 	if( xForbiddenCharsTable.isValid() )
+/*N*/ 	if( xForbiddenCharsTable.is() )
 /*N*/ 		pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, FALSE );
 /*N*/ 	if( bLocaleData && !pRet && pBreakIt )
 /*N*/ 		pRet = &pBreakIt->GetForbidden( (LanguageType)nLang );
diff --git a/binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx b/binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx
index f0385cf..0a413ce 100644
--- binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx
+++ binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx
@@ -209,7 +209,8 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /*N*/ SV_IMPL_PTRARR(SwColumns,SwColumn*)
 
diff --git a/binfilter/bf_sw/source/core/text/sw_guess.cxx b/binfilter/bf_sw/source/core/text/sw_guess.cxx
index 943f9d1..26d2e05 100644
--- binfilter/bf_sw/source/core/text/sw_guess.cxx
+++ binfilter/bf_sw/source/core/text/sw_guess.cxx
@@ -83,12 +83,13 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::beans;
 
+using rtl::OUString;
+
 #ifdef VERTICAL_LAYOUT
 #define CH_FULL_BLANK 0x3000
 #endif
diff --git a/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx b/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
index e56a1b8..150a335 100644
--- binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
@@ -86,12 +86,13 @@
 namespace binfilter {
 
 
-using namespace rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 
+using rtl::OUString;
+
 // declarations
 void lcl_setPageDesc(SwDoc*, const uno::Any&, SfxItemSet& ); // from unoobj.cxx
 
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unocoll.cxx b/binfilter/bf_sw/source/core/unocore/sw_unocoll.cxx
index b502716..15121dc 100644
--- binfilter/bf_sw/source/core/unocore/sw_unocoll.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unocoll.cxx
@@ -156,7 +156,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::uno;
@@ -164,6 +163,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
+using rtl::OUString;
+
 /******************************************************************************
  *
  ******************************************************************************/
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx b/binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx
index 66665c6..5283a5a 100644
--- binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx
@@ -191,7 +191,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 
 namespace SwUnoCursorHelper
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
index 183e1ab..13c712d 100644
--- binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
@@ -157,7 +157,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::drawing;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 DECLARE_STL_USTRINGACCESS_MAP( Sequence< sal_Int8 > *,  SwShapeImplementationIdMap );
 
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unofield.cxx b/binfilter/bf_sw/source/core/unocore/sw_unofield.cxx
index 4c32393..c684d1a 100644
--- binfilter/bf_sw/source/core/unocore/sw_unofield.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unofield.cxx
@@ -243,7 +243,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 #define COM_TEXT_FLDMASTER		"com.sun.star.text.FieldMaster."
 
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
index d5569b7..8f19b75 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
@@ -269,7 +269,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::drawing;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 using ::com::sun::star::frame::XModel;
 using ::com::sun::star::container::XNameAccess;
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx
index 20161f3..c2235be 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx
@@ -93,7 +93,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /******************************************************************
  *
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
index b4afeee..772722d 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
@@ -152,7 +152,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 //-----------------------------------------------------------------------------
 String lcl_AnyToString(uno::Any rVal) throw(IllegalArgumentException)
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx
index 3e5a66d..ae13510 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx
@@ -334,7 +334,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::drawing;
 
-using namespace ::rtl;
+
+using rtl::OUString;
 
 //collectn.cxx
 //BOOL lcl_IsNumeric(const String&);
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoparagraph.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoparagraph.cxx
index 511c138..c4e827f 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoparagraph.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoparagraph.cxx
@@ -101,7 +101,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 //using namespace ::com::sun::star::drawing;
 
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /******************************************************************
  * SwXParagraph
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoport.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoport.cxx
index d436925..c09f974 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoport.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoport.cxx
@@ -106,7 +106,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 
 /******************************************************************
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoportenum.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoportenum.cxx
index 73b9b52..8610108 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoportenum.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoportenum.cxx
@@ -105,7 +105,8 @@ namespace binfilter {
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /******************************************************************
  *	SwXTextPortionEnumeration
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoredline.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoredline.cxx
index e5b729e..72860f5 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoredline.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoredline.cxx
@@ -110,7 +110,9 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 
 /* ---------------------------------------------------------------------------
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoredlines.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoredlines.cxx
index 2dbefcb..6fedf10 100644
--- binfilter/bf_sw/source/core/unocore/sw_unoredlines.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unoredlines.cxx
@@ -90,7 +90,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /*-- 11.01.01 15:28:54---------------------------------------------------
 
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unorefmk.cxx b/binfilter/bf_sw/source/core/unocore/sw_unorefmk.cxx
index e465f22..2846cee 100644
--- binfilter/bf_sw/source/core/unocore/sw_unorefmk.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unorefmk.cxx
@@ -84,7 +84,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /******************************************************************
  * SwXReferenceMark
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unosect.cxx b/binfilter/bf_sw/source/core/unocore/sw_unosect.cxx
index 09d6efe..9a18a70 100644
--- binfilter/bf_sw/source/core/unocore/sw_unosect.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unosect.cxx
@@ -142,7 +142,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 /******************************************************************
  *
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unosett.cxx b/binfilter/bf_sw/source/core/unocore/sw_unosett.cxx
index b68194d..2271f65 100644
--- binfilter/bf_sw/source/core/unocore/sw_unosett.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unosett.cxx
@@ -185,7 +185,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -193,6 +192,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::style;
 
+using rtl::OUString;
+
 struct PropValData
 {
 	uno::Any 		aVal;
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unosrch.cxx b/binfilter/bf_sw/source/core/unocore/sw_unosrch.cxx
index 29c0b0b..c55364e 100644
--- binfilter/bf_sw/source/core/unocore/sw_unosrch.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unosrch.cxx
@@ -86,7 +86,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 /******************************************************************************
  *
  ******************************************************************************/
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx b/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
index 0501f32..1258a8d 100644
--- binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
@@ -223,8 +223,9 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::container;
-using namespace ::rtl;
 using ::com::sun::star::frame::XModel;
+
+using rtl::OUString;
 /******************************************************************************
  *
  ******************************************************************************/
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx b/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
index 7a5d0cc..2c141d8 100644
--- binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
@@ -235,7 +235,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::chart;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 BOOL lcl_IsNumeric(const String& rStr)
 {
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unotext.cxx b/binfilter/bf_sw/source/core/unocore/sw_unotext.cxx
index 1b140cb..94c50f6 100644
--- binfilter/bf_sw/source/core/unocore/sw_unotext.cxx
+++ binfilter/bf_sw/source/core/unocore/sw_unotext.cxx
@@ -133,7 +133,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 const sal_Char cInvalidObject[] = "this object is invalid";
 /******************************************************************
diff --git a/binfilter/bf_sw/source/filter/xml/sw_swxml.cxx b/binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
index fef4614..6c530e9 100644
--- binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
@@ -154,7 +154,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::lang;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 
 void lcl_EnsureValidPam( SwPaM& rPam )
diff --git a/binfilter/bf_sw/source/filter/xml/sw_wrtxml.cxx b/binfilter/bf_sw/source/filter/xml/sw_wrtxml.cxx
index 51cb5c3..1dc46da 100644
--- binfilter/bf_sw/source/filter/xml/sw_wrtxml.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_wrtxml.cxx
@@ -115,7 +115,6 @@
 #include <legacysmgr/legacy_binfilters_smgr.hxx>	//STRIP002 
 #endif
 namespace binfilter {
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
@@ -123,6 +122,8 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 
+using rtl::OUString;
+
 #define LOGFILE_AUTHOR "mb93740"
 
 SwXMLWriter::SwXMLWriter()
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlbrsh.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlbrsh.cxx
index b95c866..ce0d0cb 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlbrsh.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlbrsh.cxx
@@ -68,11 +68,12 @@
 #include "xmlexpit.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 enum SvXMLTokenMapAttrs
 {
 	XML_TOK_BGIMG_HREF,
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlexp.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlexp.cxx
index ef90577..17ede8d 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlexp.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlexp.cxx
@@ -180,7 +180,6 @@
 
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml::sax;
@@ -194,6 +193,9 @@ using namespace ::com::sun::star::form;
 using namespace ::com::sun::star::i18n;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 #ifdef XML_CORE_API
 void SwXMLExport::SetCurPaM( SwPaM& rPaM, sal_Bool bWhole, sal_Bool bTabOnly )
 {
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlfmt.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlfmt.cxx
index 181a89d..1cc8eb4 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlfmt.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlfmt.cxx
@@ -162,9 +162,11 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
-using namespace ::rtl;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 class SwXMLConditionParser_Impl
 {
 	OUString sInput;
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx
index 846d615..a193ff6 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx
@@ -114,7 +114,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -122,6 +121,8 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::lang;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
 {
 	// <style:style ...>
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx
index dd2fb03..be2d6b8 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx
@@ -168,7 +168,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -179,6 +178,8 @@ using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::drawing;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 struct OUStringEquals
 {
 	sal_Bool operator()( const ::rtl::OUString &r1,
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlitemi.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlitemi.cxx
index 40aaf30..806afb5 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlitemi.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlitemi.cxx
@@ -114,10 +114,11 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+
 extern SvXMLItemMapEntry aXMLTableItemMap[];
 extern SvXMLItemMapEntry aXMLTableColItemMap[];
 extern SvXMLItemMapEntry aXMLTableRowItemMap[];
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlmeta.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlmeta.cxx
index 8c90f01..0878222 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmlmeta.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmlmeta.cxx
@@ -107,13 +107,15 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::text;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 // ---------------------------------------------------------------------
 
 #if 0
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltble.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltble.cxx
index 4dca43c..411b970 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmltble.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmltble.cxx
@@ -153,7 +153,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
@@ -162,6 +161,9 @@ using namespace ::com::sun::star::container;
 using namespace ::binfilter::xmloff::token;
 using ::com::sun::star::table::XCell;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 class SwXMLTableColumn_Impl : public SwWriteTableCol
 {
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx
index fe3213e..1809985 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx
@@ -161,7 +161,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -172,6 +171,8 @@ using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 using ::std::hash_map;
 
+using rtl::OUString;
+
 enum SwXMLTableElemTokens
 {
 	XML_TOK_TABLE_HEADER_COLS,
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltext.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltext.cxx
index e9c1879..74d06ea 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmltext.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmltext.cxx
@@ -44,11 +44,12 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 
+using rtl::OUString;
+
 // ---------------------------------------------------------------------
 
 class SwXMLBodyContext_Impl : public SvXMLImportContext
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
index 5f90324..2b86812 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
@@ -103,7 +103,6 @@
 #include "so3/staticbaseurl.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
@@ -111,6 +110,9 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::document;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 enum SvEmbeddedObjectTypes
 {
     SV_EMBEDDED_OWN,
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx
index 0da1866..a0495c8 100644
--- binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx
+++ binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx
@@ -137,7 +137,6 @@ namespace binfilter {
  
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -146,6 +145,9 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 struct XMLServiceMapEntry_Impl
 {
diff --git a/binfilter/bf_sw/source/ui/dochdl/sw_swdtflvr.cxx b/binfilter/bf_sw/source/ui/dochdl/sw_swdtflvr.cxx
index b005c37..ae100a7 100644
--- binfilter/bf_sw/source/ui/dochdl/sw_swdtflvr.cxx
+++ binfilter/bf_sw/source/ui/dochdl/sw_swdtflvr.cxx
@@ -118,7 +118,6 @@ extern BOOL bExecuteDrag;
 #define SWTRANSFER_OBJECTTYPE_DDE				0x00000020
 
 using namespace ::binfilter::svx;
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::datatransfer;
 
diff --git a/binfilter/bf_sw/source/ui/uno/sw_SwXDocumentSettings.cxx b/binfilter/bf_sw/source/ui/uno/sw_SwXDocumentSettings.cxx
index cb78aec..0e6da96 100644
--- binfilter/bf_sw/source/ui/uno/sw_SwXDocumentSettings.cxx
+++ binfilter/bf_sw/source/ui/uno/sw_SwXDocumentSettings.cxx
@@ -111,7 +111,6 @@
 namespace binfilter {
 
 
-using namespace rtl;
 using namespace comphelper;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -119,6 +118,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::i18n;
 
+using rtl::OUString;
+
 enum SwDocumentSettingsPropertyHandles
 {
 	HANDLE_FORBIDDEN_CHARS,
diff --git a/binfilter/bf_sw/source/ui/uno/sw_unotxdoc.cxx b/binfilter/bf_sw/source/ui/uno/sw_unotxdoc.cxx
index 6a73f15..6c8faca 100644
--- binfilter/bf_sw/source/ui/uno/sw_unotxdoc.cxx
+++ binfilter/bf_sw/source/ui/uno/sw_unotxdoc.cxx
@@ -3074,7 +3074,7 @@ void SwXDocumentPropertyHelper::Invalidate()
 	xMarkerTable = 0;
 	xDrawDefaults = 0;
 	m_pDoc = 0;
-	SvxUnoForbiddenCharsTable::mxForbiddenChars.unbind();
+	SvxUnoForbiddenCharsTable::mxForbiddenChars.clear();
 }
 
 }
diff --git a/binfilter/bf_sw/util/makefile.mk b/binfilter/bf_sw/util/makefile.mk
index 30d46fa..f3ef542 100644
--- binfilter/bf_sw/util/makefile.mk
+++ binfilter/bf_sw/util/makefile.mk
@@ -121,6 +121,7 @@ SHL2STDLIBS+= \
 	$(CPPULIB) \
 	$(VOSLIB) \
 	$(SALLIB) \
+	$(SALHELPERLIB) \
     $(ICUUCLIB)
 
 
diff --git a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx
index 2204fe2..1f622aa 100644
--- binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx
+++ binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx
@@ -101,11 +101,13 @@
 #include    "PropertyMap.hxx"
 namespace binfilter {
 
-using namespace rtl;
 using namespace ::com::sun::star;
 using namespace ::binfilter::xmloff::token;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 using ::rtl::OUString;
 
 struct SchXMLDataPointStruct
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx
index 1796370..c899b54 100644
--- binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx
+++ binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx
@@ -55,7 +55,9 @@ namespace binfilter {
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::io;
-using namespace ::rtl;
+
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 #define INPUT_BUFFER_SIZE 54
 #define OUTPUT_BUFFER_SIZE 72
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
index f0be225..860d4bd 100644
--- binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
+++ binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
@@ -49,11 +49,12 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::io;
 
+using rtl::OUString;
+
 //-----------------------------------------------------------------------------
 
 TYPEINIT1( XMLBase64ImportContext, SvXMLImportContext );
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx
index d23ba02..a2de0a6 100644
--- binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx
+++ binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx
@@ -70,7 +70,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::beans;
@@ -80,6 +79,8 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 struct XMLServiceMapEntry_Impl
 {
 	enum XMLTokenEnum eClass;
diff --git a/binfilter/bf_xmloff/source/core/xmloff_nmspmap.cxx b/binfilter/bf_xmloff/source/core/xmloff_nmspmap.cxx
index 63ab2be..98fbefa 100644
--- binfilter/bf_xmloff/source/core/xmloff_nmspmap.cxx
+++ binfilter/bf_xmloff/source/core/xmloff_nmspmap.cxx
@@ -266,7 +266,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName,
     NameSpaceHash::const_iterator aIter = aNameCache.find ( rAttrName );
     if ( aIter != aNameCache.end() )
 	{
-        const NameSpaceEntry &rEntry = (*aIter).second.getBody();
+        const NameSpaceEntry &rEntry = *((*aIter).second);
         if ( pPrefix )
             *pPrefix = rEntry.sPrefix;
         if ( pLocalName )
diff --git a/binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx b/binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx
index 00a3168..ff9e5c5 100644
--- binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx
+++ binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx
@@ -147,7 +147,6 @@
 #include "so3/staticbaseurl.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::osl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -160,6 +159,9 @@ using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::io;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 sal_Char __READONLY_DATA sXML_1_0[] = "1.0";
 
 #define LOGFILE_AUTHOR "mb93740"
diff --git a/binfilter/bf_xmloff/source/core/xmloff_xmlimp.cxx b/binfilter/bf_xmloff/source/core/xmloff_xmlimp.cxx
index c50955d..bbdadd5 100644
--- binfilter/bf_xmloff/source/core/xmloff_xmlimp.cxx
+++ binfilter/bf_xmloff/source/core/xmloff_xmlimp.cxx
@@ -115,7 +115,6 @@
 #include "so3/staticbaseurl.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::osl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -126,6 +125,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::document;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 sal_Char __READONLY_DATA sXML_np__office[] = "_office";
 sal_Char __READONLY_DATA sXML_np__style[] = "_style";
 sal_Char __READONLY_DATA sXML_np__text[] = "_text";
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_XMLGraphicsDefaultStyle.cxx b/binfilter/bf_xmloff/source/draw/xmloff_XMLGraphicsDefaultStyle.cxx
index 8d83780..9458f0e 100644
--- binfilter/bf_xmloff/source/draw/xmloff_XMLGraphicsDefaultStyle.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_XMLGraphicsDefaultStyle.cxx
@@ -55,13 +55,14 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 using ::binfilter::xmloff::token::IsXMLToken;
 using ::binfilter::xmloff::token::XML_PROPERTIES;
 
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_XMLShapePropertySetContext.cxx b/binfilter/bf_xmloff/source/draw/xmloff_XMLShapePropertySetContext.cxx
index 37bc09b..de27cd6 100644
--- binfilter/bf_xmloff/source/draw/xmloff_XMLShapePropertySetContext.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_XMLShapePropertySetContext.cxx
@@ -54,10 +54,11 @@
 #include "sdpropls.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 TYPEINIT1( XMLShapePropertySetContext, SvXMLPropertySetContext );
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_XMLShapeStyleContext.cxx b/binfilter/bf_xmloff/source/draw/xmloff_XMLShapeStyleContext.cxx
index 0f12c3b..f833342 100644
--- binfilter/bf_xmloff/source/draw/xmloff_XMLShapeStyleContext.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_XMLShapeStyleContext.cxx
@@ -66,12 +66,13 @@
 
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using ::binfilter::xmloff::token::IsXMLToken;
 using ::binfilter::xmloff::token::XML_PROPERTIES;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 TYPEINIT1( XMLShapeStyleContext, XMLPropStyleContext );
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_animexp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_animexp.cxx
index 8bea437..ed0cf45 100644
--- binfilter/bf_xmloff/source/draw/xmloff_animexp.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_animexp.cxx
@@ -67,7 +67,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -78,6 +77,9 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::presentation;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 const struct Effect
 {
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_animimp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_animimp.cxx
index ebc46d1..f446228 100644
--- binfilter/bf_xmloff/source/draw/xmloff_animimp.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_animimp.cxx
@@ -74,7 +74,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -87,6 +86,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::presentation;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[] =
 {
 	{ XML_NONE,		    EK_none },
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_eventimp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_eventimp.cxx
index 5289f00..67be3fb 100644
--- binfilter/bf_xmloff/source/draw/xmloff_eventimp.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_eventimp.cxx
@@ -79,7 +79,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -94,6 +93,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 SvXMLEnumMapEntry __READONLY_DATA aXML_EventActions_EnumMap[] =
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_layerexp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_layerexp.cxx
index c72d4f7..d85d32a 100644
--- binfilter/bf_xmloff/source/draw/xmloff_layerexp.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_layerexp.cxx
@@ -56,7 +56,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -66,6 +65,9 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
 {
 	Reference< XLayerSupplier > xLayerSupplier( rExport.GetModel(), UNO_QUERY );
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_layerimp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_layerimp.cxx
index 33dbda2..050b3dc 100644
--- binfilter/bf_xmloff/source/draw/xmloff_layerimp.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_layerimp.cxx
@@ -62,7 +62,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -76,6 +75,8 @@ using namespace ::com::sun::star::container;
 using ::binfilter::xmloff::token::IsXMLToken;
 using ::binfilter::xmloff::token::XML_NAME;
 
+using rtl::OUString;
+
 
 TYPEINIT1( SdXMLLayerSetContext, SvXMLImportContext );
 
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx
index 779881b..05c6ad5 100644
--- binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx
@@ -154,7 +154,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -163,6 +162,9 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::presentation;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_shapeimport.cxx b/binfilter/bf_xmloff/source/draw/xmloff_shapeimport.cxx
index 146792d..261e6a4 100644
--- binfilter/bf_xmloff/source/draw/xmloff_shapeimport.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_shapeimport.cxx
@@ -208,7 +208,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
 
 /*
 	// chain form attributes
-	const UniReference< SvXMLImportPropertyMapper> xFormMapper( rImporter.GetFormImport()->getStylePropertyMapper().getBodyPtr() );
+	const UniReference< SvXMLImportPropertyMapper> xFormMapper( rImporter.GetFormImport()->getStylePropertyMapper().get() );
 	mpPropertySetMapper->ChainImportMapper(xFormMapper);
 */
 
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_ximpshow.cxx b/binfilter/bf_xmloff/source/draw/xmloff_ximpshow.cxx
index 5138732..2464b70 100644
--- binfilter/bf_xmloff/source/draw/xmloff_ximpshow.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_ximpshow.cxx
@@ -74,7 +74,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -89,6 +88,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 class ShowsImpImpl
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx b/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
index a85ddd3..dbe58c9 100644
--- binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
+++ binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
@@ -119,12 +119,13 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 class SdXMLDrawingPagePropertySetContext : public SvXMLPropertySetContext
diff --git a/binfilter/bf_xmloff/source/forms/callbacks.hxx b/binfilter/bf_xmloff/source/forms/callbacks.hxx
index e7bb194..fea3d83 100644
--- binfilter/bf_xmloff/source/forms/callbacks.hxx
+++ binfilter/bf_xmloff/source/forms/callbacks.hxx
@@ -48,8 +48,8 @@
 #ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_
 #include <com/sun/star/script/ScriptEventDescriptor.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 namespace binfilter {
 
@@ -72,7 +72,7 @@ namespace xmloff
 	{
 	public:
 		virtual SvXMLExport&								getGlobalContext() = 0;
-		virtual ::vos::ORef< SvXMLExportPropertyMapper >	getStylePropertyMapper() = 0;
+		virtual ::rtl::Reference< SvXMLExportPropertyMapper >	getStylePropertyMapper() = 0;
 
 		/** steps through a collection and exports all children of this collection
 		*/
diff --git a/binfilter/bf_xmloff/source/forms/controlpropertyhdl.hxx b/binfilter/bf_xmloff/source/forms/controlpropertyhdl.hxx
index 4de6c1b..cc2a001 100644
--- binfilter/bf_xmloff/source/forms/controlpropertyhdl.hxx
+++ binfilter/bf_xmloff/source/forms/controlpropertyhdl.hxx
@@ -39,8 +39,8 @@
 #ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
 #include "prhdlfac.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _RTL_USTRING_HXX_
 #include <rtl/ustring.hxx>
diff --git a/binfilter/bf_xmloff/source/forms/layerexport.hxx b/binfilter/bf_xmloff/source/forms/layerexport.hxx
index 77287b6..5d82e05 100644
--- binfilter/bf_xmloff/source/forms/layerexport.hxx
+++ binfilter/bf_xmloff/source/forms/layerexport.hxx
@@ -80,8 +80,8 @@ namespace xmloff
 		PropertySetBag		m_aIgnoreList;
 
 		// style handling
-		::vos::ORef< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
-		::vos::ORef< SvXMLExportPropertyMapper >	m_xExportMapper;
+		::rtl::Reference< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
+		::rtl::Reference< SvXMLExportPropertyMapper >	m_xExportMapper;
 
 		// we need our own number formats supplier:
 		// Controls which have a number formats do not work with the formats supplier of the document they reside
@@ -185,7 +185,7 @@ namespace xmloff
 		virtual SvXMLExport&								getGlobalContext();
 		virtual ::rtl::OUString								getObjectStyleName(
 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject );
-		virtual ::vos::ORef< SvXMLExportPropertyMapper >	getStylePropertyMapper();
+		virtual ::rtl::Reference< SvXMLExportPropertyMapper >	getStylePropertyMapper();
 
 		/** clear any structures which have been build in the recent <method>examine</method> calls.
 		*/
diff --git a/binfilter/bf_xmloff/source/forms/layerimport.hxx b/binfilter/bf_xmloff/source/forms/layerimport.hxx
index 947e339..d21abb6 100644
--- binfilter/bf_xmloff/source/forms/layerimport.hxx
+++ binfilter/bf_xmloff/source/forms/layerimport.hxx
@@ -40,8 +40,8 @@
 #include <com/sun/star/xml/sax/XAttributeList.hpp>
 #endif
 #include <com/sun/star/container/XNameContainer.hpp>
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _XMLOFF_FORMATTRIBUTES_HXX_
 #include "formattributes.hxx"
@@ -115,8 +115,8 @@ namespace xmloff
 
 	protected:
 		// style handling
-		::vos::ORef< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
-		::vos::ORef< SvXMLImportPropertyMapper >	m_xImportMapper;
+		::rtl::Reference< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
+		::rtl::Reference< SvXMLImportPropertyMapper >	m_xImportMapper;
 
 		DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >, MapString2PropertySet );
 		DECLARE_STL_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >, MapString2PropertySet, ODrawPageCompare, MapDrawPage2Map);
@@ -171,7 +171,7 @@ namespace xmloff
 
 		/** retrieves the property mapper form form related auto styles.
 		*/
-		::vos::ORef< SvXMLImportPropertyMapper > getStylePropertyMapper() const;
+		::rtl::Reference< SvXMLImportPropertyMapper > getStylePropertyMapper() const;
 
 		/** start importing the forms of the given page
 		*/
diff --git a/binfilter/bf_xmloff/source/forms/propertyimport.hxx b/binfilter/bf_xmloff/source/forms/propertyimport.hxx
index fa5bbee..592eb86 100644
--- binfilter/bf_xmloff/source/forms/propertyimport.hxx
+++ binfilter/bf_xmloff/source/forms/propertyimport.hxx
@@ -42,8 +42,8 @@
 #ifndef _XMLOFF_FORMATTRIBUTES_HXX_
 #include "formattributes.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _COMPHELPER_STLTYPES_HXX_
diff --git a/binfilter/bf_xmloff/source/forms/xmloff_formlayerimport.cxx b/binfilter/bf_xmloff/source/forms/xmloff_formlayerimport.cxx
index c052027..17b5a5d 100644
--- binfilter/bf_xmloff/source/forms/xmloff_formlayerimport.cxx
+++ binfilter/bf_xmloff/source/forms/xmloff_formlayerimport.cxx
@@ -71,7 +71,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLImportPropertyMapper > OFormLayerXMLImport::getStylePropertyMapper() const
+	::rtl::Reference< SvXMLImportPropertyMapper > OFormLayerXMLImport::getStylePropertyMapper() const
 	{
 		return m_pImpl->getStylePropertyMapper();
 	}
diff --git a/binfilter/bf_xmloff/source/forms/xmloff_layerexport.cxx b/binfilter/bf_xmloff/source/forms/xmloff_layerexport.cxx
index b568bb7..04701f8 100644
--- binfilter/bf_xmloff/source/forms/xmloff_layerexport.cxx
+++ binfilter/bf_xmloff/source/forms/xmloff_layerexport.cxx
@@ -113,14 +113,14 @@ namespace xmloff
 
 		// add our style family to the export context's style pool
 		m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
-		::vos::ORef< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.getBodyPtr() );
-		m_xExportMapper = new OFormExportPropertyMapper( xStylePropertiesMapper.getBodyPtr() );
+		::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get() );
+		m_xExportMapper = new OFormExportPropertyMapper( xStylePropertiesMapper.get() );
 
 		// our style family
 		m_rContext.GetAutoStylePool()->AddFamily(
 			XML_STYLE_FAMILY_CONTROL_ID,
 			::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_CONTROL_NAME ) ),
-			m_xExportMapper.getBodyPtr(),
+			m_xExportMapper.get(),
 			::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_CONTROL_PREFIX) )
 		);
 
@@ -194,7 +194,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLExportPropertyMapper > OFormLayerXMLExport_Impl::getStylePropertyMapper()
+	::rtl::Reference< SvXMLExportPropertyMapper > OFormLayerXMLExport_Impl::getStylePropertyMapper()
 	{
 		return m_xExportMapper;
 	}
diff --git a/binfilter/bf_xmloff/source/forms/xmloff_layerimport.cxx b/binfilter/bf_xmloff/source/forms/xmloff_layerimport.cxx
index 6d2e49b..7c8b967 100644
--- binfilter/bf_xmloff/source/forms/xmloff_layerimport.cxx
+++ binfilter/bf_xmloff/source/forms/xmloff_layerimport.cxx
@@ -270,8 +270,8 @@ namespace xmloff
 
 		// initialize our style map
 		m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
-		::vos::ORef< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper(getControlStylePropertyMap(), m_xPropertyHandlerFactory.getBodyPtr());
-		m_xImportMapper = new SvXMLImportPropertyMapper(xStylePropertiesMapper.getBodyPtr(), _rImporter);
+		::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper(getControlStylePropertyMap(), m_xPropertyHandlerFactory.get());
+		m_xImportMapper = new SvXMLImportPropertyMapper(xStylePropertiesMapper.get(), _rImporter);
 
 		// 'initialize'
 		m_aCurrentPageIds = m_aControlIds.end();
@@ -446,7 +446,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLImportPropertyMapper > OFormLayerXMLImport_Impl::getStylePropertyMapper() const
+	::rtl::Reference< SvXMLImportPropertyMapper > OFormLayerXMLImport_Impl::getStylePropertyMapper() const
 	{
 		return m_xImportMapper;
 	}
diff --git a/binfilter/bf_xmloff/source/script/xmloff_xmlscripti.cxx b/binfilter/bf_xmloff/source/script/xmloff_xmlscripti.cxx
index 03c09df..0e30290 100644
--- binfilter/bf_xmloff/source/script/xmloff_xmlscripti.cxx
+++ binfilter/bf_xmloff/source/script/xmloff_xmlscripti.cxx
@@ -46,7 +46,6 @@
 #include <com/sun/star/document/XEventsSupplier.hpp>
 namespace binfilter {
 
-using namespace rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -56,6 +55,8 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 
 //-------------------------------------------------------------------------
 
diff --git a/binfilter/bf_xmloff/source/style/xmloff_XMLBackgroundImageContext.cxx b/binfilter/bf_xmloff/source/style/xmloff_XMLBackgroundImageContext.cxx
index 9e3c28f..5a0d6ab 100644
--- binfilter/bf_xmloff/source/style/xmloff_XMLBackgroundImageContext.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_XMLBackgroundImageContext.cxx
@@ -59,13 +59,14 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::io;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 enum SvXMLTokenMapAttrs
 {
 	XML_TOK_BGIMG_HREF,
diff --git a/binfilter/bf_xmloff/source/style/xmloff_XMLFontStylesContext.cxx b/binfilter/bf_xmloff/source/style/xmloff_XMLFontStylesContext.cxx
index fe90383..ea437ff 100644
--- binfilter/bf_xmloff/source/style/xmloff_XMLFontStylesContext.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_XMLFontStylesContext.cxx
@@ -58,7 +58,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -68,6 +67,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::awt;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 
 #define XML_STYLE_FAMILY_FONT 1
 
diff --git a/binfilter/bf_xmloff/source/style/xmloff_XMLPageExport.cxx b/binfilter/bf_xmloff/source/style/xmloff_XMLPageExport.cxx
index 218bd9e..fdba7e1 100644
--- binfilter/bf_xmloff/source/style/xmloff_XMLPageExport.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_XMLPageExport.cxx
@@ -71,7 +71,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -79,6 +78,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 
 //______________________________________________________________________________
 
diff --git a/binfilter/bf_xmloff/source/style/xmloff_prstylei.cxx b/binfilter/bf_xmloff/source/style/xmloff_prstylei.cxx
index 72553e6..d0d61cf 100644
--- binfilter/bf_xmloff/source/style/xmloff_prstylei.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_prstylei.cxx
@@ -64,7 +64,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -74,6 +73,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 
 void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
 										const OUString& rLocalName,
diff --git a/binfilter/bf_xmloff/source/style/xmloff_styleexp.cxx b/binfilter/bf_xmloff/source/style/xmloff_styleexp.cxx
index 43a3e69..e93ab33 100644
--- binfilter/bf_xmloff/source/style/xmloff_styleexp.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_styleexp.cxx
@@ -73,12 +73,13 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
+
+using rtl::OUString;
 //using namespace ::com::sun::star::text;
 using namespace ::binfilter::xmloff::token;
 
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlexppr.cxx b/binfilter/bf_xmloff/source/style/xmloff_xmlexppr.cxx
index ca08965..2a04ec0 100644
--- binfilter/bf_xmloff/source/style/xmloff_xmlexppr.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_xmlexppr.cxx
@@ -75,7 +75,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
@@ -83,6 +82,9 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 ///////////////////////////////////////////////////////////////////////////////
 //
 // public methods
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlimppr.cxx b/binfilter/bf_xmloff/source/style/xmloff_xmlimppr.cxx
index c3722e3..bb0956d 100644
--- binfilter/bf_xmloff/source/style/xmloff_xmlimppr.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_xmlimppr.cxx
@@ -78,7 +78,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::xml;
 using namespace ::com::sun::star::xml::sax;
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::binfilter::xmloff::token;
 using ::com::sun::star::lang::IllegalArgumentException;
@@ -86,6 +85,9 @@ using ::com::sun::star::lang::WrappedTargetException;
 using ::com::sun::star::beans::UnknownPropertyException;
 using ::com::sun::star::beans::PropertyVetoException;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 SvXMLImportPropertyMapper::SvXMLImportPropertyMapper(
         const UniReference< XMLPropertySetMapper >& rMapper,
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlnume.cxx b/binfilter/bf_xmloff/source/style/xmloff_xmlnume.cxx
index ae70f45..f6447cd 100644
--- binfilter/bf_xmloff/source/style/xmloff_xmlnume.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_xmlnume.cxx
@@ -96,7 +96,6 @@
 #include "so3/staticbaseurl.hxx"
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -105,6 +104,9 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance";
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering";
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName";
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlnumi.cxx b/binfilter/bf_xmloff/source/style/xmloff_xmlnumi.cxx
index 5e1ca89..d182c90 100644
--- binfilter/bf_xmloff/source/style/xmloff_xmlnumi.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_xmlnumi.cxx
@@ -85,7 +85,6 @@
 #define _SVSTDARR_USHORTS
 #include <svtools/svstdarr.hxx>
 namespace binfilter {
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -97,6 +96,9 @@ using namespace ::com::sun::star::frame;
 using namespace ::binfilter::xmloff::token;
 using namespace ::com::sun::star::io;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] =
 		"SymbolTextDistance";
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] =
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlstyle.cxx b/binfilter/bf_xmloff/source/style/xmloff_xmlstyle.cxx
index cbcc98f..03a4352 100644
--- binfilter/bf_xmloff/source/style/xmloff_xmlstyle.cxx
+++ binfilter/bf_xmloff/source/style/xmloff_xmlstyle.cxx
@@ -103,13 +103,14 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::style;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 // ---------------------------------------------------------------------
 
 static __FAR_DATA SvXMLTokenMapEntry aStyleStylesElemTokenMap[] =
@@ -794,7 +795,7 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty
 #ifndef SVX_LIGHT
 #if SUPD>615 || defined(PRIV_DEBUG)
 	case XML_STYLE_FAMILY_CONTROL_ID:
-		xMapper = const_cast<SvXMLImport&>(GetImport()).GetFormImport()->getStylePropertyMapper().getBodyPtr();
+		xMapper = const_cast<SvXMLImport&>(GetImport()).GetFormImport()->getStylePropertyMapper().get();
 		break;
 #endif
 #endif // #ifndef SVX_LIGHT
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLCalculationSettingsContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLCalculationSettingsContext.cxx
index a08b0fe..7f4ef9b 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLCalculationSettingsContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLCalculationSettingsContext.cxx
@@ -54,12 +54,13 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 XMLCalculationSettingsContext::XMLCalculationSettingsContext( SvXMLImport& rImport, 
 									sal_uInt16 nPrefix,
 									const ::rtl::OUString& rLocalName,
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteConfigurationImportContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteConfigurationImportContext.cxx
index aec70cc..bf80b6e 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteConfigurationImportContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteConfigurationImportContext.cxx
@@ -83,7 +83,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
@@ -91,6 +90,9 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 //
 //  XMLFootnoteConfigHelper
 //
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteImportContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteImportContext.cxx
index 5b4623c..cd3e7d3 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteImportContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLFootnoteImportContext.cxx
@@ -76,7 +76,6 @@ namespace binfilter {
 
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::lang;
@@ -84,6 +83,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1(XMLFootnoteImportContext, SvXMLImportContext);
 
 const sal_Char sAPI_service_footnote[] = "com.sun.star.text.Footnote";
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsContext.cxx
index baae19b..89e8d79 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsContext.cxx
@@ -59,7 +59,6 @@
 #include <svtools/svstdarr.hxx>
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -68,6 +67,8 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 enum SvXMLTokenMapAttrs
 {
 	XML_TOK_COLUMN_WIDTH,
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsExport.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsExport.cxx
index e007c5b..f3b16eb 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsExport.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextColumnsExport.cxx
@@ -63,9 +63,11 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
 	rExport( rExp ),
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
index fa0898f..2ae8e48 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
@@ -114,7 +114,6 @@ namespace binfilter {
 
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -127,6 +126,8 @@ using namespace ::com::sun::star::document;
 using namespace ::binfilter::xmloff::token;
 using ::com::sun::star::document::XEventsSupplier;
 
+using rtl::OUString;
+
 class XMLTextFrameContextHyperlink_Impl
 {
 	OUString sHRef;
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameHyperlinkContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameHyperlinkContext.cxx
index 87b2f77..4ea0421 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameHyperlinkContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameHyperlinkContext.cxx
@@ -53,13 +53,14 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::beans;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLTextFrameHyperlinkContext, SvXMLImportContext );
 
 XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext(
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextHeaderFooterContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextHeaderFooterContext.cxx
index 1756adf..01acadc 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextHeaderFooterContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextHeaderFooterContext.cxx
@@ -45,10 +45,11 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
+
+using rtl::OUString;
 //using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextListAutoStylePool.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextListAutoStylePool.cxx
index 5e13121..167c819 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextListAutoStylePool.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextListAutoStylePool.cxx
@@ -61,13 +61,15 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::style;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 int XMLTextListAutoStylePoolNameCmp_Impl( const OUString& r1,
 									 	  const OUString& r2 )
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextListBlockContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextListBlockContext.cxx
index d3338c8..a1711d4 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextListBlockContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextListBlockContext.cxx
@@ -59,7 +59,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
@@ -67,6 +66,8 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLTextListBlockContext, SvXMLImportContext );
 
 XMLTextListBlockContext::XMLTextListBlockContext(
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextListItemContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextListItemContext.cxx
index 7c154f2..59e7de8 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextListItemContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextListItemContext.cxx
@@ -59,11 +59,12 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLTextListItemContext, SvXMLImportContext );
 
 XMLTextListItemContext::XMLTextListItemContext(
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx
index ade5035..a1d2bed 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx
@@ -72,7 +72,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -80,6 +79,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
+
+using rtl::OUString;
 	
 TYPEINIT1( XMLTextMarkImportContext, SvXMLImportContext);
 
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageContext.cxx
index 23a34d6..f23f6c7 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageContext.cxx
@@ -54,7 +54,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -63,6 +62,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
+
+using rtl::OUString;
 //using namespace ::com::sun::star::text;
 using namespace ::binfilter::xmloff::token;
 
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageExport.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageExport.cxx
index 4f78bc0..b2c3582 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageExport.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterPageExport.cxx
@@ -56,7 +56,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx
index 9a15dd3..206b684 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx
@@ -50,10 +50,11 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 using ::binfilter::xmloff::token::IsXMLToken;
 using ::binfilter::xmloff::token::XML_MASTER_PAGE;
 
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx
index fee4927..d7a3a9b 100644
--- binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx
@@ -58,7 +58,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::drawing;
@@ -67,6 +66,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 XMLTextShapeImportHelper::XMLTextShapeImportHelper(
 		SvXMLImport& rImp ) :
 	XMLShapeImportHelper( rImp, rImp.GetModel(),
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtdropi.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtdropi.cxx
index f20a38f..9a541d1 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtdropi.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtdropi.cxx
@@ -53,12 +53,13 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 
 enum SvXMLTokenMapDropAttrs
 {
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtexppr.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtexppr.cxx
index 4ab254c..455e8fd 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtexppr.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtexppr.cxx
@@ -73,7 +73,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -81,6 +80,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::awt;
 
+using rtl::OUString;
+
 void XMLTextExportPropertySetMapper::handleElementItem(
         SvXMLExport& rExport,
 		const XMLPropertyState& rProperty,
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtflde.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtflde.cxx
index 017f121..0df2719 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtflde.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtflde.cxx
@@ -163,7 +163,6 @@
 #include <vector>
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -176,6 +175,9 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::container;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 static sal_Char __READONLY_DATA FIELD_SERVICE_SENDER[] = "ExtendedUser";
 static sal_Char __READONLY_DATA FIELD_SERVICE_AUTHOR[] = "Author";
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
index 9dd9d1d..58c81c2 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtfldi.cxx
@@ -148,7 +148,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -159,6 +158,9 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 //
 // SO API string constants
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtftne.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtftne.cxx
index 303cfb1..7fd89cc 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtftne.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtftne.cxx
@@ -92,7 +92,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -101,6 +100,9 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 void XMLTextParagraphExport::exportTextFootnote(
 	const Reference<XPropertySet> & rPropSet,
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx
index eb5d8db..9f8e04c 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx
@@ -137,7 +137,6 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -152,6 +151,9 @@ using namespace ::binfilter::xmloff::token;
 using ::com::sun::star::util::DateTime;
 using namespace ::com::sun::star::ucb;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 #if SUPD > 632 || DVO_TEST
 using ::comphelper::UStringLess;
 #endif
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx
index 50a8398..35ab30c 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtparae.cxx
@@ -156,7 +156,6 @@
 namespace binfilter {
 
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -170,6 +169,9 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::frame;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 typedef OUString *OUStringPtr;
 SV_DECL_PTRARR_DEL( OUStrings_Impl, OUStringPtr, 20, 10 )
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtparai.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtparai.cxx
index a956371..11c65c2 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtparai.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtparai.cxx
@@ -86,13 +86,15 @@
 #endif
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::drawing;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 // ---------------------------------------------------------------------
 
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx
index c6b449b..a1db8fa 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtstyle.cxx
@@ -73,7 +73,6 @@ namespace binfilter {
 //#include "styleexp.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -81,6 +80,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+
 void XMLTextParagraphExport::exportStyleAttributes(
 		const ::com::sun::star::uno::Reference<
 				::com::sun::star::style::XStyle > & rStyle )
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtstyli.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtstyli.cxx
index 872ae75..44803c4 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtstyli.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtstyli.cxx
@@ -75,7 +75,6 @@
 #include <vector>
 namespace binfilter {
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -85,6 +84,8 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
+
+using rtl::OUString;
 //using namespace ::com::sun::star::text;
 using namespace ::binfilter::xmloff::token;
 
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
index 7e9dcf7..e8e4661 100644
--- binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
+++ binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
@@ -125,7 +125,6 @@ static const sal_Char sAPI_sequence_value[]		= "SequenceValue";
 static const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage";
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -133,6 +132,9 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::style;
 using namespace ::binfilter::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 
 //
diff --git a/binfilter/bf_xmloff/util/makefile.mk b/binfilter/bf_xmloff/util/makefile.mk
index 405154e..33e194a 100644
--- binfilter/bf_xmloff/util/makefile.mk
+++ binfilter/bf_xmloff/util/makefile.mk
@@ -83,6 +83,7 @@ SHL1STDLIBS= \
 		$(TKLIB)		\
 		$(SVLLIB)		\
 		$(SALLIB)		\
+		$(SALHELPERLIB)		\
 		$(UNOTOOLSLIB)	\
         $(BFGOODIESLIB) \
         $(SO2LIB)
diff --git a/binfilter/inc/bf_sc/document.hxx b/binfilter/inc/bf_sc/document.hxx
index 68a7352..df4fa87 100644
--- binfilter/inc/bf_sc/document.hxx
+++ binfilter/inc/bf_sc/document.hxx
@@ -43,8 +43,8 @@
 #endif
 
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef SC_TABLE_HXX
@@ -329,7 +329,7 @@ friend class ScPivot;
 private:
 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
 
-	vos::ORef<ScPoolHelper> xPoolHelper;
+	rtl::Reference<ScPoolHelper> xPoolHelper;
 
 	ScFieldEditEngine*	pEditEngine;					// uses pEditPool from xPoolHelper
 	SfxObjectShell*		pShell;
@@ -361,7 +361,7 @@ private:
 	ScChangeViewSettings* pChangeViewSettings;
 	ScScriptTypeData*	pScriptTypeData;
 	ScRefreshTimerControl* pRefreshTimerControl;
-	vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharacters;
+	rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharacters;
 
 	ScFieldEditEngine*	pCacheFieldEditEngine;
 
@@ -1172,8 +1172,8 @@ public:
 	ScChangeViewSettings* GetChangeViewSettings() const		{ return pChangeViewSettings; }
 	void				SetChangeViewSettings(const ScChangeViewSettings& rNew);
 
-	vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharacters();
-	void			SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew );
+	rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharacters();
+	void			SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew );
 
 	BYTE			GetAsianCompression() const;		// CharacterCompressionType values
 	BOOL			IsValidAsianCompression() const;
diff --git a/binfilter/inc/bf_starmath/symbol.hxx b/binfilter/inc/bf_starmath/symbol.hxx
index 11638ef..7c4f168 100644
--- binfilter/inc/bf_starmath/symbol.hxx
+++ binfilter/inc/bf_starmath/symbol.hxx
@@ -35,8 +35,8 @@
 #ifndef SYMBOL_HXX
 #define SYMBOL_HXX
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _FONT_HXX //autogen
 #include <vcl/font.hxx>
diff --git a/binfilter/inc/bf_svx/UnoForbiddenCharsTable.hxx b/binfilter/inc/bf_svx/UnoForbiddenCharsTable.hxx
index 56ba973..6d066dc 100644
--- binfilter/inc/bf_svx/UnoForbiddenCharsTable.hxx
+++ binfilter/inc/bf_svx/UnoForbiddenCharsTable.hxx
@@ -43,8 +43,8 @@
 #include <com/sun/star/linguistic2/XSupportedLocales.hpp>
 #endif
 
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #include <cppuhelper/implbase2.hxx>
@@ -60,10 +60,10 @@ protected:
 	/** this virtual function is called if the forbidden characters are changed */
 	virtual void onChange();
 
-	vos::ORef<SvxForbiddenCharactersTable> mxForbiddenChars;
+	rtl::Reference<SvxForbiddenCharactersTable> mxForbiddenChars;
 
 public:
-	SvxUnoForbiddenCharsTable(vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars);
+	SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars);
 	~SvxUnoForbiddenCharsTable();
 
 	// XForbiddenCharacters
diff --git a/binfilter/inc/bf_svx/editeng.hxx b/binfilter/inc/bf_svx/editeng.hxx
index 209fd62..50cb02c 100644
--- binfilter/inc/bf_svx/editeng.hxx
+++ binfilter/inc/bf_svx/editeng.hxx
@@ -71,7 +71,7 @@ class SvxBulletItem;
 class SvxLRSpaceItem;
 class SvxForbiddenCharactersTable;
 }//end of namespace binfilter
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
 #include <com/sun/star/uno/Reference.h>
@@ -291,7 +291,7 @@ public:
 	void			SetHyphenator( ::com::sun::star::uno::Reference< 
 							::com::sun::star::linguistic2::XHyphenator >& xHyph );
 
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
 
 	void 			SetDefaultLanguage( LanguageType eLang );
 
diff --git a/binfilter/inc/bf_svx/forbiddencharacterstable.hxx b/binfilter/inc/bf_svx/forbiddencharacterstable.hxx
index 609f078..266a502 100644
--- binfilter/inc/bf_svx/forbiddencharacterstable.hxx
+++ binfilter/inc/bf_svx/forbiddencharacterstable.hxx
@@ -40,7 +40,7 @@
 #include <tools/table.hxx>
 #endif
 
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 
 #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
 #include <com/sun/star/uno/Reference.hxx>
@@ -72,7 +72,7 @@ struct ForbiddenCharactersInfo
 
 DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* )
 
-class SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public vos::OReference
+class SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public salhelper::SimpleReferenceObject
 {
 private:	
 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
diff --git a/binfilter/inc/bf_svx/outliner.hxx b/binfilter/inc/bf_svx/outliner.hxx
index e0eca58..98f6a2c 100644
--- binfilter/inc/bf_svx/outliner.hxx
+++ binfilter/inc/bf_svx/outliner.hxx
@@ -72,7 +72,7 @@
 #include <com/sun/star/uno/Reference.h>
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #include <bf_svx/svxfont.hxx>
 
 namespace com { namespace sun { namespace star { namespace linguistic2 {
@@ -117,7 +117,7 @@ class SvxForbiddenCharactersTable;
 //STRIP008 #include <com/sun/star/uno/Reference.h>
 //STRIP008 #endif
 //STRIP008 
-//STRIP008 #include <vos/ref.hxx>
+//STRIP008 #include <rtl/ref.hxx>
 //STRIP008 #include <bf_svx/svxfont.hxx>
 //STRIP008 
 //STRIP008 namespace com { namespace sun { namespace star { namespace linguistic2 {
@@ -683,7 +683,7 @@ public:
 	void			SetHyphenator( ::com::sun::star::uno::Reference<
 						::com::sun::star::linguistic2::XHyphenator >& xHyph );
 
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
 
 	// Depricated
 	void 			SetDefaultLanguage( LanguageType eLang );
diff --git a/binfilter/inc/bf_svx/svdmodel.hxx b/binfilter/inc/bf_svx/svdmodel.hxx
index ba80e8d..1259da3 100644
--- binfilter/inc/bf_svx/svdmodel.hxx
+++ binfilter/inc/bf_svx/svdmodel.hxx
@@ -82,7 +82,7 @@ class OutputDevice;
 #include <vcl/field.hxx>
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 class AutoTimer;
 class SfxItemPool;
 class SfxItemSet;
@@ -759,8 +759,8 @@ public:
 	BOOL isLocked() const { return mbModelLocked; }
 	void setLock( BOOL bLock );
 
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
 
 	void SetCharCompressType( UINT16 nType );
 	UINT16 GetCharCompressType() const { return mnCharCompressType; }
diff --git a/binfilter/inc/bf_sw/doc.hxx b/binfilter/inc/bf_sw/doc.hxx
index 9c18bec..ce1bcba 100644
--- binfilter/inc/bf_sw/doc.hxx
+++ binfilter/inc/bf_sw/doc.hxx
@@ -80,8 +80,8 @@
 #ifndef _COM_SUN_STAR_LINGUISTIC2_XHYPHENATEDWORD_HPP_
 #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
 #endif
-#ifndef _VOS_REF_HXX
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 // OD 25.06.2003 #108784#
@@ -394,7 +394,7 @@ class SwDoc
 	SwUnoCallBack	*pUnoCallBack;
 
 	// table of forbidden characters of this document
-	::vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable; //STRIP008 vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
+	::rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable; //STRIP008 rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
 
 	// -------------------------------------------------------------------
 	// sonstige
@@ -1659,9 +1659,9 @@ public:
 	const ::com::sun::star::i18n::
 		ForbiddenCharacters* GetForbiddenCharacters( USHORT nLang,
 													BOOL bLocaleData ) const;
-	const vos::ORef<SvxForbiddenCharactersTable>& GetForbiddenCharacterTbl() const
+	const rtl::Reference<SvxForbiddenCharactersTable>& GetForbiddenCharacterTbl() const
 			{ return xForbiddenCharsTable; }
-	vos::ORef<SvxForbiddenCharactersTable>& GetForbiddenCharacterTbl();
+	rtl::Reference<SvxForbiddenCharactersTable>& GetForbiddenCharacterTbl();
 
 	// ------------------- Zugriff auf Dummy-Member --------------------
 
diff --git a/binfilter/inc/bf_sw/flddropdown.hxx b/binfilter/inc/bf_sw/flddropdown.hxx
index 5ea6099..6a12e90 100644
--- binfilter/inc/bf_sw/flddropdown.hxx
+++ binfilter/inc/bf_sw/flddropdown.hxx
@@ -41,9 +41,10 @@
 namespace binfilter {
 
 using namespace ::com::sun::star::uno;
-using namespace ::rtl;
 using namespace std;
 
+using rtl::OUString;
+
 /** 
     Field type for dropdown boxes.
 */
diff --git a/binfilter/inc/bf_xmloff/ControlBorderHandler.hxx b/binfilter/inc/bf_xmloff/ControlBorderHandler.hxx
index c3b124f..bc03fcb 100644
--- binfilter/inc/bf_xmloff/ControlBorderHandler.hxx
+++ binfilter/inc/bf_xmloff/ControlBorderHandler.hxx
@@ -39,8 +39,8 @@
 #ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
 #include "prhdlfac.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _RTL_USTRING_HXX_
 #include <rtl/ustring.hxx>
diff --git a/binfilter/inc/bf_xmloff/formlayerexport.hxx b/binfilter/inc/bf_xmloff/formlayerexport.hxx
index e013a8a..6ff4a3a 100644
--- binfilter/inc/bf_xmloff/formlayerexport.hxx
+++ binfilter/inc/bf_xmloff/formlayerexport.hxx
@@ -36,8 +36,8 @@
 #ifndef _XMLOFF_FORMLAYEREXPORT_HXX_
 #define _XMLOFF_FORMLAYEREXPORT_HXX_
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
 #include <com/sun/star/drawing/XDrawPage.hpp>
@@ -51,8 +51,8 @@
 #ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
 #include <com/sun/star/frame/XModel.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _XMLOFF_XMLEXPPR_HXX
 #include <bf_xmloff/xmlexppr.hxx>
@@ -78,7 +78,7 @@ namespace xmloff
 	/** provides functionallity for exporting a complete form layer.
 	*/
 	class OFormLayerXMLExport
-				:public ::vos::OReference
+				:public ::salhelper::SimpleReferenceObject
 	{
 	protected:
 		/// our export context
diff --git a/binfilter/inc/bf_xmloff/formlayerimport.hxx b/binfilter/inc/bf_xmloff/formlayerimport.hxx
index 5ad4159..f176204 100644
--- binfilter/inc/bf_xmloff/formlayerimport.hxx
+++ binfilter/inc/bf_xmloff/formlayerimport.hxx
@@ -36,8 +36,8 @@
 #ifndef _XMLOFF_FORMLAYERIMPORT_HXX_
 #define _XMLOFF_FORMLAYERIMPORT_HXX_
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
 #include <com/sun/star/drawing/XDrawPage.hpp>
@@ -48,8 +48,8 @@
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _XMLOFF_XMLIMPPR_HXX
 #include <bf_xmloff/xmlimppr.hxx>
@@ -73,7 +73,7 @@ namespace xmloff
 	/** allows you to import a &lt;form:form&gt; element
 	*/
 	class OFormLayerXMLImport
-				:public ::vos::OReference
+				:public ::salhelper::SimpleReferenceObject
 	{
 		OFormLayerXMLImport_Impl*	m_pImpl;
 
@@ -83,7 +83,7 @@ namespace xmloff
 
 		/** retrieves the property mapper form form related auto styles.
 		*/
-		::vos::ORef< SvXMLImportPropertyMapper >
+		::rtl::Reference< SvXMLImportPropertyMapper >
 				getStylePropertyMapper() const;
 
 		/** start importing the forms of the given page
diff --git a/binfilter/inc/bf_xmloff/nmspmap.hxx b/binfilter/inc/bf_xmloff/nmspmap.hxx
index ce20e2d..4f6e43b 100644
--- binfilter/inc/bf_xmloff/nmspmap.hxx
+++ binfilter/inc/bf_xmloff/nmspmap.hxx
@@ -42,8 +42,8 @@
 #ifndef __SGI_STL_MAP
 #include <map>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CPPUHELPER_WEAK_HXX_
 #include <cppuhelper/weak.hxx>
@@ -102,8 +102,8 @@ struct QNamePairEq
 };
 
 typedef ::std::hash_map < QNamePair, ::rtl::OUString, QNamePairHash, QNamePairEq > QNameCache;
-typedef ::std::hash_map < ::rtl::OUString, ::vos::ORef <NameSpaceEntry >, ::rtl::OUStringHash, OUStringEqFunc > NameSpaceHash;
-typedef ::std::map < sal_uInt16, ::vos::ORef < NameSpaceEntry >, uInt32lt > NameSpaceMap;
+typedef ::std::hash_map < ::rtl::OUString, ::rtl::Reference <NameSpaceEntry >, ::rtl::OUStringHash, OUStringEqFunc > NameSpaceHash;
+typedef ::std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry >, uInt32lt > NameSpaceMap;
 
 class SvXMLNamespaceMap
 {
diff --git a/configmgr/inc/pch/precompiled_configmgr.hxx b/configmgr/inc/pch/precompiled_configmgr.hxx
index c84dff7..c74b718 100644
--- configmgr/inc/pch/precompiled_configmgr.hxx
+++ configmgr/inc/pch/precompiled_configmgr.hxx
@@ -243,8 +243,8 @@
 
 #include "vos/conditn.hxx"
 #include "vos/pipe.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
 #include "vos/socket.hxx"
 #include "vos/thread.hxx"
 #include "vos/timer.hxx"
diff --git a/configmgr/source/api2/apiaccessobj.hxx b/configmgr/source/api2/apiaccessobj.hxx
index eaa1979..1775702 100644
--- configmgr/source/api2/apiaccessobj.hxx
+++ configmgr/source/api2/apiaccessobj.hxx
@@ -134,7 +134,7 @@ namespace configmgr
 			static ServiceInfo const*const s_pServiceInfo;
 			mutable ApiRootTreeImpl 	m_aRootTree;
 		public:
-			OReadRootElement(UnoInterface* pUnoThis, ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+			OReadRootElement(UnoInterface* pUnoThis, ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 				: m_aRootTree(pUnoThis, rProvider,aTree, _xOptions)
 			{}
 
@@ -156,7 +156,7 @@ namespace configmgr
 
 			mutable ApiRootTreeImpl 	m_aRootTree;
 		public:
-			OUpdateRootElement(UnoInterface* pUnoThis, ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+			OUpdateRootElement(UnoInterface* pUnoThis, ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 			: m_aRootTree(pUnoThis, rProvider,aTree,_xOptions)
 			{}
 
diff --git a/configmgr/source/api2/apifactory.cxx b/configmgr/source/api2/apifactory.cxx
index 724030c..7cf5d31 100644
--- configmgr/source/api2/apifactory.cxx
+++ configmgr/source/api2/apifactory.cxx
@@ -190,7 +190,7 @@ NodeElement* Factory::makeElement(Tree const& aTree, NodeRef const& aNode)
 			else
 			{
 				OSL_ENSURE(aTree.getContextTree().isEmpty(),"INTERNAL ERROR: Found tree (not a set element) with a parent tree.");
-				pRet = doCreateAccessRoot(aTree,aTemplate.get(), vos::ORef< OOptions >());
+				pRet = doCreateAccessRoot(aTree,aTemplate.get(), rtl::Reference< OOptions >());
 			}
 		}
 		implHaveNewElement(aNodeID,pRet);
@@ -245,7 +245,7 @@ TreeElement* Factory::makeAccessRoot(Tree const& aTree, RequestOptions const& _a
 	if (0 == pRet)
 	{
 		TemplateHolder aTemplate = implGetSetElementTemplate(aTree,aRoot);
-        vos::ORef<OOptions> xOptions = new OOptions(_aOptions);
+        rtl::Reference<OOptions> xOptions = new OOptions(_aOptions);
 		pRet = doCreateAccessRoot(aTree,aTemplate.get(), xOptions);
 		implHaveNewElement (aNodeID,pRet);
 	}
diff --git a/configmgr/source/api2/apifactory.hxx b/configmgr/source/api2/apifactory.hxx
index 9534f78..ad1c5b6 100644
--- configmgr/source/api2/apifactory.hxx
+++ configmgr/source/api2/apifactory.hxx
@@ -46,8 +46,8 @@
 #ifndef _RTL_REF_HXX_
 #include <rtl/ref.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
@@ -134,7 +134,7 @@ namespace configmgr
 			uno::Sequence< sal_Int8 > doGetElementTunnelID() const { return m_aTunnelID.getImplementationId(); }
 
 			virtual NodeElement*	doCreateGroupMember(configuration::Tree const& aTree, configuration::NodeRef const& aNode, configuration::Template* pSetElementTemplate) = 0;
-			virtual TreeElement*	doCreateAccessRoot(configuration::Tree const& aTree, configuration::Template* pSetElementTemplate, vos::ORef< OOptions >const& _xOptions) = 0;
+			virtual TreeElement*	doCreateAccessRoot(configuration::Tree const& aTree, configuration::Template* pSetElementTemplate, rtl::Reference< OOptions >const& _xOptions) = 0;
 			virtual SetElement*		doCreateSetElement(configuration::ElementTree const& aTree, configuration::Template* pSetElementTemplate) = 0;
 
 			static ApiTreeImpl& getImplementation(NodeElement& pElement);
diff --git a/configmgr/source/api2/apifactoryimpl.cxx b/configmgr/source/api2/apifactoryimpl.cxx
index 53482b5..6de3922 100644
--- configmgr/source/api2/apifactoryimpl.cxx
+++ configmgr/source/api2/apifactoryimpl.cxx
@@ -105,7 +105,7 @@ NodeElement* ReadOnlyObjectFactory::doCreateGroupMember(configuration::Tree cons
 }
 //-----------------------------------------------------------------------------
 
-TreeElement* ReadOnlyObjectFactory::doCreateAccessRoot(configuration::Tree const& aTree, Template* pSetElementTemplate, vos::ORef< OOptions >const& _xOptions)
+TreeElement* ReadOnlyObjectFactory::doCreateAccessRoot(configuration::Tree const& aTree, Template* pSetElementTemplate, rtl::Reference< OOptions >const& _xOptions)
 {
 	OSL_ENSURE(!aTree.isEmpty(), "ERROR: trying to create a root object without a tree");
 
@@ -248,7 +248,7 @@ NodeElement* UpdateObjectFactory::doCreateGroupMember(configuration::Tree const&
 }
 //-----------------------------------------------------------------------------
 
-TreeElement* UpdateObjectFactory::doCreateAccessRoot(configuration::Tree const& aTree, Template* pSetElementTemplate, vos::ORef< OOptions >const& _xOptions)
+TreeElement* UpdateObjectFactory::doCreateAccessRoot(configuration::Tree const& aTree, Template* pSetElementTemplate, rtl::Reference< OOptions >const& _xOptions)
 {
 	OSL_ENSURE(!aTree.isEmpty(), "ERROR: trying to create a root object without a tree");
 	
diff --git a/configmgr/source/api2/apifactoryimpl.hxx b/configmgr/source/api2/apifactoryimpl.hxx
index c14f426..93a9174 100644
--- configmgr/source/api2/apifactoryimpl.hxx
+++ configmgr/source/api2/apifactoryimpl.hxx
@@ -52,7 +52,7 @@ namespace configmgr
 			~ReadOnlyObjectFactory();
 
 			virtual NodeElement*	doCreateGroupMember(configuration::Tree const& aTree, configuration::NodeRef const& aNode, configuration::Template* pSetElementTemplate);
-			virtual TreeElement*	doCreateAccessRoot(configuration::Tree const& aTree, configuration::Template* pSetElementTemplate, vos::ORef< OOptions >const& _xOptions);
+			virtual TreeElement*	doCreateAccessRoot(configuration::Tree const& aTree, configuration::Template* pSetElementTemplate, rtl::Reference< OOptions >const& _xOptions);
 			virtual SetElement*	doCreateSetElement(configuration::ElementTree const& aTree, configuration::Template* pSetElementTemplate);
 		};
 		// used to create UNO objects
@@ -64,7 +64,7 @@ namespace configmgr
 			~UpdateObjectFactory();
 
 			virtual NodeElement*	doCreateGroupMember(configuration::Tree const& aTree, configuration::NodeRef const& aNode, configuration::Template* pSetElementTemplate);
-			virtual TreeElement*	doCreateAccessRoot(configuration::Tree const& aTree, configuration::Template* pSetElementTemplate, vos::ORef< OOptions >const& _xOptions);
+			virtual TreeElement*	doCreateAccessRoot(configuration::Tree const& aTree, configuration::Template* pSetElementTemplate, rtl::Reference< OOptions >const& _xOptions);
 			virtual SetElement*	doCreateSetElement(configuration::ElementTree const& aTree, configuration::Template* pSetElementTemplate);
 		private:
 			bool implIsReadOnly(configuration::Tree const& aTree, configuration::NodeRef const& aNode);
diff --git a/configmgr/source/api2/apitreeimplobj.cxx b/configmgr/source/api2/apitreeimplobj.cxx
index f96e912..47824c6 100644
--- configmgr/source/api2/apitreeimplobj.cxx
+++ configmgr/source/api2/apitreeimplobj.cxx
@@ -79,8 +79,8 @@
 #ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
 #include <cppuhelper/queryinterface.hxx>
 #endif
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 namespace configmgr
@@ -97,14 +97,14 @@ namespace configmgr
 class ApiTreeImpl::ComponentAdapter : public lang::XEventListener
 {
 	osl::Mutex mutex;
-	vos::ORefCount m_refs;
+	oslInterlockedCount m_nRefs;
 
 	ApiTreeImpl* pOwner;
 
 	uno::Reference< lang::XComponent > xProvider;
 	uno::Reference< lang::XComponent > xParent;
 public:
-	ComponentAdapter(ApiTreeImpl& rParent) : pOwner(&rParent) {}
+	ComponentAdapter(ApiTreeImpl& rParent) : m_nRefs( 0 ), pOwner(&rParent) {}
     virtual ~ComponentAdapter() {}
 
 	void clear();
@@ -174,13 +174,13 @@ void ApiTreeImpl::ComponentAdapter::setParent(uno::Reference< lang::XComponent >
 
 void SAL_CALL ApiTreeImpl::ComponentAdapter::acquire() throw()
 {
-	++m_refs;
+	osl_incrementInterlockedCount( &m_nRefs );
 }
 //-------------------------------------------------------------------------
 
 void SAL_CALL ApiTreeImpl::ComponentAdapter::release() throw()
 {
-	if (--m_refs == 0)
+	if ( osl_decrementInterlockedCount( &m_nRefs ) == 0 )
 		delete this;
 }
 //-------------------------------------------------------------------------
@@ -266,8 +266,8 @@ public:
 		{
 			if (pNew != pSource)
 			{
-                OSL_ENSURE(m_xOptions.isValid(),"Cannot set IConfigListener without Options");
-                if (m_xOptions.isValid())
+                OSL_ENSURE(m_xOptions.is(),"Cannot set IConfigListener without Options");
+                if (m_xOptions.is())
                 {
 				    if (pSource)
 					    pSource->removeListener(m_xOptions->getRequestOptions(), this);
@@ -287,13 +287,13 @@ public:
 
     void setLocation(AbsolutePath const& _aLocation, TreeOptions const& _xOptions)
 	{
-        OSL_ASSERT(_xOptions.isValid());
+        OSL_ASSERT(_xOptions.is());
 
 		osl::MutexGuard aGuard(mutex);
 
 		if (pSource && pParent)
         {
-            OSL_ASSERT(m_xOptions.isValid());
+            OSL_ASSERT(m_xOptions.is());
 			pSource->removeListener(m_xOptions->getRequestOptions(), this);
         }
 
@@ -311,9 +311,9 @@ public:
 		pParent = 0;
 		if (pSource)
 		{
-            OSL_ASSERT(m_xOptions.isValid());
+            OSL_ASSERT(m_xOptions.is());
 			pSource->removeListener(m_xOptions->getRequestOptions(), this);
-			m_xOptions.unbind();
+			m_xOptions.clear();
             m_aLocationPath = AbsolutePath::root();
 		}
 
@@ -332,12 +332,12 @@ public:
 				TreeOptions xOptions = m_xOptions;
 
 				pSource = 0;
-				m_xOptions.unbind();
+				m_xOptions.clear();
                 m_aLocationPath = AbsolutePath::root();
 
 				aGuard.clear();
 
-				OSL_ASSERT(xOptions.isValid());
+				OSL_ASSERT(xOptions.is());
                 pOrgSource->removeListener(xOptions->getRequestOptions(), this);
 			}
 		}
@@ -376,8 +376,8 @@ configuration::DefaultProvider createDefaultProvider(
     OProviderImpl& rProviderImpl        = rProvider.getProviderImpl();
     rtl::Reference< IConfigDefaultProvider > xDefaultProvider  = rProviderImpl.getDefaultProvider();
 
-    OSL_ASSERT(_xOptions.isValid());
-    RequestOptions const aOptions = _xOptions.isValid() ? _xOptions->getRequestOptions() : RequestOptions();
+    OSL_ASSERT(_xOptions.is());
+    RequestOptions const aOptions = _xOptions.is() ? _xOptions->getRequestOptions() : RequestOptions();
 
     return configuration::DefaultProvider::create(aTree,aOptions,xDefaultProvider,&rProviderImpl);
 }
@@ -553,7 +553,7 @@ bool ApiRootTreeImpl::disposeTree()
 
 	if (bDisposed) releaseData();
 
-	if (!m_xOptions.isEmpty())
+	if (m_xOptions.is())
 	{
 		OSL_ENSURE(!bDisposed, "Disposing/Releasing should clear the options");
 		CFG_TRACE_INFO2("Api Root TreeImpl: data was not released in disposeTree");
@@ -756,7 +756,7 @@ IConfigBroadcaster* ApiRootTreeImpl::implSetNotificationSource(IConfigBroadcaste
 	IConfigBroadcaster* pOld = m_pNotificationListener.is() ? m_pNotificationListener->getSource() : 0;
 	if (pOld != pNew)
 	{
-		OSL_ENSURE(m_xOptions.isValid(), "Cannot change notification source without options");
+		OSL_ENSURE(m_xOptions.is(), "Cannot change notification source without options");
 
 		if (!m_pNotificationListener.is())
 			m_pNotificationListener = new NodeListener(*this);
@@ -786,7 +786,7 @@ void ApiRootTreeImpl::implSetLocation(configuration::Tree const& _aTree)
 		m_pNotificationListener = new NodeListener(*this);
 
 	OSL_ENSURE(!m_aLocationPath.isRoot() && !m_aLocationPath.isDetached(), "Cannot reregister for notifications: setting empty location");
-	OSL_ENSURE( m_xOptions.isValid(), "Cannot reregister for notifications: no options available" );
+	OSL_ENSURE( m_xOptions.is(), "Cannot reregister for notifications: no options available" );
 
 	m_pNotificationListener->setLocation(m_aLocationPath, m_xOptions);
 }
@@ -801,10 +801,10 @@ void ApiRootTreeImpl::releaseData()
 	OSL_ASSERT(aTree.isEmpty());
 
 	OSL_ENSURE( !m_aLocationPath.isRoot() && !m_aLocationPath.isDetached(), "Location still needed to release data" );
-	OSL_ENSURE( m_xOptions.isValid(), "Options still needed to release data" );
+	OSL_ENSURE( m_xOptions.is(), "Options still needed to release data" );
 
 	getApiTree().getProvider().getProviderImpl().releaseSubtree(m_aLocationPath,m_xOptions->getRequestOptions());
-	m_xOptions.unbind();
+	m_xOptions.clear();
 
     m_aLocationPath = configuration::AbsolutePath::detachedRoot();
 }
diff --git a/configmgr/source/api2/apitreeimplobj.hxx b/configmgr/source/api2/apitreeimplobj.hxx
index e63e05f..f175801 100644
--- configmgr/source/api2/apitreeimplobj.hxx
+++ configmgr/source/api2/apitreeimplobj.hxx
@@ -55,8 +55,8 @@
 #include "utility.hxx"
 #endif
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _RTL_REF_HXX_
 #include <rtl/ref.hxx>
@@ -92,7 +92,7 @@ namespace configmgr
 		class Factory;
 		class Notifier;
 		class NotifierImpl;
-		typedef vos::ORef<NotifierImpl> NotifierImplHolder;
+		typedef rtl::Reference<NotifierImpl> NotifierImplHolder;
 //-----------------------------------------------------------------------------
 		class ObjectRegistry;
 		typedef rtl::Reference<ObjectRegistry> ObjectRegistryHolder;
@@ -101,7 +101,7 @@ namespace configmgr
 		typedef uno::Reference<UnoInterface> UnoInterfaceRef;
 		typedef uno::Reference<com::sun::star::script::XTypeConverter>	UnoTypeConverter;
 
-        typedef vos::ORef< OOptions > TreeOptions;
+        typedef rtl::Reference< OOptions > TreeOptions;
 //-----------------------------------------------------------------------------
 // API object implementation wrappers 
 //-------------------------------------------------------------------------
diff --git a/configmgr/source/api2/broadcaster.cxx b/configmgr/source/api2/broadcaster.cxx
index b03bcea..85d872a 100644
--- configmgr/source/api2/broadcaster.cxx
+++ configmgr/source/api2/broadcaster.cxx
@@ -68,8 +68,8 @@
 #include "apitreeimplobj.hxx"
 #endif
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 #ifndef INCLUDED_MAP
@@ -112,10 +112,10 @@ namespace configmgr
 		template <class T>
 		struct LessORefBodyPtr
 		{
-			typedef vos::ORef<T> Ref;
+			typedef rtl::Reference<T> Ref;
 			bool operator()(Ref const& lhs, Ref const& rhs) const
 			{ 
-				return ptr_less(lhs.getBodyPtr(), rhs.getBodyPtr()); 
+				return ptr_less(lhs.get(), rhs.get()); 
 			}
 
 			std::less<T*> ptr_less;
@@ -157,7 +157,7 @@ namespace configmgr
 // ---------------------------------------------------------------------------------------------------
 // class Broadcaster::Impl
 // ---------------------------------------------------------------------------------------------------
-	class Broadcaster::Impl : public vos::OReference
+	class Broadcaster::Impl : public salhelper::SimpleReferenceObject
 	{
 	private:
 		NotifierData m_aNotifierData;
@@ -174,10 +174,10 @@ namespace configmgr
 
 		void notifyRootListeners(NodeChangesInformation const& aChanges);
 
-		static vos::ORef<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChange const& aChange, bool bLocal);
-		static vos::ORef<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChanges const& aChange, bool bLocal);
-		static vos::ORef<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChangeInformation const& aChange, bool bLocal);
-		static vos::ORef<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChangesInformation const& aChange, bool bLocal);
+		static rtl::Reference<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChange const& aChange, bool bLocal);
+		static rtl::Reference<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChanges const& aChange, bool bLocal);
+		static rtl::Reference<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChangeInformation const& aChange, bool bLocal);
+		static rtl::Reference<Impl> create(NotifierHolder const& rNotifierImpl, ApiTreeRef const& pTreeImpl, NodeChangesInformation const& aChange, bool bLocal);
 
 	private:
 		virtual void doQueryConstraints(NodeChangesInformation const& aChanges) = 0;
@@ -200,7 +200,7 @@ namespace configmgr
 		typedef std::set< configuration::NodeID >       NodeSet;
 		typedef std::set< configuration::SubNodeID > SubNodeSet;
 	// -----------------------------------------------------------------------------------------------
-		typedef vos::ORef< Broadcaster::Impl > BroadcasterImplRef;
+		typedef rtl::Reference< Broadcaster::Impl > BroadcasterImplRef;
 	// -----------------------------------------------------------------------------------------------
 		
 		class EmptyBroadcaster_Impl : public Broadcaster::Impl
@@ -295,7 +295,7 @@ namespace configmgr
 	// -----------------------------------------------------------------------------------------------
 		class SingleTreeBroadcaster_Impl : public Broadcaster::Impl
 		{
-			typedef std::vector< vos::ORef<NodeLocalBroadcaster_Impl> > BroadcasterList;
+			typedef std::vector< rtl::Reference<NodeLocalBroadcaster_Impl> > BroadcasterList;
 			BroadcasterList m_aBroadcasters;
 
 			SingleTreeBroadcaster_Impl(NotifierData const& rTreeNotifierData, BroadcasterList& aBroadcasters);
@@ -374,7 +374,7 @@ namespace configmgr
 			{
 				NotifierData aNotifierData( findNotifier(*it,pTreeImpl) );
 
-				if (aNotifierData.first.isValid())
+				if (aNotifierData.first.is())
 				{
 					aNotifiers.insert( aNotifierData );
 					OSL_ENSURE( aNotifiers[aNotifierData.first] == aNotifierData.second, "Different Api Trees for the same notifier" );
@@ -820,7 +820,7 @@ namespace configmgr
 				return 0;
 
 			else if (aNodecasters.size() == 1)
-				return aNodecasters.begin()->getBodyPtr();
+				return aNodecasters.begin()->get();
 
 			else
 				return new SingleTreeBroadcaster_Impl(rRootNotifier, aNodecasters);
@@ -859,7 +859,7 @@ namespace configmgr
 			
 		bool MultiTreeBroadcaster_Impl::selectChanges(NodeChangesInformation& rSelected, NodeChangesInformation const& aOriginal, NotifierData const& aSelector)
 		{
-			OSL_ASSERT(aSelector.first.isValid());
+			OSL_ASSERT(aSelector.first.is());
 			OSL_ASSERT(aSelector.second.is());
 
 			OSL_ASSERT(rSelected.empty()); // nothing in there yet
@@ -886,7 +886,7 @@ namespace configmgr
 				if ( selectChanges(aSelectedChanges, aChanges, *it))
 				{
 					BroadcasterImplRef pSelectedImpl = SingleTreeBroadcaster_Impl::create(rRootNotifier, *it, aSelectedChanges);
-					if (pSelectedImpl.isValid())
+					if (pSelectedImpl.is())
 						aTreecasters.push_back(pSelectedImpl);
 				}
 			}
@@ -952,7 +952,7 @@ namespace configmgr
 			// can't create a matching change - must still create an empty one
 		}
 
-		if (pRet.isEmpty())
+		if (!pRet.is())
 			pRet = EmptyBroadcaster_Impl::create( NotifierData(rNotifierImpl,pTreeImpl) );
 
 		return pRet;
@@ -970,7 +970,7 @@ namespace configmgr
 		}
 		else
 		{
-			OSL_ENSURE(aChanges.isEmpty(), "Cannot get information for changes - cannot notify");
+			OSL_ENSURE(!aChanges.is(), "Cannot get information for changes - cannot notify");
 
 			// make an empty one below
 			BroadcasterImplRef pRet = EmptyBroadcaster_Impl::create( aRootData );
@@ -1006,7 +1006,7 @@ namespace configmgr
 			// can't create a matching change - must still create an empty one
 		}
 
-		if (pRet.isEmpty())
+		if (!pRet.is())
 			pRet = EmptyBroadcaster_Impl::create( NotifierData(rNotifierImpl,pTreeImpl) );
 
 		return pRet;
@@ -1043,7 +1043,7 @@ namespace configmgr
 			// else: empty
 		}
 
-		if (pRet.isEmpty())
+		if (!pRet.is())
 			pRet = EmptyBroadcaster_Impl::create( aRootData );
 
 		return pRet;
@@ -1132,7 +1132,7 @@ namespace configmgr
 		if (pRootTree.is())
 		{
 			NotifierHolder aRootNotifier = BroadcasterHelper::getImpl(pRootTree->getNotifier());
-			if (aRootNotifier.isValid())
+			if (aRootNotifier.is())
 			{
 				uno::Reference< css::util::XChangesListener > const * const pSelect = 0;
 
@@ -1172,32 +1172,32 @@ namespace configmgr
 Broadcaster::Broadcaster(Notifier const& aNotifier, NodeChange const& aChange, bool bLocal)
 : m_pImpl( Impl::create(aNotifier.m_aImpl,ApiTreeRef(aNotifier.m_pTree),aChange,bLocal) )
 {
-	OSL_ASSERT(m_pImpl.isValid());
+	OSL_ASSERT(m_pImpl.is());
 }
 // ---------------------------------------------------------------------------------------------------
 Broadcaster::Broadcaster(Notifier const& aNotifier, NodeChanges const& aChanges, bool bLocal)
 : m_pImpl( Impl::create(aNotifier.m_aImpl,ApiTreeRef(aNotifier.m_pTree),aChanges,bLocal) )
 {
-	OSL_ASSERT(m_pImpl.isValid());
+	OSL_ASSERT(m_pImpl.is());
 }
 // ---------------------------------------------------------------------------------------------------
 Broadcaster::Broadcaster(Notifier const& aNotifier, NodeChangeInformation const& aChange, bool bLocal)
 : m_pImpl( Impl::create(aNotifier.m_aImpl,ApiTreeRef(aNotifier.m_pTree),aChange,bLocal) )
 {
-	OSL_ASSERT(m_pImpl.isValid());
+	OSL_ASSERT(m_pImpl.is());
 }
 // ---------------------------------------------------------------------------------------------------
 Broadcaster::Broadcaster(Notifier const& aNotifier, NodeChangesInformation const& aChanges, bool bLocal)
 : m_pImpl( Impl::create(aNotifier.m_aImpl,ApiTreeRef(aNotifier.m_pTree),aChanges,bLocal) )
 {
-	OSL_ASSERT(m_pImpl.isValid());
+	OSL_ASSERT(m_pImpl.is());
 }
 // ---------------------------------------------------------------------------------------------------
 
 Broadcaster::Broadcaster(Broadcaster const& aOther)
 : m_pImpl(aOther.m_pImpl)
 {
-	OSL_ASSERT(m_pImpl.isValid());
+	OSL_ASSERT(m_pImpl.is());
 }
 // ---------------------------------------------------------------------------------------------------
 
@@ -1218,7 +1218,7 @@ void Broadcaster::queryConstraints(NodeChange const& aChange) throw(beans::Prope
 
 void Broadcaster::queryConstraints(NodeChanges const& aChanges, bool bSingleBase) throw(beans::PropertyVetoException)
 {
-	OSL_ENSURE(!aChanges.isEmpty(),"Constraint query without a change !");
+	OSL_ENSURE(aChanges.is(),"Constraint query without a change !");
 		
     try
     {
@@ -1265,7 +1265,7 @@ void Broadcaster::notifyListeners(NodeChangeInformation const& aChange) throw()
 
 void Broadcaster::notifyListeners(NodeChanges const& aChanges, bool bSingleBase) throw()
 {
-	OSL_ENSURE(!aChanges.isEmpty(),"Notifying without a change !");
+	OSL_ENSURE(aChanges.is(),"Notifying without a change !");
 
     try
     {
diff --git a/configmgr/source/api2/broadcaster.hxx b/configmgr/source/api2/broadcaster.hxx
index bc04aec..800c6fb 100644
--- configmgr/source/api2/broadcaster.hxx
+++ configmgr/source/api2/broadcaster.hxx
@@ -40,7 +40,7 @@
 #include <com/sun/star/beans/PropertyVetoException.hpp>
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
 namespace configmgr
 {
@@ -93,7 +93,7 @@ namespace configmgr
 			
 			class Impl;
 		private:
-			vos::ORef<Impl> m_pImpl;			
+			rtl::Reference<Impl> m_pImpl;			
 		private:
 			void operator=(Broadcaster const& aOther);
 		};
diff --git a/configmgr/source/api2/committer.cxx b/configmgr/source/api2/committer.cxx
index c046050..b6e923b 100644
--- configmgr/source/api2/committer.cxx
+++ configmgr/source/api2/committer.cxx
@@ -105,9 +105,9 @@ void Committer::commit()
 	ApiTreeImpl& rApiTree = m_rTree.getApiTree();
     
 	OSL_PRECOND(!m_rTree.getLocation().isRoot(),"INTERNAL ERROR: Empty location used.");
-	OSL_PRECOND(m_rTree.getOptions().isValid(),"INTERNAL ERROR: Invalid Options used.");
+	OSL_PRECOND(m_rTree.getOptions().is(),"INTERNAL ERROR: Invalid Options used.");
 
-    if (!m_rTree.getOptions().isValid()) return;
+    if (!m_rTree.getOptions().is()) return;
 
     RequestOptions aOptions = m_rTree.getOptions()->getRequestOptions();
 
diff --git a/configmgr/source/api2/confignotifier.hxx b/configmgr/source/api2/confignotifier.hxx
index ccb273e..d676886 100644
--- configmgr/source/api2/confignotifier.hxx
+++ configmgr/source/api2/confignotifier.hxx
@@ -45,7 +45,7 @@
 #ifndef CONFIGMGR_UTILITY_HXX_
 #include "utility.hxx"
 #endif
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
 #ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
 #include <com/sun/star/lang/DisposedException.hpp>
@@ -101,7 +101,7 @@ namespace configmgr
 		class Broadcaster;
 		class NotifierImpl;
 		class ApiTreeImpl;
-		typedef vos::ORef<NotifierImpl> NotifierHolder;
+		typedef rtl::Reference<NotifierImpl> NotifierHolder;
 
 		namespace css = ::com::sun::star;
 // ---------------------------------------------------------------------------------------------------
diff --git a/configmgr/source/api2/confprovider2.cxx b/configmgr/source/api2/confprovider2.cxx
index 8c354b1..5dd179e 100644
--- configmgr/source/api2/confprovider2.cxx
+++ configmgr/source/api2/confprovider2.cxx
@@ -89,7 +89,7 @@ namespace configmgr
 	namespace lang = css::lang;
 	namespace beans = css::beans;
 	using ::rtl::OUString;
-	using ::vos::ORef;
+	using ::rtl::Reference;
 	using namespace osl;
 
 	namespace 
diff --git a/configmgr/source/api2/confprovider2.hxx b/configmgr/source/api2/confprovider2.hxx
index b9ab461..33bdac6 100644
--- configmgr/source/api2/confprovider2.hxx
+++ configmgr/source/api2/confprovider2.hxx
@@ -50,7 +50,7 @@ namespace configmgr
 	namespace uno  = css::uno;
 	namespace lang = css::lang;
 	using ::rtl::OUString;
-	using ::vos::ORef;
+	using ::rtl::Reference;
 	
 	class OConfigurationProviderImpl;
    
diff --git a/configmgr/source/api2/groupobjects.hxx b/configmgr/source/api2/groupobjects.hxx
index 493a28e..3343b73 100644
--- configmgr/source/api2/groupobjects.hxx
+++ configmgr/source/api2/groupobjects.hxx
@@ -226,7 +226,7 @@ namespace configmgr
 	{
 	public:
 		// Construction/Destruction 
-		ORootElementGroupInfo(ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+		ORootElementGroupInfo(ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 		: m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree, _xOptions)
 		{
 		}
@@ -260,7 +260,7 @@ namespace configmgr
 	{
 	public:
 		// Construction/Destruction 
-		ORootElementGroupUpdate(ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+		ORootElementGroupUpdate(ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 		: m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree, _xOptions)
 		{
 		}
diff --git a/configmgr/source/api2/notifierimpl.hxx b/configmgr/source/api2/notifierimpl.hxx
index 4f80b68..40d5d3c 100644
--- configmgr/source/api2/notifierimpl.hxx
+++ configmgr/source/api2/notifierimpl.hxx
@@ -50,7 +50,7 @@
 
 #include "propertiesfilterednotifier.hxx"
 
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 
 namespace configmgr
 {
@@ -59,7 +59,7 @@ namespace configmgr
 // ---------------------------------------------------------------------------------------------------
 
 		/// manages collections of event listeners observing a whole config tree, thread-safe
-		class NotifierImpl : public vos::OReference
+		class NotifierImpl : public salhelper::SimpleReferenceObject
 		{
 		public:
 			typedef configuration::SubNodeID        SubNodeID;
diff --git a/configmgr/source/api2/objectregistry.hxx b/configmgr/source/api2/objectregistry.hxx
index e2915b0..3a12457 100644
--- configmgr/source/api2/objectregistry.hxx
+++ configmgr/source/api2/objectregistry.hxx
@@ -41,7 +41,7 @@
 #endif
 
 #include <osl/mutex.hxx>
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 
 #include <hash_map>
 #include "tracer.hxx"
@@ -53,7 +53,7 @@ namespace configmgr
 
 		class NodeElement;
 
-		class ObjectRegistry : public vos::OReference
+		class ObjectRegistry : public salhelper::SimpleReferenceObject
 		{
 		public:
 			typedef configuration::NodeID Key;
diff --git a/configmgr/source/api2/propertiesfilterednotifier.cxx b/configmgr/source/api2/propertiesfilterednotifier.cxx
index d2a0bed..1567527 100644
--- configmgr/source/api2/propertiesfilterednotifier.cxx
+++ configmgr/source/api2/propertiesfilterednotifier.cxx
@@ -64,7 +64,7 @@ PropertiesFilteredNotifier::PropertiesFilteredNotifier(
 	Reference< beans::XPropertiesChangeListener >const& xTarget,
 	Sequence< OUString > const& aFilterNames
 )
-: m_aRefCount()
+: m_nRefCount( 0 )
 , m_xTarget(xTarget)
 , m_aFilterNames(aFilterNames)
 {
@@ -80,13 +80,13 @@ PropertiesFilteredNotifier::~PropertiesFilteredNotifier()
 
 void SAL_CALL PropertiesFilteredNotifier::acquire() throw()
 {
-	m_aRefCount.acquire();
+	osl_incrementInterlockedCount( &m_nRefCount );
 }
 //-----------------------------------------------------------------------------
 
 void SAL_CALL PropertiesFilteredNotifier::release(  ) throw()
 {
-	if (m_aRefCount.release() == 0)
+	if ( osl_decrementInterlockedCount( &m_nRefCount ) == 0 )
 		delete this;
 }
 //-----------------------------------------------------------------------------
diff --git a/configmgr/source/api2/propertiesfilterednotifier.hxx b/configmgr/source/api2/propertiesfilterednotifier.hxx
index 3e7ed28..68b1810 100644
--- configmgr/source/api2/propertiesfilterednotifier.hxx
+++ configmgr/source/api2/propertiesfilterednotifier.hxx
@@ -40,7 +40,7 @@
 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
 #endif
 
-#include <vos/refernce.hxx>
+#include <osl/interlck.h>
 
 namespace configmgr
 {
@@ -76,7 +76,7 @@ namespace configmgr
 
 		bool implAccept(const ::com::sun::star::beans::PropertyChangeEvent& evt) const;
 
-		::vos::ORefCount m_aRefCount;
+		oslInterlockedCount m_nRefCount;
 		::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > m_xTarget;
 		::com::sun::star::uno::Sequence< ::rtl::OUString > m_aFilterNames;
 	};
diff --git a/configmgr/source/api2/provider.cxx b/configmgr/source/api2/provider.cxx
index caeae69..960a225 100644
--- configmgr/source/api2/provider.cxx
+++ configmgr/source/api2/provider.cxx
@@ -75,7 +75,7 @@ namespace configmgr
 	namespace lang = css::lang;
 	namespace beans = css::beans;
 	using ::rtl::OUString;
-	using ::vos::ORef;
+	using ::rtl::Reference;
 	using namespace osl;
 
 	// -----------------------------------------------------------------------------
diff --git a/configmgr/source/api2/provider.hxx b/configmgr/source/api2/provider.hxx
index f6d9b3d..00385c6 100644
--- configmgr/source/api2/provider.hxx
+++ configmgr/source/api2/provider.hxx
@@ -60,8 +60,8 @@
 #ifndef _RTL_USTRING_HXX_
 #include <rtl/ustring.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CPPUHELPER_IMPLBASE4_HXX_
 #include <cppuhelper/implbase4.hxx>
@@ -78,7 +78,7 @@ namespace configmgr
 	namespace beans = css::beans;
     namespace util = css::util;
 	using ::rtl::OUString;
-	using ::vos::ORef;	
+	using ::rtl::Reference;	
 
 	class Module;	
 	class ContextReader;
diff --git a/configmgr/source/api2/setobjects.hxx b/configmgr/source/api2/setobjects.hxx
index 632103b..242d336 100644
--- configmgr/source/api2/setobjects.hxx
+++ configmgr/source/api2/setobjects.hxx
@@ -289,7 +289,7 @@ namespace configmgr
 	{
 	public:
 		// Construction/Destruction 
-		ORootElementSetInfo(ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+		ORootElementSetInfo(ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 			: m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree,_xOptions)
 		{
 		}
@@ -321,7 +321,7 @@ namespace configmgr
 	{
 	public:
 		// Construction/Destruction 
-		ORootElementTreeSetUpdate(ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+		ORootElementTreeSetUpdate(ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 		: m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree, _xOptions)
 		{
 		}
@@ -355,7 +355,7 @@ namespace configmgr
 	{
 	public:
 		// Construction/Destruction 
-		ORootElementValueSetUpdate(ApiProvider& rProvider, configuration::Tree const& aTree, vos::ORef< OOptions >const& _xOptions)
+		ORootElementValueSetUpdate(ApiProvider& rProvider, configuration::Tree const& aTree, rtl::Reference< OOptions >const& _xOptions)
 		: m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree,_xOptions)
 		{
 		}
diff --git a/configmgr/source/inc/commontypes.hxx b/configmgr/source/inc/commontypes.hxx
index c7367e9..d9e68cf 100644
--- configmgr/source/inc/commontypes.hxx
+++ configmgr/source/inc/commontypes.hxx
@@ -60,7 +60,7 @@ namespace configmgr
 //==========================================================================
 //= IInterface
 //==========================================================================
-/** abstract base class for objects which may be aquired by ORef's
+/** abstract base class for objects which may be aquired by rtl::Reference's
 	(in opposite to the IReference, classes deriving from this IInterface can be
 	derived from XInterface, too)
 */
diff --git a/configmgr/source/inc/options.hxx b/configmgr/source/inc/options.hxx
index d4fe629..c586464 100644
--- configmgr/source/inc/options.hxx
+++ configmgr/source/inc/options.hxx
@@ -50,8 +50,8 @@
 #ifndef CONFIGMGR_UTILITY_HXX_
 #include "utility.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace configmgr
@@ -111,7 +111,7 @@ namespace configmgr
         void enableAsync(bool _bEnable)         
         { m_aRequestOptions.enableAsync(_bEnable); }
 	};
-    typedef vos::ORef<OOptions> OptionsRef;
+    typedef rtl::Reference<OOptions> OptionsRef;
 
 	struct ltOptions
 	{
diff --git a/configmgr/source/treecache/cachewritescheduler.cxx b/configmgr/source/treecache/cachewritescheduler.cxx
index b954ab2..50d0ae3 100644
--- configmgr/source/treecache/cachewritescheduler.cxx
+++ configmgr/source/treecache/cachewritescheduler.cxx
@@ -62,7 +62,7 @@ void OCacheWriteScheduler::stopAndWriteCache()
     OSL_ASSERT(UnoApiLock::isHeld());
 	CFG_TRACE_INFO("Cancelling all cache writings, Stopping timer");
 	
-	if (m_xTimer.isValid())
+	if (m_xTimer.is())
 		m_xTimer->dispose(); // just to be sure	
 
 	runWriter();
diff --git a/configmgr/source/treecache/cachewritescheduler.hxx b/configmgr/source/treecache/cachewritescheduler.hxx
index cd8edb6..26e5e03 100644
--- configmgr/source/treecache/cachewritescheduler.hxx
+++ configmgr/source/treecache/cachewritescheduler.hxx
@@ -54,8 +54,8 @@
 #ifndef _VOS_TIMER_HXX_
 #include <vos/timer.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 
 #endif
 #ifndef _OSL_MUTEX_HXX_
@@ -93,7 +93,7 @@ namespace configmgr
 		};
 		friend void Timer::onShot();
 	private:
-	    vos::ORef<Timer>	      m_xTimer;
+	    rtl::Reference<Timer>	      m_xTimer;
 	    backend::CacheController &m_rTreeManager;
 	    CacheWriteList	      m_aWriteList;
 	    TimeInterval	      m_aWriteInterval;
diff --git a/configmgr/source/treecache/disposetimer.cxx b/configmgr/source/treecache/disposetimer.cxx
index 0ca82d5..df23693 100644
--- configmgr/source/treecache/disposetimer.cxx
+++ configmgr/source/treecache/disposetimer.cxx
@@ -119,7 +119,7 @@ void OTreeDisposeScheduler::stopAndClearTasks()
 	CFG_TRACE_INFO("Cancelling all data cleanup tasks, Stopping Cleanup timer");
 	CFG_TRACE_INFO_NI("- %d cleanup tasks were pending", int(m_aAgenda.size()) );
 
-	if (m_xTimer.isValid())
+	if (m_xTimer.is())
 		m_xTimer->dispose(); // just to be sure
 
 	m_aAgenda.clear();
diff --git a/configmgr/source/treecache/disposetimer.hxx b/configmgr/source/treecache/disposetimer.hxx
index 29b727f..a61eaa0 100644
--- configmgr/source/treecache/disposetimer.hxx
+++ configmgr/source/treecache/disposetimer.hxx
@@ -50,8 +50,8 @@
 #ifndef _VOS_TIMER_HXX_
 #include <vos/timer.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _COM_SUN_STAR_LANG_WRAPPEDTARGETEXCEPTION_HPP_ 
@@ -103,7 +103,7 @@ namespace configmgr
 
 	private:
         Agenda				m_aAgenda;
-		vos::ORef<Timer>	m_xTimer;
+		rtl::Reference<Timer>	m_xTimer;
 		CacheManager&		m_rTreeManager;
 
 		TimeInterval m_aCleanupDelay;
diff --git a/configmgr/source/treecache/invalidatetree.cxx b/configmgr/source/treecache/invalidatetree.cxx
index e3f589a..5a98bb9 100644
--- configmgr/source/treecache/invalidatetree.cxx
+++ configmgr/source/treecache/invalidatetree.cxx
@@ -108,7 +108,7 @@ std::auto_ptr<SubtreeChange> createDiffs(data::NodeAccess const& _aCachedNode,
 // -----------------------------------------------------------------------------	
 #if 0
 std::auto_ptr<ISubtree> TreeManager::loadNodeFromSession( AbsolutePath const& _aAbsoluteSubtreePath, 
-													 const vos::ORef < OOptions >& _xOptions,
+													 const rtl::Reference < OOptions >& _xOptions,
 													 sal_Int16 _nMinLevels)  CFG_UNO_THROW_ALL()
 {
 	TreeInfo* pInfo = this->requestTreeInfo(_xOptions,true /*create TreeInfo*/);
diff --git a/configmgr/source/treemgr/configset.cxx b/configmgr/source/treemgr/configset.cxx
index 5d05b2f..855f8e6 100644
--- configmgr/source/treemgr/configset.cxx
+++ configmgr/source/treemgr/configset.cxx
@@ -67,8 +67,8 @@
 #include "setnodeimpl.hxx"
 #endif
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 namespace configmgr
diff --git a/configmgr/source/treemgr/setnodeimpl.hxx b/configmgr/source/treemgr/setnodeimpl.hxx
index 4172673..2ba6ed2 100644
--- configmgr/source/treemgr/setnodeimpl.hxx
+++ configmgr/source/treemgr/setnodeimpl.hxx
@@ -113,7 +113,7 @@ namespace configmgr
             ElementTreeData(ElementTreeHolder const& _tree, bool _bDefault) 
              : tree(_tree), inDefault(_bDefault) {}
 
-            // ORef compatibility
+            // rtl::Reference compatibility
             sal_Bool isValid() const { return this->tree.is(); }
             ElementTreeImpl* get() const { return this->tree.get(); }
             ElementTreeHolder const& operator->() const { return this->tree; }
diff --git a/configmgr/workben/local_io/cfglocal.cxx b/configmgr/workben/local_io/cfglocal.cxx
index 0a3b119..3cf1777 100644
--- configmgr/workben/local_io/cfglocal.cxx
+++ configmgr/workben/local_io/cfglocal.cxx
@@ -455,7 +455,7 @@ void _cdecl main( int argc, char * argv[] )
 		return;
 	}
 
-	ORef< OSessionListener > xListener = new OSessionListener;
+	rtl::Reference< OSessionListener > xListener = new OSessionListener;
 	{
 /*
 		ORemoteSession aSession(xORB);
@@ -516,7 +516,7 @@ void testSession(const Reference< XMultiServiceFactory > &xORB, bool bPrint)
 		return;
 	}
 	
-	// aSession.setListener(xListener.getBodyPtr());
+	// aSession.setListener(xListener.get());
 	
 	OCondition aWaitForSomething;
 	aWaitForSomething.reset();
@@ -524,8 +524,8 @@ void testSession(const Reference< XMultiServiceFactory > &xORB, bool bPrint)
 	// --------- openNode ----------
 	char* pWriterNode = "com.sun.star.Setup/Modules";
 	if (bPrint) printf("\nsending an openNode request for %s ...\n", pWriterNode);
-	ORef< OOpenNodeCallback > xOpenCallback = new OOpenNodeCallback(aWaitForSomething);
-	aSession.openNode(UNI_STRING(pWriterNode), 2, xOpenCallback.getBodyPtr());
+	rtl::Reference< OOpenNodeCallback > xOpenCallback = new OOpenNodeCallback(aWaitForSomething);
+	aSession.openNode(UNI_STRING(pWriterNode), 2, xOpenCallback.get());
 	
 	aTimeout.Seconds = 30;
 	switch (aWaitForSomething.wait(&aTimeout))
diff --git a/configmgr/workben/local_io/simpletest.cxx b/configmgr/workben/local_io/simpletest.cxx
index 6a19214..0eca65e 100644
--- configmgr/workben/local_io/simpletest.cxx
+++ configmgr/workben/local_io/simpletest.cxx
@@ -660,9 +660,9 @@ void hash_test()
 // Fri Nov 10 15:10:45 2000
 // -----------------------------------------------------------------------------
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
-class Options : public vos::OReference
+class Options : public salhelper::SimpleReferenceObject
 {
 	int m_aValue;
 public:
@@ -674,18 +674,18 @@ public:
 
 class A
 {
-	vos::ORef<Options> m_aOptions;
+	rtl::Reference<Options> m_aOptions;
 public:
 	
-	vos::ORef<Options> getOptions() {return m_aOptions;}
-	void setOptions(vos::ORef<Options>& _aOptions) {
+	rtl::Reference<Options> getOptions() {return m_aOptions;}
+	void setOptions(rtl::Reference<Options>& _aOptions) {
 		m_aOptions = _aOptions;
 	}
 };
 
 void testRefs()
 {
-	vos::ORef<Options> aO = new Options;
+	rtl::Reference<Options> aO = new Options;
 	aO->setValue(10);
 
 	A a,b;
diff --git a/configmgr/workben/memory/treeload.hxx b/configmgr/workben/memory/treeload.hxx
index 8327cf5..65182fc 100644
--- configmgr/workben/memory/treeload.hxx
+++ configmgr/workben/memory/treeload.hxx
@@ -32,7 +32,7 @@ class OTreeLoad
 {
 	// LocalSession* m_pLocalSession; // in TreeMgr
 	TreeManager* m_pTreeMgr;
-	::vos::ORef<OOptions>		m_xDefaultOptions;
+	::rtl::Reference<OOptions>		m_xDefaultOptions;
 	uno::Reference<lang::XMultiServiceFactory> m_xServiceProvider;
 
 public:
diff --git a/connectivity/inc/connectivity/FValue.hxx b/connectivity/inc/connectivity/FValue.hxx
index 5d7ca6c..d3342ae 100644
--- connectivity/inc/connectivity/FValue.hxx
+++ connectivity/inc/connectivity/FValue.hxx
@@ -51,8 +51,8 @@
 #ifndef _COMPHELPER_STLTYPES_HXX_
 #include <comphelper/stl_types.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
 #include "connectivity/CommonTools.hxx"
@@ -374,7 +374,7 @@ namespace connectivity
 	};
 
 	/// ORowSetValueDecorator decorates a ORowSetValue so the value is "refcounted"
-	class ORowSetValueDecorator	: public ::vos::OReference
+	class ORowSetValueDecorator	: public ::salhelper::SimpleReferenceObject
 	{
 		ORowSetValue	m_aValue;	// my own value
 	public:
@@ -394,7 +394,7 @@ namespace connectivity
 		inline void setModified(sal_Bool _bModified)				{ m_aValue.setModified(_bModified); }
 
 	};
-	typedef ::vos::ORef<ORowSetValueDecorator> ORowSetValueDecoratorRef;
+	typedef ::rtl::Reference<ORowSetValueDecorator> ORowSetValueDecoratorRef;
 
 	// -------------------------------------------------------------------------
 	/// TSetBound is a unary_function to set the bound value with e.q. for_each call
@@ -455,12 +455,12 @@ namespace connectivity
 		sal_Int32 getParameterIndex(sal_Int32 _nId) const { return m_nParameterIndexes[_nId]; }
 	};
 
-	typedef ::vos::ORef< OAssignValues > ORefAssignValues;
+	typedef ::rtl::Reference< OAssignValues > ORefAssignValues;
 
 
 
-	typedef ::vos::ORef< OValueVector >					OValueRow;
-	typedef ::vos::ORef< OValueRefVector >				OValueRefRow;
+	typedef ::rtl::Reference< OValueVector >					OValueRow;
+	typedef ::rtl::Reference< OValueRefVector >				OValueRefRow;
 }
 
 #endif // #ifndef _CONNECTIVITY_FILE_VALUE_HXX_
diff --git a/connectivity/inc/connectivity/PColumn.hxx b/connectivity/inc/connectivity/PColumn.hxx
index de19d20..e2edd10 100644
--- connectivity/inc/connectivity/PColumn.hxx
+++ connectivity/inc/connectivity/PColumn.hxx
@@ -42,8 +42,8 @@
 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
 #include "connectivity/CommonTools.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HPP_
@@ -111,7 +111,7 @@ namespace connectivity
         public:
             /** creates a collection of OParseColumn, as described by a result set meta data instance.
             */
-            static ::vos::ORef< OSQLColumns >
+            static ::rtl::Reference< OSQLColumns >
                 createColumnsForResultSet(
                     const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData >& _rxResMetaData,
                     const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData
diff --git a/connectivity/inc/connectivity/sqliterator.hxx b/connectivity/inc/connectivity/sqliterator.hxx
index 06cbb58..26f5f89 100644
--- connectivity/inc/connectivity/sqliterator.hxx
+++ connectivity/inc/connectivity/sqliterator.hxx
@@ -56,8 +56,8 @@
 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
 #include "connectivity/CommonTools.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CPPUHELPER_WEAK_HXX_
 #include <cppuhelper/weak.hxx>
@@ -91,11 +91,11 @@ namespace connectivity
 		const OSQLParseNode*				            m_pParseTree;		// aktueller ParseTree
 		const OSQLParser&					            m_rParser;			// if set used for general error messages from the context
 		OSQLStatementType					            m_eStatementType;	// Art des Statements
-		::vos::ORef<OSQLColumns>			            m_aSelectColumns;	// alle Spalten aus dem Select-Clause
-		::vos::ORef<OSQLColumns>			            m_aParameters;		// all parameters
-		::vos::ORef<OSQLColumns>			            m_aGroupColumns;	// the group by columns
-		::vos::ORef<OSQLColumns>			            m_aOrderColumns;	// the order by columns
-		::vos::ORef<OSQLColumns>			            m_aCreateColumns;	// the columns for Create table clause
+		::rtl::Reference<OSQLColumns>			            m_aSelectColumns;	// alle Spalten aus dem Select-Clause
+		::rtl::Reference<OSQLColumns>			            m_aParameters;		// all parameters
+		::rtl::Reference<OSQLColumns>			            m_aGroupColumns;	// the group by columns
+		::rtl::Reference<OSQLColumns>			            m_aOrderColumns;	// the order by columns
+		::rtl::Reference<OSQLColumns>			            m_aCreateColumns;	// the columns for Create table clause
 
         ::std::auto_ptr< OSQLParseTreeIteratorImpl >    m_pImpl;
 
@@ -142,8 +142,8 @@ namespace connectivity
             const ::rtl::OUString & rColumnName, const ::rtl::OUString & rTableRange, bool _bLookInSubTables );
 
 	  protected:
-		void setSelectColumnName(::vos::ORef<OSQLColumns>& _rColumns,const ::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString & rTableRange,sal_Bool bFkt=sal_False,sal_Int32 _nType = com::sun::star::sdbc::DataType::VARCHAR,sal_Bool bAggFkt=sal_False);
-		void appendColumns(::vos::ORef<OSQLColumns>& _rColumns,const ::rtl::OUString& _rTableAlias,const OSQLTable& _rTable);
+		void setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString & rTableRange,sal_Bool bFkt=sal_False,sal_Int32 _nType = com::sun::star::sdbc::DataType::VARCHAR,sal_Bool bAggFkt=sal_False);
+		void appendColumns(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString& _rTableAlias,const OSQLTable& _rTable);
 		// Weitere Member-Variable, die in den "set"-Funktionen zur
 		// Verfuegung stehen sollen, koennen in der abgeleiteten Klasse
 		// definiert werden und z. B. in deren Konstruktor initialisiert
@@ -235,11 +235,11 @@ namespace connectivity
 		// Die TableRangeMap enth"alt alle Tabellen unter dem zugeh"origen Rangenamen der zuerst gefunden wird
 		const OSQLTables& getTables() const;
 
-		::vos::ORef<OSQLColumns> getSelectColumns() const { return m_aSelectColumns;}
-		::vos::ORef<OSQLColumns> getGroupColumns() const { return m_aGroupColumns;}
-		::vos::ORef<OSQLColumns> getOrderColumns() const { return m_aOrderColumns;}
-		::vos::ORef<OSQLColumns> getParameters()	const { return m_aParameters; }
-		::vos::ORef<OSQLColumns> getCreateColumns() const { return m_aCreateColumns;}
+		::rtl::Reference<OSQLColumns> getSelectColumns() const { return m_aSelectColumns;}
+		::rtl::Reference<OSQLColumns> getGroupColumns() const { return m_aGroupColumns;}
+		::rtl::Reference<OSQLColumns> getOrderColumns() const { return m_aOrderColumns;}
+		::rtl::Reference<OSQLColumns> getParameters()	const { return m_aParameters; }
+		::rtl::Reference<OSQLColumns> getCreateColumns() const { return m_aCreateColumns;}
 
 		/** return the columname and the table range
 			@param	_pColumnRef
diff --git a/connectivity/inc/pch/precompiled_connectivity.hxx b/connectivity/inc/pch/precompiled_connectivity.hxx
index 12e3d55..796ec58 100644
--- connectivity/inc/pch/precompiled_connectivity.hxx
+++ connectivity/inc/pch/precompiled_connectivity.hxx
@@ -332,9 +332,9 @@
 #include "unotools/sharedunocomponent.hxx"
 
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
-#include "vos/ref.hxx"		
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "rtl/ref.hxx"		
+#include "salhelper/simplereferenceobject.hxx"
 #include "vos/timer.hxx"
 //---MARKER---
 
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index e39e3c1..fc80ced 100644
--- connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -484,7 +484,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull(  ) throw(SQLException, Ru
 	checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
 
 
-	if(m_aRowsIter == m_aRows.end() || !(*m_aRowsIter)[m_nColPos].isValid())
+	if(m_aRowsIter == m_aRows.end() || !(*m_aRowsIter)[m_nColPos].is())
 		return sal_True;
 
 	return (*m_aRowsIter)[m_nColPos]->getValue().isNull();
@@ -660,7 +660,7 @@ const ORowSetValue& ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex)
 	checkIndex(columnIndex );
 	m_nColPos = columnIndex;
 
-	if(m_aRowsIter != m_aRows.end() && (*m_aRowsIter)[columnIndex].isValid())
+	if(m_aRowsIter != m_aRows.end() && (*m_aRowsIter)[columnIndex].is())
 		return *(*m_aRowsIter)[columnIndex];
 	return m_aEmptyValue;
 }
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 76ec31f..bdeee76 100644
--- connectivity/source/commontools/TSortIndex.cxx
+++ connectivity/source/commontools/TSortIndex.cxx
@@ -95,11 +95,11 @@ struct TKeyValueFunc : ::std::binary_function<OSortIndex::TIntValuePairVector::v
 };
 
 // -----------------------------------------------------------------------------
-::vos::ORef<OKeySet> OSortIndex::CreateKeySet()
+::rtl::Reference<OKeySet> OSortIndex::CreateKeySet()
 {
 	Freeze();
 
-	::vos::ORef<OKeySet> pKeySet = new OKeySet();
+	::rtl::Reference<OKeySet> pKeySet = new OKeySet();
 	pKeySet->reserve(m_aKeyValues.size());
 	::std::transform(m_aKeyValues.begin()
 					,m_aKeyValues.end()
diff --git a/connectivity/source/cpool/ZConnectionPool.hxx b/connectivity/source/cpool/ZConnectionPool.hxx
index 44c2134..ddc240d 100644
--- connectivity/source/cpool/ZConnectionPool.hxx
+++ connectivity/source/cpool/ZConnectionPool.hxx
@@ -68,8 +68,8 @@
 #ifndef _VOS_TIMER_HXX_ 
 #include <vos/timer.hxx>
 #endif
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _RTL_DIGEST_H_ 
 #include <rtl/digest.h>
@@ -150,7 +150,7 @@ namespace connectivity
 		TActiveConnectionMap	m_aActiveConnections;	// the currently active connections
 
 		::osl::Mutex			m_aMutex;
-		::vos::ORef<OPoolTimer>	m_xInvalidator;			// invalidates the conntection pool when shot
+		::rtl::Reference<OPoolTimer>	m_xInvalidator;			// invalidates the conntection pool when shot
 		
 		::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >				m_xDriver;		// the one and only driver for this connectionpool
 		::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >			m_xDriverNode;	// config node entry
diff --git a/connectivity/source/dbtools/makefile.mk b/connectivity/source/dbtools/makefile.mk
index 66f9519..5bbb76c 100644
--- connectivity/source/dbtools/makefile.mk
+++ connectivity/source/dbtools/makefile.mk
@@ -66,6 +66,7 @@ SHL1STDLIBS=\
 	$(CPPUHELPERLIB)			\
 	$(VOSLIB)					\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(JVMACCESSLIB)				\
 	$(UNOTOOLSLIB)	\
 	$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/adabas/BConnection.cxx b/connectivity/source/drivers/adabas/BConnection.cxx
index 48865ba..f20ef84 100644
--- connectivity/source/drivers/adabas/BConnection.cxx
+++ connectivity/source/drivers/adabas/BConnection.cxx
@@ -292,9 +292,9 @@ Sequence< sal_Int8 > OAdabasConnection::getUnoTunnelImplementationId()
 	return new OAdabasConnection(m_pDriverHandleCopy,m_pDriver);
 }
 // -----------------------------------------------------------------------------
-::vos::ORef<OSQLColumns> OAdabasConnection::createSelectColumns(const ::rtl::OUString& _rSql)
+::rtl::Reference<OSQLColumns> OAdabasConnection::createSelectColumns(const ::rtl::OUString& _rSql)
 {
-	::vos::ORef<OSQLColumns> aRet;
+	::rtl::Reference<OSQLColumns> aRet;
 	OSQLParser aParser(getDriver()->getORB());
 	::rtl::OUString sErrorMessage;
 	OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_rSql);
diff --git a/connectivity/source/drivers/adabas/BResultSetMetaData.cxx b/connectivity/source/drivers/adabas/BResultSetMetaData.cxx
index bd185f0..9541e6e 100644
--- connectivity/source/drivers/adabas/BResultSetMetaData.cxx
+++ connectivity/source/drivers/adabas/BResultSetMetaData.cxx
@@ -54,7 +54,7 @@ using namespace com::sun::star::uno;
 using namespace connectivity::adabas;
 using namespace connectivity;
 
-OAdabasResultSetMetaData::OAdabasResultSetMetaData(odbc::OConnection*	_pConnection, SQLHANDLE _pStmt,const ::vos::ORef<OSQLColumns>& _rSelectColumns )
+OAdabasResultSetMetaData::OAdabasResultSetMetaData(odbc::OConnection*	_pConnection, SQLHANDLE _pStmt,const ::rtl::Reference<OSQLColumns>& _rSelectColumns )
 : OAdabasResultSetMetaData_BASE(_pConnection,_pStmt)
 ,m_aSelectColumns(_rSelectColumns)
 {
@@ -83,7 +83,7 @@ sal_Int32 SAL_CALL OAdabasResultSetMetaData::isNullable( sal_Int32 column ) thro
 {
 	sal_Int32 nValue = 0;
 	sal_Bool bFound = sal_False;
-	if ( m_aSelectColumns.isValid() && column > 0 && column <= (sal_Int32)m_aSelectColumns->size() )
+	if ( m_aSelectColumns.is() && column > 0 && column <= (sal_Int32)m_aSelectColumns->size() )
 		bFound = (*m_aSelectColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nValue;
 
 	if ( !bFound )
@@ -93,7 +93,7 @@ sal_Int32 SAL_CALL OAdabasResultSetMetaData::isNullable( sal_Int32 column ) thro
 // -------------------------------------------------------------------------
 sal_Bool SAL_CALL OAdabasResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException)
 {
-	if ( m_aSelectColumns.isValid() && column > 0 && column <= (sal_Int32)m_aSelectColumns->size() )
+	if ( m_aSelectColumns.is() && column > 0 && column <= (sal_Int32)m_aSelectColumns->size() )
     {
         sal_Bool bAutoIncrement = sal_False;
         (*m_aSelectColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement;
diff --git a/connectivity/source/drivers/adabas/makefile.mk b/connectivity/source/drivers/adabas/makefile.mk
index d120f7d..4d944da 100644
--- connectivity/source/drivers/adabas/makefile.mk
+++ connectivity/source/drivers/adabas/makefile.mk
@@ -91,6 +91,7 @@ SHL1STDLIBS=\
 	$(CPPUHELPERLIB)			\
 	$(VOSLIB)					\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(ODBCBASELIB)				\
 	$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/calc/CColumns.cxx b/connectivity/source/drivers/calc/CColumns.cxx
index b259583..2b8c734 100644
--- connectivity/source/drivers/calc/CColumns.cxx
+++ connectivity/source/drivers/calc/CColumns.cxx
@@ -58,7 +58,7 @@ using namespace ::com::sun::star::container;
 sdbcx::ObjectType OCalcColumns::createObject(const ::rtl::OUString& _rName)
 {
 	OCalcTable* pTable = (OCalcTable*)m_pTable;
-	::vos::ORef<OSQLColumns> aCols = pTable->getTableColumns();
+	::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
 
 	OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 	sdbcx::ObjectType xRet;
diff --git a/connectivity/source/drivers/calc/makefile.mk b/connectivity/source/drivers/calc/makefile.mk
index 6cc4677..d111ef6 100644
--- connectivity/source/drivers/calc/makefile.mk
+++ connectivity/source/drivers/calc/makefile.mk
@@ -80,6 +80,7 @@ SHL1STDLIBS=\
 	$(SVTOOLLIB)				\
 	$(UCBHELPERLIB)				\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(DBFILELIB)				\
 	$(UNOTOOLSLIB)				\
diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx
index 5b2344b..fbfdbe8 100644
--- connectivity/source/drivers/dbase/DColumns.cxx
+++ connectivity/source/drivers/dbase/DColumns.cxx
@@ -68,7 +68,7 @@ sdbcx::ObjectType ODbaseColumns::createObject(const ::rtl::OUString& _rName)
 	ODbaseTable* pTable = (ODbaseTable*)m_pTable;
 
 	//	Reference< XFastPropertySet> xCol(pTable->getColumns()[_rName],UNO_QUERY);
-	::vos::ORef<OSQLColumns> aCols = pTable->getTableColumns();
+	::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
 	OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 
 	sdbcx::ObjectType xRet;
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 3bb3582..e77c415 100644
--- connectivity/source/drivers/dbase/DIndex.cxx
+++ connectivity/source/drivers/dbase/DIndex.cxx
@@ -630,7 +630,7 @@ BOOL ODbaseIndex::CreateImpl()
 	m_pFileStream->SetStreamSize(512);
 
 	sal_Int32 nType = 0;
-	::vos::ORef<OSQLColumns> aCols = m_pTable->getTableColumns();
+	::rtl::Reference<OSQLColumns> aCols = m_pTable->getTableColumns();
 
 	Reference< XPropertySet > xTableCol(*find(aCols->begin(),aCols->end(),aName,::comphelper::UStringMixEqual(isCaseSensitive())));
 
diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx
index 0057a2b..7cb24a3 100644
--- connectivity/source/drivers/dbase/DIndexColumns.cxx
+++ connectivity/source/drivers/dbase/DIndexColumns.cxx
@@ -70,7 +70,7 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const ::rtl::OUString& _rName
 {
 	const ODbaseTable* pTable = m_pIndex->getTable();
 
-	::vos::ORef<OSQLColumns> aCols = pTable->getTableColumns();
+	::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
 	OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 
 	Reference< XPropertySet > xCol;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 5f8ae8c..2f2e736 100644
--- connectivity/source/drivers/dbase/DTable.cxx
+++ connectivity/source/drivers/dbase/DTable.cxx
@@ -209,7 +209,7 @@ void ODbaseTable::fillColumns()
 	m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
 	m_pFileStream->Seek(32L);
 
-	if(!m_aColumns.isValid())
+	if(!m_aColumns.is())
 		m_aColumns = new OSQLColumns();
 	else
 		m_aColumns->clear();
@@ -392,7 +392,7 @@ void ODbaseTable::construct()
 			if (m_pMemoStream)
 				ReadMemoHeader();
 		}
-		//	if(!m_pColumns && (!m_aColumns.isValid() || !m_aColumns->size()))
+		//	if(!m_pColumns && (!m_aColumns.is() || !m_aColumns->size()))
 		fillColumns();
 
 		m_pFileStream->Seek(STREAM_SEEK_TO_END);
@@ -1444,7 +1444,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
 		if (xIndex.is())
 		{
 			// first check if the value is different to the old one and when if it conform to the index
-			if(pOrgRow.isValid() && (rRow[nPos]->getValue().isNull() || rRow[nPos] == (*pOrgRow)[nPos]))
+			if(pOrgRow.is() && (rRow[nPos]->getValue().isNull() || rRow[nPos] == (*pOrgRow)[nPos]))
 				continue;
 			else
 			{
@@ -1548,7 +1548,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
 			ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
 			OSL_ENSURE(pIndex,"ODbaseTable::UpdateBuffer: No Index returned!");
 			// Update !!
-			if (pOrgRow.isValid() && !rRow[nPos]->getValue().isNull() )//&& pVal->isModified())
+			if (pOrgRow.is() && !rRow[nPos]->getValue().isNull() )//&& pVal->isModified())
 				pIndex->Update(m_nFilePos,*(*pOrgRow)[nPos],*rRow[nPos]);
 			else
 				pIndex->Insert(m_nFilePos,*rRow[nPos]);
@@ -2213,7 +2213,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos)
         bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
         if ( bOk )
 		{
-            bOk = fetchRow( aRow, m_aColumns.getBody(), sal_True, sal_True);
+            bOk = fetchRow( aRow, *m_aColumns, sal_True, sal_True);
             if ( bOk )
 			{
 				// special handling when pos == 0 then we don't have to distinguish	between the two rows
diff --git a/connectivity/source/drivers/dbase/makefile.mk b/connectivity/source/drivers/dbase/makefile.mk
index f9fc84f..5c35ebe 100644
--- connectivity/source/drivers/dbase/makefile.mk
+++ connectivity/source/drivers/dbase/makefile.mk
@@ -110,6 +110,7 @@ SHL1STDLIBS=\
 	$(SVTOOLLIB)				\
 	$(UCBHELPERLIB)				\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(DBFILELIB)				\
 	$(UNOTOOLSLIB)				\
diff --git a/connectivity/source/drivers/evoab/LColumns.cxx b/connectivity/source/drivers/evoab/LColumns.cxx
index ade2bfa..9aae157 100644
--- connectivity/source/drivers/evoab/LColumns.cxx
+++ connectivity/source/drivers/evoab/LColumns.cxx
@@ -59,7 +59,7 @@ sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
 {
 
 	OEvoabTable* pTable = (OEvoabTable*)m_pTable;
-	::vos::ORef<OSQLColumns> aCols = pTable->getTableColumns();
+	::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
 	OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 	sdbcx::ObjectType xRet;
 	if(aIter != aCols->end())
diff --git a/connectivity/source/drivers/evoab/LConnection.cxx b/connectivity/source/drivers/evoab/LConnection.cxx
index e0d8f3b..a182e8f 100644
--- connectivity/source/drivers/evoab/LConnection.cxx
+++ connectivity/source/drivers/evoab/LConnection.cxx
@@ -90,7 +90,6 @@
 
 using namespace connectivity::evoab;
 using namespace connectivity::file;
-using namespace vos;
 
 typedef connectivity::file::OConnection  OConnection_B;
 
diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
index 5ca44bd..3d45cdc 100644
--- connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
+++ connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
@@ -116,7 +116,6 @@ using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::ucb;
 using namespace osl;
-using namespace vos;
 
 namespace connectivity
 {
diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx
index 0332b67..88c1e40 100644
--- connectivity/source/drivers/evoab/LFolderList.cxx
+++ connectivity/source/drivers/evoab/LFolderList.cxx
@@ -145,7 +145,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
 	// column count
 	xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
 
-	if(!m_aColumns.isValid())
+	if(!m_aColumns.is())
 		m_aColumns = new OSQLColumns();
 	else
 		m_aColumns->clear();
@@ -578,7 +578,7 @@ sal_Int32 SAL_CALL OEvoabFolderList::getInt( sal_Int32 _nColumnIndex ) throw(SQL
 // -----------------------------------------------------------------------------
 void OEvoabFolderList::initializeRow(sal_Int32 _nColumnCount)
 {
-	if(!m_aRow.isValid())
+	if(!m_aRow.is())
 	{
 		m_aRow	= new OValueVector(_nColumnCount);
 		(*m_aRow)[0].setBound(sal_True);
@@ -609,7 +609,7 @@ sal_Bool SAL_CALL OEvoabFolderList::next(  ) throw(SQLException, RuntimeExceptio
 
 sal_Int32 SAL_CALL OEvoabFolderList::getRow(  ) throw(SQLException, RuntimeException)
 {
-	sal_Bool bRet = fetchRow(m_aRow,getTableColumns().getBody());
+	sal_Bool bRet = fetchRow(m_aRow,*(getTableColumns()));
 	EVO_TRACE_STRING("OEvoabFolderList::getRow()::fetchRow() = %s\n", ::rtl::OUString::valueOf(bRet) );
 
 	return bRet;
diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx
index e4eb369..dba139a 100644
--- connectivity/source/drivers/evoab/LFolderList.hxx
+++ connectivity/source/drivers/evoab/LFolderList.hxx
@@ -75,7 +75,7 @@ namespace connectivity
 			sal_Int32						m_nFilePos;					// aktuelle IResultSetHelper::Movement
 			SvStream*						m_pFileStream;
 			OEvoabConnection*				m_pConnection;
-			::vos::ORef<OSQLColumns>		m_aColumns;
+			::rtl::Reference<OSQLColumns>		m_aColumns;
 			OValueRow						m_aRow;
 			sal_Bool						m_bIsNull;
 
@@ -91,7 +91,7 @@ namespace connectivity
 			OEvoabFolderList( OEvoabConnection* _pConnection);
 
 			OEvoabConnection* getConnection() const { return m_pConnection;}
-			::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;}
+			::rtl::Reference<OSQLColumns> getTableColumns() const {return m_aColumns;}
 			void construct(); // can throw any exception
 			static SvStream* createStream_simpleError( const String& _rFileName, StreamMode _eOpenMode);
 			void initializeRow(sal_Int32 _nColumnCount);
diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx
index aa8eb9b..c88e765 100644
--- connectivity/source/drivers/evoab/LTable.cxx
+++ connectivity/source/drivers/evoab/LTable.cxx
@@ -152,7 +152,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
 	// column count
 	xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
 
-	if(!m_aColumns.isValid())
+	if(!m_aColumns.is())
 		m_aColumns = new OSQLColumns();
 	else
 		m_aColumns->clear();
diff --git a/connectivity/source/drivers/evoab/makefile.mk b/connectivity/source/drivers/evoab/makefile.mk
index f5ffb63..60a98cb 100644
--- connectivity/source/drivers/evoab/makefile.mk
+++ connectivity/source/drivers/evoab/makefile.mk
@@ -89,6 +89,7 @@ SHL1STDLIBS=\
 	$(UNOTOOLSLIB)				\
 	$(UCBHELPERLIB)				\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(DBFILELIB)				\
 	$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index 39f427a..75ca508 100644
--- connectivity/source/drivers/evoab2/NConnection.cxx
+++ connectivity/source/drivers/evoab2/NConnection.cxx
@@ -80,7 +80,6 @@
 #endif
 
 using namespace connectivity::evoab;
-using namespace vos;
 using namespace dbtools;
 
 //------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 56aa644..a063d97 100644
--- connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -66,7 +66,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
 {
 }
 // -------------------------------------------------------------------------
-void OEvoabResultSetMetaData::setEvoabFields(const ::vos::ORef<connectivity::OSQLColumns> &xColumns) throw(SQLException)
+void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
 {
         OSQLColumns::const_iterator aIter;
         static const ::rtl::OUString aName(::rtl::OUString::createFromAscii("Name"));
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx
index 79526dc..45871eb 100644
--- connectivity/source/drivers/evoab2/NResultSetMetaData.hxx
+++ connectivity/source/drivers/evoab2/NResultSetMetaData.hxx
@@ -46,8 +46,8 @@
 #ifndef _CONNECTIVITY_EVOAB_CONNECTION_HXX_
 #include "NConnection.hxx"
 #endif 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #include <com/sun/star/connection/XConnection.hpp>
 namespace connectivity
@@ -68,7 +68,7 @@ namespace connectivity
 			virtual ~OEvoabResultSetMetaData();
 		public:
 		  OEvoabResultSetMetaData(const ::rtl::OUString& _aTableName);
-		  void setEvoabFields(const ::vos::ORef<connectivity::OSQLColumns> &xColumns) throw(::com::sun::star::sdbc::SQLException);
+		  void setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(::com::sun::star::sdbc::SQLException);
 		  inline sal_uInt32 fieldAtColumn(sal_Int32 columnIndex) const
                         { return m_aEvoabFields[columnIndex - 1]; }
 		  inline sal_Int32 getFieldSize() const 
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 8f12837..1b42406 100644
--- connectivity/source/drivers/evoab2/NStatement.cxx
+++ connectivity/source/drivers/evoab2/NStatement.cxx
@@ -499,13 +499,13 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const ::rtl::OUS
 	g_message( "Parsed SQL to sexpr '%s'\n", pSexpr );
 	g_free( pSexpr );
 #endif
- 	::vos::ORef<connectivity::OSQLColumns> xColumns;
+ 	::rtl::Reference<connectivity::OSQLColumns> xColumns;
 	if (pQuery)
 	{
 		pResult->construct( pQuery, aTable, bIsWithoutWhere );
 		e_book_query_unref( pQuery );
 		xColumns = m_aSQLIterator.getSelectColumns();
-		if (!xColumns.isValid())
+		if (!xColumns.is())
 		{
 			::dbtools::throwGenericSQLException(
 				::rtl::OUString::createFromAscii("Invalid selection of columns"),
diff --git a/connectivity/source/drivers/evoab2/makefile.mk b/connectivity/source/drivers/evoab2/makefile.mk
index ec9e1dd..c3ec517 100644
--- connectivity/source/drivers/evoab2/makefile.mk
+++ connectivity/source/drivers/evoab2/makefile.mk
@@ -94,6 +94,7 @@ SHL1STDLIBS=\
 	$(UNOTOOLSLIB)				\
 	$(UCBHELPERLIB)				\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(DBFILELIB)				\
 	$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index a9e6ed3..601b11b 100644
--- connectivity/source/drivers/file/FDriver.cxx
+++ connectivity/source/drivers/file/FDriver.cxx
@@ -233,7 +233,7 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByURL( const
 	return getDataDefinitionByConnection(connect(url,info));
 }
 // -----------------------------------------------------------------------------
-void OOperandParam::describe(const Reference< XPropertySet>& rColumn, ::vos::ORef<connectivity::OSQLColumns> rParameterColumns)
+void OOperandParam::describe(const Reference< XPropertySet>& rColumn, ::rtl::Reference<connectivity::OSQLColumns> rParameterColumns)
 {
 	// den alten namen beibehalten
 
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 3d8c5b5..ae96589 100644
--- connectivity/source/drivers/file/FPreparedStatement.cxx
+++ connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -134,7 +134,7 @@ void OPreparedStatement::disposing()
 
 
 	m_xMetaData = NULL;
-	if(m_aParameterRow.isValid())
+	if(m_aParameterRow.is())
 	{
 		m_aParameterRow->clear();
 		m_aParameterRow = NULL;
@@ -316,7 +316,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /
 	::osl::MutexGuard aGuard( m_aMutex );
 	checkAndResizeParameters(parameterIndex);
 
-	if ( m_aAssignValues.isValid() )
+	if ( m_aAssignValues.is() )
 		(*m_aAssignValues)[m_aParameterIndexes[parameterIndex]]->setNull();
 	else
 		(*m_aParameterRow)[parameterIndex]->setNull();
@@ -419,8 +419,8 @@ Reference<XResultSet> OPreparedStatement::initResultSet()
 	Reference<XResultSet> xRs(m_pResultSet);
 
 	// check if we got enough paramters
-	if ( (m_aParameterRow.isValid() && ( m_aParameterRow->size() -1 ) < m_xParamColumns->size()) ||
-		 (m_xParamColumns.isValid() && !m_aParameterRow.isValid() && !m_aParameterRow->empty()) )
+	if ( (m_aParameterRow.is() && ( m_aParameterRow->size() -1 ) < m_xParamColumns->size()) ||
+		 (m_xParamColumns.is() && !m_aParameterRow.is() && !m_aParameterRow->empty()) )
 		throw SQLException(::rtl::OUString::createFromAscii("Invalid count of parameters supplied!")
 							,*this
 							,::rtl::OUString::createFromAscii("S1000")
@@ -445,7 +445,7 @@ void SAL_CALL OPreparedStatement::release() throw()
 void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex)
 {
 	::connectivity::checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-	if ( m_aAssignValues.isValid() && (parameterIndex < 1 || parameterIndex >= static_cast<sal_Int32>(m_aParameterIndexes.size())) )
+	if ( m_aAssignValues.is() && (parameterIndex < 1 || parameterIndex >= static_cast<sal_Int32>(m_aParameterIndexes.size())) )
 		throwInvalidIndexException(*this);
 	else if ( static_cast<sal_Int32>((*m_aParameterRow).size()) <= parameterIndex )
 	{
@@ -453,7 +453,7 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex)
 		(*m_aParameterRow).resize(parameterIndex+1);
 		for ( ;i <= parameterIndex+1; ++i )
 		{
-			if ( !(*m_aParameterRow)[i].isValid() )
+			if ( !(*m_aParameterRow)[i].is() )
 				(*m_aParameterRow)[i] = new ORowSetValueDecorator;
 		}
 	}
@@ -464,7 +464,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal
 	::osl::MutexGuard aGuard( m_aMutex );
 	checkAndResizeParameters(parameterIndex);
 
-	if(m_aAssignValues.isValid())
+	if(m_aAssignValues.is())
 		*(*m_aAssignValues)[m_aParameterIndexes[parameterIndex]] = x;
 	else
 		*((*m_aParameterRow)[parameterIndex]) = x;
@@ -566,7 +566,7 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult)
 		USHORT nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an
 
 		// Nach zu substituierenden Parametern suchen:
-        size_t nCount = m_aAssignValues.isValid() ? m_aAssignValues->size() : 1; // 1 ist wichtig fuer die Kriterien
+        size_t nCount = m_aAssignValues.is() ? m_aAssignValues->size() : 1; // 1 ist wichtig fuer die Kriterien
         for (size_t j = 1; j < nCount; j++)
 		{
 			UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j);
@@ -579,19 +579,19 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult)
 			//	(*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter];
 		}
 
-		if (m_aParameterRow.isValid() &&  (m_xParamColumns->size()+1) != m_aParameterRow->size() )
+		if (m_aParameterRow.is() &&  (m_xParamColumns->size()+1) != m_aParameterRow->size() )
         {
             sal_Int32 i = m_aParameterRow->size();
             sal_Int32 nParamColumns = m_xParamColumns->size()+1;
 		    m_aParameterRow->resize(nParamColumns);
 		    for ( ;i <= nParamColumns; ++i )
 		    {
-			    if ( !(*m_aParameterRow)[i].isValid() )
+			    if ( !(*m_aParameterRow)[i].is() )
 				    (*m_aParameterRow)[i] = new ORowSetValueDecorator;
 		    }
 			//m_aParameterRow->resize(m_xParamColumns->size()+1);
         }
-		if (m_aParameterRow.isValid() && nParaCount < m_aParameterRow->size() )
+		if (m_aParameterRow.is() && nParaCount < m_aParameterRow->size() )
 		{
 
 			m_pSQLAnalyzer->bindParameterRow(m_aParameterRow);
@@ -604,7 +604,7 @@ void OPreparedStatement::parseParamterElem(const String& _sColumnName,OSQLParseN
 	Reference<XPropertySet> xCol;
 	m_xColNames->getByName(_sColumnName) >>= xCol;
 	sal_Int32 nParameter = -1;
-	if(m_xParamColumns.isValid())
+	if(m_xParamColumns.is())
 	{
 		OSQLColumns::const_iterator aIter = find(m_xParamColumns->begin(),m_xParamColumns->end(),_sColumnName,::comphelper::UStringMixEqual(m_pTable->isCaseSensitive()));
 		if(aIter != m_xParamColumns->end())
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 79710c4..6cd4fee 100644
--- connectivity/source/drivers/file/FResultSet.cxx
+++ connectivity/source/drivers/file/FResultSet.cxx
@@ -223,7 +223,7 @@ void OResultSet::clear()
 	m_pFileSet = NULL;
 	DELETEZ(m_pSortIndex);
 
-	if(m_aInsertRow.isValid())
+	if(m_aInsertRow.is())
 		m_aInsertRow->clear();
 
 	m_aSkipDeletedSet.clear();
@@ -573,12 +573,12 @@ sal_Bool OResultSet::evaluate()
 		{
 			if(m_pEvaluationKeySet)
 			{
-				bRet = m_pTable->fetchRow(m_aEvaluateRow,m_pTable->getTableColumns().getBody(),sal_True,sal_True);
+				bRet = m_pTable->fetchRow(m_aEvaluateRow,*(m_pTable->getTableColumns()),sal_True,sal_True);
 				evaluate();
 
 			}
 			else
-				bRet = m_pTable->fetchRow(m_aRow,m_xColumns.getBody(),sal_False,sal_True);
+				bRet = m_pTable->fetchRow(m_aRow,*m_xColumns,sal_False,sal_True);
 		}
 	}
 
@@ -629,8 +629,8 @@ void SAL_CALL OResultSet::insertRow(  ) throw(SQLException, RuntimeException)
 	// we know that we append new rows at the end
 	// so we have to know where the end is
 	m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_False);
-	m_bRowInserted = m_pTable->InsertRow(m_aInsertRow.getBody(), TRUE,Reference<XIndexAccess>(m_xColNames,UNO_QUERY));
-	if(m_bRowInserted && m_pFileSet.isValid())
+	m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, TRUE,Reference<XIndexAccess>(m_xColNames,UNO_QUERY));
+	if(m_bRowInserted && m_pFileSet.is())
 	{
 		sal_Int32 nPos = (*m_aInsertRow)[0]->getValue();
 		m_pFileSet->push_back(nPos);
@@ -648,7 +648,7 @@ void SAL_CALL OResultSet::updateRow(  ) throw(SQLException, RuntimeException)
 
 	if(!m_pTable || m_pTable->isReadOnly())
         ::dbtools::throwGenericSQLException( ::rtl::OUString::createFromAscii( "Table is readonly."), *this );
-	m_bRowUpdated = m_pTable->UpdateRow(m_aInsertRow.getBody(), m_aRow,Reference<XIndexAccess>(m_xColNames,UNO_QUERY));
+	m_bRowUpdated = m_pTable->UpdateRow(*m_aInsertRow, m_aRow,Reference<XIndexAccess>(m_xColNames,UNO_QUERY));
 	*(*m_aInsertRow)[0] = (sal_Int32)(*m_aRow)[0]->getValue();
 
 	clearInsertRow();
@@ -668,8 +668,8 @@ void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException)
         ::dbtools::throwGenericSQLException( ::rtl::OUString::createFromAscii( "Row was already deleted."), *this );
 
 	sal_Int32 nPos = (sal_Int32)(*m_aRow)[0]->getValue();
-	m_bRowDeleted = m_pTable->DeleteRow(m_xColumns.getBody());
-	if(m_bRowDeleted && m_pFileSet.isValid())
+	m_bRowDeleted = m_pTable->DeleteRow(*m_xColumns);
+	if(m_bRowDeleted && m_pFileSet.is())
 	{
 		m_aRow->setDeleted(sal_True);
 		// don't touch the m_pFileSet member here
@@ -688,7 +688,7 @@ void SAL_CALL OResultSet::cancelRowUpdates(  ) throw(SQLException, RuntimeExcept
 	m_bRowInserted	= sal_False;
 	m_bRowDeleted	= sal_False;
 
-	if(m_aInsertRow.isValid())
+	if(m_aInsertRow.is())
 	{
 		OValueRefVector::iterator aIter = m_aInsertRow->begin()+1;
 		for(;aIter != m_aInsertRow->end();++aIter)
@@ -891,11 +891,11 @@ again:
 
 	if (!bEvaluate)	// Laeuft keine Auswertung, dann nur Ergebniszeile fuellen
 	{
-		m_pTable->fetchRow(m_aRow,m_pTable->getTableColumns().getBody(), sal_True,bRetrieveData);
+		m_pTable->fetchRow(m_aRow,*(m_pTable->getTableColumns()), sal_True,bRetrieveData);
 	}
 	else
 	{
-		m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,bRetrieveData || m_pSQLAnalyzer->hasRestriction());
+		m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,bRetrieveData || m_pSQLAnalyzer->hasRestriction());
 
 		if ((!m_bShowDeleted && m_aEvaluateRow->isDeleted()) ||
             (m_pSQLAnalyzer->hasRestriction() && //!bShowDeleted && m_aEvaluateRow->isDeleted() ||// keine Anzeige von geloeschten Saetzen
@@ -912,7 +912,7 @@ again:
 					return sal_False;
 				}
 			}
-			else if (m_pFileSet.isValid())
+			else if (m_pFileSet.is())
 			{
 				OSL_ENSURE(//!m_pFileSet->IsFrozen() &&
 							eCursorPosition == IResultSetHelper::NEXT, "Falsche CursorPosition!");
@@ -953,14 +953,14 @@ again:
 	// Evaluate darf nur gesetzt sein,
 	// wenn der Keyset weiter aufgebaut	werden soll
 	if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount() &&
-		(m_pFileSet.isValid() || m_pSortIndex) && bEvaluate)
+		(m_pFileSet.is() || m_pSortIndex) && bEvaluate)
 	{
 		if (m_pSortIndex)
 		{
 			OKeyValue* pKeyValue = GetOrderbyKeyValue(m_aEvaluateRow);
 			m_pSortIndex->AddKeyValue(pKeyValue);
 		}
-		else if (m_pFileSet.isValid())
+		else if (m_pFileSet.is())
 		{
 			//	OSL_ENSURE(!m_pFileSet->IsFrozen() , "Falsche CursorPosition!");
 			sal_uInt32 nBookmarkValue = Abs((sal_Int32)(*m_aEvaluateRow)[0]->getValue());
@@ -973,13 +973,13 @@ again:
 		if (bEvaluate)
 		{
 			// jetzt die eigentliche Ergebniszeile Lesen
-			bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,TRUE);
+			bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,TRUE);
 		}
 
 		if (bOK)
 		{
 			// Nur die zu aendernden Werte uebergeben:
-			if(!m_pTable->UpdateRow(m_aAssignValues.getBody(),m_aEvaluateRow,Reference<XIndexAccess>(m_xColNames,UNO_QUERY)))
+			if(!m_pTable->UpdateRow(*m_aAssignValues,m_aEvaluateRow,Reference<XIndexAccess>(m_xColNames,UNO_QUERY)))
 				return sal_False;
 		}
 	}
@@ -988,11 +988,11 @@ again:
 		sal_Bool bOK = sal_True;
 		if (bEvaluate)
 		{
-			bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,TRUE);
+			bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,TRUE);
 		}
 		if (bOK)
 		{
-			if(!m_pTable->DeleteRow(m_xColumns.getBody()))
+			if(!m_pTable->DeleteRow(*m_xColumns))
 				return sal_False;
 		}
 	}
@@ -1012,7 +1012,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
 	if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT &&
 		!isCount())
 	{
-		if (!m_pFileSet.isValid()) // kein Index verfuegbar
+		if (!m_pFileSet.is()) // kein Index verfuegbar
 		{
 			// Normales FETCH
 			ExecuteRow(eCursorPosition,nOffset,FALSE,bRetrieveData);
@@ -1102,7 +1102,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
 					if (bOK)
 					{
 						// jetzt nochmal die Ergebnisse lesen
-						m_pTable->fetchRow(m_aRow, m_pTable->getTableColumns().getBody(), sal_True,bRetrieveData);
+						m_pTable->fetchRow(m_aRow, *(m_pTable->getTableColumns()), sal_True,bRetrieveData);
 
 						// now set the bookmark for outside
 						*(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1);
@@ -1190,7 +1190,7 @@ Error:
 			case IResultSetHelper::ABSOLUTE:
 			case IResultSetHelper::RELATIVE:
 				if (nOffset > 0)
-					m_nRowPos = m_pFileSet.isValid() ? (sal_Int32)m_pFileSet->size() : -1;
+					m_nRowPos = m_pFileSet.is() ? (sal_Int32)m_pFileSet->size() : -1;
 				else if (nOffset < 0)
 					m_nRowPos = -1;
 				break;
@@ -1421,7 +1421,7 @@ BOOL OResultSet::OpenImpl()
 					// Nun kann ueber den Index sortiert zugegriffen werden.
 				}
 
-				if (!m_pFileSet.isValid())
+				if (!m_pFileSet.is())
 				{
 					m_pFileSet = new OKeySet();
 
@@ -1436,8 +1436,8 @@ BOOL OResultSet::OpenImpl()
 						   m_pFileSet->push_back(i + 1);
 					}
 				}
-				OSL_ENSURE(m_pFileSet.isValid(),"Kein KeySet vorhanden! :-(");
-	DISTINCT:	if(bDistinct && m_pFileSet.isValid())   // sicher ist sicher
+				OSL_ENSURE(m_pFileSet.is(),"Kein KeySet vorhanden! :-(");
+	DISTINCT:	if(bDistinct && m_pFileSet.is())   // sicher ist sicher
 				{
 					OValueRow aSearchRow = new OValueVector(m_aRow->size());
 					OValueRefVector::iterator aRowIter = m_aRow->begin();
@@ -1571,8 +1571,8 @@ BOOL OResultSet::OpenImpl()
 		case SQL_STATEMENT_INSERT:
 			m_nRowCountResult = 0;
 
-			OSL_ENSURE(m_aAssignValues.isValid(),"No assign values set!");
-			if(!m_pTable->InsertRow(m_aAssignValues.getBody(), TRUE,m_xColsIdx))
+			OSL_ENSURE(m_aAssignValues.is(),"No assign values set!");
+			if(!m_pTable->InsertRow(*m_aAssignValues, TRUE,m_xColsIdx))
 			{
 				m_nFilePos  = 0;
 				return sal_False;
@@ -1617,7 +1617,7 @@ sal_Int64 OResultSet::getSomething( const Sequence< sal_Int8 > & rId ) throw (Ru
 // -----------------------------------------------------------------------------
 void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
 								   const OValueRefRow& _rSelectRow,
-								   const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns,
+								   const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,
 								   const Reference<XIndexAccess>& _xNames,
 								   sal_Bool _bSetColumnMapping,
 								   const Reference<XDatabaseMetaData>& _xMetaData,
@@ -1778,7 +1778,7 @@ void OResultSet::clearInsertRow()
 // -----------------------------------------------------------------------------
 void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount)
 {
-	if(!_rRow.isValid())
+	if(!_rRow.is())
 	{
 		_rRow	= new OValueRefVector(_nColumnCount);
 		(*_rRow)[0]->setBound(sal_True);
diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx
index 6f8271c..e9012a0 100644
--- connectivity/source/drivers/file/FResultSetMetaData.cxx
+++ connectivity/source/drivers/file/FResultSetMetaData.cxx
@@ -64,7 +64,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
 // -------------------------------------------------------------------------
-OResultSetMetaData::OResultSetMetaData(const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns,const ::rtl::OUString& _aTableName,OFileTable*	_pTable)
+OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const ::rtl::OUString& _aTableName,OFileTable*	_pTable)
     :m_aTableName(_aTableName)
 	,m_xColumns(_rxColumns)
 	,m_pTable(_pTable)
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index ffe89ff..b5beecd 100644
--- connectivity/source/drivers/file/FStatement.cxx
+++ connectivity/source/drivers/file/FStatement.cxx
@@ -172,7 +172,7 @@ void OStatement_BASE2::disposing()
 	if(m_pSQLAnalyzer)
 		m_pSQLAnalyzer->dispose();
 
-	if(m_aRow.isValid())
+	if(m_aRow.is())
 	{
 		m_aRow->clear();
 		m_aRow = NULL;
@@ -388,7 +388,7 @@ sal_Int32 SAL_CALL OStatement::executeUpdate( const ::rtl::OUString& sql ) throw
 // -----------------------------------------------------------------------------
 void SAL_CALL OStatement_Base::disposing(void)
 {
-	if(m_aEvaluateRow.isValid())
+	if(m_aEvaluateRow.is())
 	{
 		m_aEvaluateRow->clear();
 		m_aEvaluateRow = NULL;
@@ -479,7 +479,7 @@ void OStatement_Base::setOrderbyColumn(	OSQLParseNode* pColumnRef,
 	}
 	catch(Exception)
 	{
-		::vos::ORef<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns();
+		::rtl::Reference<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns();
 		::comphelper::UStringMixEqual aCase;
 		OSQLColumns::const_iterator aFind = ::connectivity::find(aSelectColumns->begin(),aSelectColumns->end(),aColumnName,aCase);
 		if ( aFind == aSelectColumns->end() )
@@ -578,7 +578,7 @@ void OStatement_Base::construct(const ::rtl::OUString& sql)  throw(SQLException,
 void OStatement_Base::createColumnMapping()
 {
 	// initialize the column index map (mapping select columns to table columns)
-	::vos::ORef<connectivity::OSQLColumns>	xColumns = m_aSQLIterator.getSelectColumns();
+	::rtl::Reference<connectivity::OSQLColumns>	xColumns = m_aSQLIterator.getSelectColumns();
 	m_aColMapping.resize(xColumns->size() + 1);
 	for (sal_Int32 i=0; i<(sal_Int32)m_aColMapping.size(); ++i)
 		m_aColMapping[i] = i;
@@ -620,7 +620,7 @@ void OStatement_Base::GetAssignValues()
 	else if (SQL_ISRULE(m_pParseTree,insert_statement))
 	{
 		// Row fuer die zu setzenden Werte anlegen (Referenz durch new)
-		if(m_aAssignValues.isValid())
+		if(m_aAssignValues.is())
 			m_aAssignValues->clear();
 		sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount();
 		m_aAssignValues = new OAssignValues(nCount);
@@ -727,7 +727,7 @@ void OStatement_Base::GetAssignValues()
 	}
 	else if (SQL_ISRULE(m_pParseTree,update_statement_searched))
 	{
-		if(m_aAssignValues.isValid())
+		if(m_aAssignValues.is())
 			m_aAssignValues->clear();
 		sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount();
 		m_aAssignValues = new OAssignValues(nCount);
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 7f6dbd3..a3b9eeb 100644
--- connectivity/source/drivers/file/fanalyzer.cxx
+++ connectivity/source/drivers/file/fanalyzer.cxx
@@ -109,9 +109,9 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode)
 					||	SQL_ISRULE(pColumnRef,length_exp)
 					||	SQL_ISRULE(pColumnRef,set_fct_spec) )
 				{
-					::vos::ORef<OPredicateCompiler>		pCompiler = new OPredicateCompiler(this);
+					::rtl::Reference<OPredicateCompiler>		pCompiler = new OPredicateCompiler(this);
 					pCompiler->setOrigColumns(m_aCompiler->getOrigColumns());
-					::vos::ORef<OPredicateInterpreter>	pInterpreter = new OPredicateInterpreter(pCompiler);
+					::rtl::Reference<OPredicateInterpreter>	pInterpreter = new OPredicateInterpreter(pCompiler);
 					pCompiler->execute( pColumnRef );
 					m_aSelectionEvaluations.push_back( TPredicates(pCompiler,pInterpreter) );
 				}
@@ -169,7 +169,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow)
 	OEvaluateSetList	aEvaluateSetList;
 	for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter)
 	{
-		if ( aIter->first.isValid() )
+		if ( aIter->first.is() )
 			bindRow( aIter->first->m_aCodeList,_pRow,aEvaluateSetList);
 	}
 }
@@ -213,7 +213,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow)
 }
 
 //------------------------------------------------------------------
-void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns)
+void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns)
 {
 	OCodeList& rCodeList	= m_aCompiler->m_aCodeList;
 	OCodeStack aCodeStack;
@@ -224,7 +224,7 @@ void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns)
 		return; // keine Parameter
 
     // Anlegen von Columns, die eine genauere Beschreibung fuer die enthalten
-	::vos::ORef<OSQLColumns> aNewParamColumns = new OSQLColumns(*rParameterColumns);
+	::rtl::Reference<OSQLColumns> aNewParamColumns = new OSQLColumns(*rParameterColumns);
 
 
     // Anlegen einer Testzeile, wird benoetigt um die Parameter zu beschreiben
@@ -294,7 +294,7 @@ BOOL OSQLAnalyzer::hasFunctions() const
 		m_bSelectionFirstTime = sal_False;
 		for ( ::std::vector< TPredicates >::const_iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end() && !m_bHasSelectionCode ;++aIter)
 		{
-			if ( aIter->first.isValid() )
+			if ( aIter->first.is() )
 				m_bHasSelectionCode = aIter->first->hasCode();
 		}
 	}
@@ -306,7 +306,7 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std:
 	sal_Int32 nPos = 1;
 	for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter,++nPos)
 	{
-		if ( aIter->second.isValid() )
+		if ( aIter->second.is() )
 		{
 			sal_Int32	map = nPos;
 			// the first column (index 0) is for convenience only. The first real select column is no 1.
@@ -322,7 +322,7 @@ void OSQLAnalyzer::dispose()
 	m_aCompiler->dispose();
 	for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter)
 	{
-		if ( aIter->first.isValid() )
+		if ( aIter->first.is() )
 			aIter->first->dispose();
 	}
 }
@@ -332,7 +332,7 @@ void OSQLAnalyzer::setOrigColumns(const OFileColumns& rCols)
 	m_aCompiler->setOrigColumns(rCols);
 	for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter)
 	{
-		if ( aIter->first.isValid() )
+		if ( aIter->first.is() )
 			aIter->first->setOrigColumns(rCols);
 	}
 }
diff --git a/connectivity/source/drivers/file/makefile.mk b/connectivity/source/drivers/file/makefile.mk
index 7d61182..1370a17 100644
--- connectivity/source/drivers/file/makefile.mk
+++ connectivity/source/drivers/file/makefile.mk
@@ -86,6 +86,7 @@ SHL1STDLIBS=\
 	$(SVTOOLLIB)				\
 	$(UCBHELPERLIB)				\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(UNOTOOLSLIB)				\
 	$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx
index 374be09..9dc5f8d 100644
--- connectivity/source/drivers/flat/EColumns.cxx
+++ connectivity/source/drivers/flat/EColumns.cxx
@@ -59,7 +59,7 @@ sdbcx::ObjectType OFlatColumns::createObject(const ::rtl::OUString& _rName)
 {
 
 	OFlatTable* pTable = (OFlatTable*)m_pTable;
-	::vos::ORef<OSQLColumns> aCols = pTable->getTableColumns();
+	::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
 	OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 	sdbcx::ObjectType xRet;
 	if(aIter != aCols->end())
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 600a9d8..43cc70e 100644
--- connectivity/source/drivers/flat/ETable.cxx
+++ connectivity/source/drivers/flat/ETable.cxx
@@ -149,7 +149,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
 	// column count
 	xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
 
-	if(!m_aColumns.isValid())
+	if(!m_aColumns.is())
 		m_aColumns = new OSQLColumns();
 	else
 		m_aColumns->clear();
diff --git a/connectivity/source/drivers/flat/makefile.mk b/connectivity/source/drivers/flat/makefile.mk
index 8edb9af..3e18d39 100644
--- connectivity/source/drivers/flat/makefile.mk
+++ connectivity/source/drivers/flat/makefile.mk
@@ -93,6 +93,7 @@ SHL1STDLIBS=\
 	$(UNOTOOLSLIB)				\
 	$(UCBHELPERLIB)				\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(DBTOOLSLIB)				\
 	$(DBFILELIB)				\
 	$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk
index 945244c..4a97b47 100644
--- connectivity/source/drivers/jdbc/makefile.mk
+++ connectivity/source/drivers/jdbc/makefile.mk
@@ -95,6 +95,7 @@ SHL1STDLIBS=\
 	$(CPPUHELPERLIB)			\
 	$(VOSLIB)					\
 	$(SALLIB)					\
+	$(SALHELPERLIB)					\
 	$(JVMACCESSLIB)				\
 	$(DBTOOLSLIB)				\
 	$(JVMFWKLIB)				\
diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx
index 75aa051..4178dfc 100644
--- connectivity/source/drivers/kab/KPreparedStatement.cxx
+++ connectivity/source/drivers/kab/KPreparedStatement.cxx
@@ -55,7 +55,7 @@ IMPLEMENT_SERVICE_INFO(KabPreparedStatement, "com.sun.star.sdbc.drivers.KabPrepa
 // -------------------------------------------------------------------------
 void KabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQLException)
 {
-	if ( !m_aParameterRow.isValid() )
+	if ( !m_aParameterRow.is() )
 		m_aParameterRow = new OValueVector();
 
 	if (nParams < 1)
@@ -70,10 +70,10 @@ void KabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQL
 // -------------------------------------------------------------------------
 void KabPreparedStatement::setKabFields() const throw(SQLException)
 {
-	::vos::ORef<connectivity::OSQLColumns> xColumns;	// selected columns
+	::rtl::Reference<connectivity::OSQLColumns> xColumns;	// selected columns
 
 	xColumns = m_aSQLIterator.getSelectColumns();
-	if (!xColumns.isValid())
+	if (!xColumns.is())
 	{
 		::dbtools::throwGenericSQLException(
 			::rtl::OUString::createFromAscii("Invalid selection of columns"),
@@ -119,7 +119,7 @@ void KabPreparedStatement::disposing()
 {
 	KabPreparedStatement_BASE::disposing();
 
-	if (m_aParameterRow.isValid())
+	if (m_aParameterRow.is())
 	{
 		m_aParameterRow->clear();
 		m_aParameterRow = NULL;
diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx
index 7d195dc..652882d 100644
--- connectivity/source/drivers/kab/KResultSetMetaData.cxx
+++ connectivity/source/drivers/kab/KResultSetMetaData.cxx
@@ -64,7 +64,7 @@ KabResultSetMetaData::~KabResultSetMetaData()
 {
 }
 // -------------------------------------------------------------------------
-void KabResultSetMetaData::setKabFields(const ::vos::ORef<connectivity::OSQLColumns> &xColumns) throw(SQLException)
+void KabResultSetMetaData::setKabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
 {
 	OSQLColumns::const_iterator aIter;
 	static const ::rtl::OUString aName(::rtl::OUString::createFromAscii("Name"));
diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.hxx b/connectivity/source/drivers/kab/KResultSetMetaData.hxx
index 238d242..c6032a6 100644
--- connectivity/source/drivers/kab/KResultSetMetaData.hxx
+++ connectivity/source/drivers/kab/KResultSetMetaData.hxx
@@ -49,8 +49,8 @@
 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
 #include <cppuhelper/implbase1.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace connectivity
@@ -79,7 +79,7 @@ namespace connectivity
 				{ return this; }
 
 			void setKabFields(
-				const ::vos::ORef<connectivity::OSQLColumns> &xColumns) throw(::com::sun::star::sdbc::SQLException);
+				const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(::com::sun::star::sdbc::SQLException);
 			inline sal_uInt32 fieldAtColumn(sal_Int32 columnIndex) const
 				{ return m_aKabFields[columnIndex - 1]; }
 
diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx
index 9d83761..9a76f8e 100644
--- connectivity/source/drivers/kab/KStatement.cxx
+++ connectivity/source/drivers/kab/KStatement.cxx
@@ -327,11 +327,11 @@ sal_Bool KabCommonStatement::isTableKnown(KabResultSet *pResult) const
 //------------------------------------------------------------------------------
 void KabCommonStatement::setKabFields(KabResultSet *pResult) const throw(SQLException)
 {
-	::vos::ORef<connectivity::OSQLColumns> xColumns;	// selected columns
+	::rtl::Reference<connectivity::OSQLColumns> xColumns;	// selected columns
 	KabResultSetMetaData *pMeta;				// meta information - holds the list of KAddressBook fields
 
 	xColumns = m_aSQLIterator.getSelectColumns();
-	if (!xColumns.isValid())
+	if (!xColumns.is())
 	{
 		::dbtools::throwGenericSQLException(
 			::rtl::OUString::createFromAscii("Invalid selection of columns"),
diff --git a/connectivity/source/drivers/kab/makefile.mk b/connectivity/source/drivers/kab/makefile.mk
index 67ce0a4..b3ba952 100644
--- connectivity/source/drivers/kab/makefile.mk
+++ connectivity/source/drivers/kab/makefile.mk
@@ -71,7 +71,8 @@ SHL1OBJS=$(SLOFILES)
 SHL1STDLIBS=\
     $(CPPULIB)                  \
     $(CPPUHELPERLIB)            \
-    $(SALLIB)
+    $(SALLIB)            \
+    $(SALHELPERLIB)
 
 SHL1DEPN=
 SHL1IMPLIB= i$(TARGET)
@@ -113,6 +114,7 @@ SHL2STDLIBS=\
     $(CPPUHELPERLIB)            \
     $(VOSLIB)                   \
     $(SALLIB)                   \
+    $(SALHELPERLIB)                   \
     $(DBTOOLSLIB)               \
     $(COMPHELPERLIB)            \
     $(KAB_LIB)
diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.hxx b/connectivity/source/drivers/mozab/MPreparedStatement.hxx
index 2219273..fda2e81 100644
--- connectivity/source/drivers/mozab/MPreparedStatement.hxx
+++ connectivity/source/drivers/mozab/MPreparedStatement.hxx
@@ -99,7 +99,7 @@ namespace connectivity
             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData >  m_xMetaData;
             sal_Bool                                    m_bPrepared;
             OResultSet*                                 m_pResultSet;
-            ::vos::ORef<connectivity::OSQLColumns>      m_xParamColumns;    // the parameter columns
+            ::rtl::Reference<connectivity::OSQLColumns>      m_xParamColumns;    // the parameter columns
             OValueRow                                   m_aParameterRow;
 
 
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index c75e6d0..9caf942 100644
--- connectivity/source/drivers/mozab/MResultSet.cxx
+++ connectivity/source/drivers/mozab/MResultSet.cxx
@@ -816,7 +816,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode*                 parseT
         return;
 
     if ( m_pSQLIterator->getParseTree() != NULL ) {
-        ::vos::ORef<OSQLColumns> xColumns = m_pSQLIterator->getParameters();
+        ::rtl::Reference<OSQLColumns> xColumns = m_pSQLIterator->getParameters();
         if(xColumns.isValid())
         {
             ::rtl::OUString aTabName,aColName,aParameterName,aParameterValue;
@@ -1418,7 +1418,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep
 // -----------------------------------------------------------------------------
 
 void OResultSet::setBoundedColumns(const OValueRow& _rRow,
-                                   const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns,
+                                   const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,
                                    const Reference<XIndexAccess>& _xNames,
                                    sal_Bool _bSetColumnMapping,
                                    const Reference<XDatabaseMetaData>& _xMetaData,
diff --git a/connectivity/source/drivers/mozab/MResultSet.hxx b/connectivity/source/drivers/mozab/MResultSet.hxx
index a14f385..ef9dc24 100644
--- connectivity/source/drivers/mozab/MResultSet.hxx
+++ connectivity/source/drivers/mozab/MResultSet.hxx
@@ -288,7 +288,7 @@ protected:
             ::std::vector< ::rtl::OUString> m_aAttributeStrings;
             sal_Int32                m_nParamIndex;
 			sal_Bool 				 m_bIsAlwaysFalseQuery;
-            ::vos::ORef<OKeySet>     m_pKeySet;
+            ::rtl::Reference<OKeySet>     m_pKeySet;
             OSortIndex*              m_pSortIndex;
 			sal_Int32 				  m_nNewRow;		//inserted row
 			sal_Int32					  m_nUpdatedRow;	//updated row
@@ -296,8 +296,8 @@ protected:
 			sal_Int32			          m_bIsReadOnly;
             inline void resetParameters() { m_nParamIndex = 0; }
 
-            ::vos::ORef<connectivity::OSQLColumns>  m_xColumns; // this are the select columns
-            ::vos::ORef<connectivity::OSQLColumns>  m_xParamColumns;
+            ::rtl::Reference<connectivity::OSQLColumns>  m_xColumns; // this are the select columns
+            ::rtl::Reference<connectivity::OSQLColumns>  m_xParamColumns;
             
             void parseParameter( const OSQLParseNode* pNode, rtl::OUString& rMatchString );
             void fillRowData() throw( ::com::sun::star::sdbc::SQLException );
@@ -345,7 +345,7 @@ public:
             void setParameterRow(const OValueRow& _rParaRow) 
                       { m_aParameterRow = _rParaRow; }
 
-            void setParameterColumns(const ::vos::ORef<connectivity::OSQLColumns>& _xParamColumns) 
+            void setParameterColumns(const ::rtl::Reference<connectivity::OSQLColumns>& _xParamColumns) 
                       { m_xParamColumns = _xParamColumns; }
 
             void setBindingRow(const OValueRow& _aRow) 
@@ -363,7 +363,7 @@ public:
 
             static void setBoundedColumns(
                 const OValueRow& _rRow, 
-                const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns, 
+                const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns, 
                 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xNames, 
                 sal_Bool _bSetColumnMapping, 
                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData, 
diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx
index d0b5ffe..ea4efd1 100644
--- connectivity/source/drivers/mozab/MResultSetMetaData.hxx
+++ connectivity/source/drivers/mozab/MResultSetMetaData.hxx
@@ -42,8 +42,8 @@
 #include <cppuhelper/implbase1.hxx>
 #endif
 #include <vector>
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef CONNECTIVITY_SCONNECTION_HXX
@@ -65,7 +65,7 @@ namespace connectivity
 		class OResultSetMetaData :	public 	OResultSetMetaData_BASE
 		{
             ::rtl::OUString                         m_aTableName;
-            ::vos::ORef<connectivity::OSQLColumns>  m_xColumns;
+            ::rtl::Reference<connectivity::OSQLColumns>  m_xColumns;
             OTable*                                 m_pTable;
 			sal_Bool								  m_bReadOnly;
 
@@ -74,7 +74,7 @@ namespace connectivity
 		public:
 			// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
 			// OResultSetMetaData(OConnection*	_pConnection) : m_pConnection(_pConnection){}
-            OResultSetMetaData(const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns,
+            OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,
                                const ::rtl::OUString& _aTableName,OTable* _pTable,sal_Bool aReadOnly
                                )
                  :m_aTableName(_aTableName)
diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx
index 3d9798e..87bfb51 100644
--- connectivity/source/drivers/mozab/MStatement.cxx
+++ connectivity/source/drivers/mozab/MStatement.cxx
@@ -236,7 +236,7 @@ void OStatement_Base::createTable( )
 {
     if(m_pParseTree)
     {
-        ::vos::ORef<connectivity::OSQLColumns> xCreateColumn;
+        ::rtl::Reference<connectivity::OSQLColumns> xCreateColumn;
         if (m_pSQLIterator->getStatementType() == SQL_STATEMENT_CREATE_TABLE)
         {
             const OSQLTables& xTabs = m_pSQLIterator->getTables();
@@ -545,7 +545,7 @@ void OStatement_Base::createColumnMapping()
     size_t i;
 
     // initialize the column index map (mapping select columns to table columns)
-	::vos::ORef<connectivity::OSQLColumns>	xColumns = m_pSQLIterator->getSelectColumns();
+	::rtl::Reference<connectivity::OSQLColumns>	xColumns = m_pSQLIterator->getSelectColumns();
 	m_aColMapping.resize(xColumns->size() + 1);
 	for (i=0; i<m_aColMapping.size(); ++i)
 		m_aColMapping[i] = i;
diff --git a/connectivity/source/drivers/odbc/makefile.mk b/connectivity/source/drivers/odbc/makefile.mk
index 4e2efbe..d08f371 100644
--- connectivity/source/drivers/odbc/makefile.mk
+++ connectivity/source/drivers/odbc/makefile.mk
@@ -79,7 +79,8 @@ SHL1STDLIBS=\
 	$(CPPUHELPERLIB)			\
 	$(CPPULIB)					\
 	$(VOSLIB)					\
-	$(SALLIB)
+	$(SALLIB)					\
+	$(SALHELPERLIB)
 
 SHL1DEPN=
 SHL1IMPLIB=	i$(ODBC2_TARGET)
diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx
index fc3e097..3727e07 100644
--- connectivity/source/inc/FDatabaseMetaDataResultSet.hxx
+++ connectivity/source/inc/FDatabaseMetaDataResultSet.hxx
@@ -81,8 +81,8 @@
 #ifndef _COMPHELPER_BROADCASTHELPER_HXX_ 
 #include <comphelper/broadcasthelper.hxx>
 #endif
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 namespace connectivity
diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx
index b30e40e..aafd4e5 100644
--- connectivity/source/inc/TSortIndex.hxx
+++ connectivity/source/inc/TSortIndex.hxx
@@ -107,7 +107,7 @@ namespace connectivity
 			CreateKeySet creates the keyset which vaalues could be used to travel in your table/result
 			The returned keyset is frozen.
 		*/
-		::vos::ORef<OKeySet> CreateKeySet();
+		::rtl::Reference<OKeySet> CreateKeySet();
 
 
 
diff --git a/connectivity/source/inc/adabas/BConnection.hxx b/connectivity/source/inc/adabas/BConnection.hxx
index baa9362..97320aa 100644
--- connectivity/source/inc/adabas/BConnection.hxx
+++ connectivity/source/inc/adabas/BConnection.hxx
@@ -47,8 +47,8 @@
 #ifndef _CPPUHELPER_WEAKREF_HXX_
 #include <cppuhelper/weakref.hxx>
 #endif
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace connectivity
@@ -90,7 +90,7 @@ namespace connectivity
 			virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
 			static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
 
-			::vos::ORef<OSQLColumns> createSelectColumns(const ::rtl::OUString& _rSql);
+			::rtl::Reference<OSQLColumns> createSelectColumns(const ::rtl::OUString& _rSql);
 		};
 	}
 }
diff --git a/connectivity/source/inc/adabas/BPreparedStatement.hxx b/connectivity/source/inc/adabas/BPreparedStatement.hxx
index 11c4436..5a8c276 100644
--- connectivity/source/inc/adabas/BPreparedStatement.hxx
+++ connectivity/source/inc/adabas/BPreparedStatement.hxx
@@ -48,7 +48,7 @@ namespace connectivity
 	{
 		class OAdabasPreparedStatement :	public	::connectivity::odbc::OPreparedStatement
 		{
-			::vos::ORef<OSQLColumns>	m_aSelectColumns;
+			::rtl::Reference<OSQLColumns>	m_aSelectColumns;
 		protected:
 			virtual odbc::OResultSet* createResulSet();
 			virtual void setResultSetConcurrency(sal_Int32 _par0)	;
diff --git a/connectivity/source/inc/adabas/BResultSet.hxx b/connectivity/source/inc/adabas/BResultSet.hxx
index 962cb49..19b56b7 100644
--- connectivity/source/inc/adabas/BResultSet.hxx
+++ connectivity/source/inc/adabas/BResultSet.hxx
@@ -45,9 +45,9 @@ namespace connectivity
 	{
 		class OAdabasResultSet :	public	::connectivity::odbc::OResultSet
 		{
-			::vos::ORef<OSQLColumns>	m_aSelectColumns;
+			::rtl::Reference<OSQLColumns>	m_aSelectColumns;
 		public:
-			OAdabasResultSet(SQLHANDLE _pStatementHandle,::connectivity::odbc::OStatement_Base* pStmt,const ::vos::ORef<OSQLColumns>& _rSelectColumns) 
+			OAdabasResultSet(SQLHANDLE _pStatementHandle,::connectivity::odbc::OStatement_Base* pStmt,const ::rtl::Reference<OSQLColumns>& _rSelectColumns) 
 			 : ::connectivity::odbc::OResultSet( _pStatementHandle,pStmt)
 			 ,m_aSelectColumns(_rSelectColumns)
 			{}
diff --git a/connectivity/source/inc/adabas/BResultSetMetaData.hxx b/connectivity/source/inc/adabas/BResultSetMetaData.hxx
index ed73855..ec5f9e9 100644
--- connectivity/source/inc/adabas/BResultSetMetaData.hxx
+++ connectivity/source/inc/adabas/BResultSetMetaData.hxx
@@ -38,8 +38,8 @@
 #ifndef _CONNECTIVITY_ODBC_ORESULTSETMETADATA_HXX_
 #include "odbc/OResultSetMetaData.hxx"
 #endif
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace connectivity
@@ -53,10 +53,10 @@ namespace connectivity
 		typedef odbc::OResultSetMetaData OAdabasResultSetMetaData_BASE;
 		class OAdabasResultSetMetaData :	public 	OAdabasResultSetMetaData_BASE
 		{
-			::vos::ORef<OSQLColumns>	m_aSelectColumns;
+			::rtl::Reference<OSQLColumns>	m_aSelectColumns;
 		public:
 			// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
-			OAdabasResultSetMetaData(odbc::OConnection*	_pConnection, SQLHANDLE _pStmt ,const ::vos::ORef<OSQLColumns>& _rSelectColumns);
+			OAdabasResultSetMetaData(odbc::OConnection*	_pConnection, SQLHANDLE _pStmt ,const ::rtl::Reference<OSQLColumns>& _rSelectColumns);
 			OAdabasResultSetMetaData(odbc::OConnection*	_pConnection, SQLHANDLE _pStmt ,const ::std::vector<sal_Int32> & _vMapping);
 			virtual ~OAdabasResultSetMetaData();
 
diff --git a/connectivity/source/inc/adabas/BStatement.hxx b/connectivity/source/inc/adabas/BStatement.hxx
index e82c733..1101a22 100644
--- connectivity/source/inc/adabas/BStatement.hxx
+++ connectivity/source/inc/adabas/BStatement.hxx
@@ -44,8 +44,8 @@
 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
 #include "connectivity/commontools.hxx"
 #endif
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace connectivity
@@ -55,7 +55,7 @@ namespace connectivity
 		class OAdabasStatement :	public	::connectivity::odbc::OStatement
 		{
 			OAdabasConnection*			m_pOwnConnection;
-			::vos::ORef<OSQLColumns>	m_aSelectColumns;
+			::rtl::Reference<OSQLColumns>	m_aSelectColumns;
 		protected:
 			virtual odbc::OResultSet* createResulSet();
 			virtual void setResultSetConcurrency(sal_Int32 _par0);
diff --git a/connectivity/source/inc/dbase/DIndexPage.hxx b/connectivity/source/inc/dbase/DIndexPage.hxx
index 30c579c..fe0db8e 100644
--- connectivity/source/inc/dbase/DIndexPage.hxx
+++ connectivity/source/inc/dbase/DIndexPage.hxx
@@ -39,8 +39,8 @@
 //#ifndef _REF_HXX
 //#include <tools/ref.hxx>		
 //#endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>		
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>		
 #endif
 #ifndef _STREAM_HXX
 #include <tools/stream.hxx>
@@ -66,7 +66,7 @@ namespace connectivity
 		//	SV_DECL_REF(ONDXPage); // Basisklasse da weitere Informationen gehalten werden muessen				
 
 		class ONDXPage;
-		typedef vos::ORef<ONDXPage>			ONDXPagePtr_BASE;
+		typedef rtl::Reference<ONDXPage>			ONDXPagePtr_BASE;
 		
 		class ONDXPagePtr : public ONDXPagePtr_BASE //ONDXPageRef
 		{
diff --git a/connectivity/source/inc/file/FPreparedStatement.hxx b/connectivity/source/inc/file/FPreparedStatement.hxx
index 6308298..6e0b227 100644
--- connectivity/source/inc/file/FPreparedStatement.hxx
+++ connectivity/source/inc/file/FPreparedStatement.hxx
@@ -81,7 +81,7 @@ namespace connectivity
             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData>	m_xMetaData;
             
 			OResultSet*											m_pResultSet;
-			::vos::ORef<connectivity::OSQLColumns>				m_xParamColumns;	// the parameter columns
+			::rtl::Reference<connectivity::OSQLColumns>				m_xParamColumns;	// the parameter columns
 
 			// factory method for resultset's
 			virtual OResultSet* createResultSet();
diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx
index 3313b66..892789d 100644
--- connectivity/source/inc/file/FResultSet.hxx
+++ connectivity/source/inc/file/FResultSet.hxx
@@ -149,14 +149,14 @@ namespace connectivity
 //			::std::vector<TInt2IntMap::iterator>	m_aBookmarksPositions;// vector of iterators to bookmark map, the order is the logical position
 			OSkipDeletedSet							m_aSkipDeletedSet;
 
-			::vos::ORef<OKeySet>					m_pFileSet;
+			::rtl::Reference<OKeySet>					m_pFileSet;
 			OKeySet::iterator						m_aFileSetIter;
 
 
 
 			OSortIndex*								m_pSortIndex;
-			::vos::ORef<connectivity::OSQLColumns>	m_xColumns;	// this are the select columns
-			::vos::ORef<connectivity::OSQLColumns>	m_xParamColumns;
+			::rtl::Reference<connectivity::OSQLColumns>	m_xColumns;	// this are the select columns
+			::rtl::Reference<connectivity::OSQLColumns>	m_xParamColumns;
 			OFileTable*								m_pTable;
 			connectivity::OSQLParseNode*			m_pParseTree;
 
@@ -335,7 +335,7 @@ namespace connectivity
 			sal_Int32 getRowCountResult() const { return m_nRowCountResult; }
 			void setParameterRow(const OValueRefRow& _rParaRow)						{ m_aParameterRow = _rParaRow; }
 			void setEvaluationRow(const OValueRefRow& _aRow)						{ m_aEvaluateRow = _aRow; }
-			void setParameterColumns(const ::vos::ORef<connectivity::OSQLColumns>&	_xParamColumns) { m_xParamColumns = _xParamColumns; }
+			void setParameterColumns(const ::rtl::Reference<connectivity::OSQLColumns>&	_xParamColumns) { m_xParamColumns = _xParamColumns; }
 			void setAssignValues(const ORefAssignValues& _aAssignValues)			{ m_aAssignValues = _aAssignValues; }
 			void setBindingRow(const OValueRefRow& _aRow)							{ m_aRow = _aRow; }
 			void setSelectRow(const OValueRefRow& _rRow)							{ m_aSelectRow = _rRow; }
@@ -350,7 +350,7 @@ namespace connectivity
 			void clear();
 			static void setBoundedColumns(const OValueRefRow& _rRow,
 									const OValueRefRow& _rSelectRow,
-									const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns,
+									const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,
 									const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xNames,
 									sal_Bool _bSetColumnMapping,
 									const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData,
diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx
index 6517524..6f65872 100644
--- connectivity/source/inc/file/FResultSetMetaData.hxx
+++ connectivity/source/inc/file/FResultSetMetaData.hxx
@@ -45,8 +45,8 @@
 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
 #include "connectivity/CommonTools.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace connectivity
@@ -62,7 +62,7 @@ namespace connectivity
 		class OResultSetMetaData :	public 	OResultSetMetaData_BASE
 		{
 			::rtl::OUString		m_aTableName;
-			::vos::ORef<connectivity::OSQLColumns>	m_xColumns;
+			::rtl::Reference<connectivity::OSQLColumns>	m_xColumns;
 			OFileTable*			m_pTable;
 
 			void checkColumnIndex(sal_Int32 column) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
@@ -70,7 +70,7 @@ namespace connectivity
 			virtual ~OResultSetMetaData();
 		public:
 			// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
-			OResultSetMetaData(const ::vos::ORef<connectivity::OSQLColumns>& _rxColumns,const ::rtl::OUString& _aTableName,OFileTable*	_pTable);
+			OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const ::rtl::OUString& _aTableName,OFileTable*	_pTable);
 
 			/// Avoid ambigous cast error from the compiler.
             inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx
index e4d96c0..3cdcfdd 100644
--- connectivity/source/inc/file/FTable.hxx
+++ connectivity/source/inc/file/FTable.hxx
@@ -70,7 +70,7 @@ namespace connectivity
 			::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >	m_xMetaData;
 			OConnection*										m_pConnection;
 			SvStream*											m_pFileStream;
-			::vos::ORef<OSQLColumns>							m_aColumns;
+			::rtl::Reference<OSQLColumns>							m_aColumns;
 			sal_Int32											m_nFilePos;					// aktuelle IResultSetHelper::Movement
 			sal_uInt8*											m_pBuffer;
 			sal_uInt16											m_nBufferSize;	// Groesse des ReadBuffer, wenn pBuffer != NULL
@@ -106,7 +106,7 @@ namespace connectivity
 			virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) = 0;
 			virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) = 0;
 
-			::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;}
+			::rtl::Reference<OSQLColumns> getTableColumns() const {return m_aColumns;}
 			virtual BOOL InsertRow(OValueRefVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
 			virtual BOOL DeleteRow(const OSQLColumns& _rCols);
 			virtual BOOL UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx
index b3a1355..52868c7 100644
--- connectivity/source/inc/file/fanalyzer.hxx
+++ connectivity/source/inc/file/fanalyzer.hxx
@@ -48,11 +48,11 @@ namespace connectivity
 		class OSQLAnalyzer
 		{
 			typedef ::std::list<OEvaluateSet*>		OEvaluateSetList;
-			typedef ::std::pair< ::vos::ORef<OPredicateCompiler>,::vos::ORef<OPredicateInterpreter> > TPredicates;
+			typedef ::std::pair< ::rtl::Reference<OPredicateCompiler>,::rtl::Reference<OPredicateInterpreter> > TPredicates;
 
 			::std::vector< TPredicates >		m_aSelectionEvaluations;
-			::vos::ORef<OPredicateCompiler>		m_aCompiler;
-			::vos::ORef<OPredicateInterpreter>	m_aInterpreter;
+			::rtl::Reference<OPredicateCompiler>		m_aCompiler;
+			::rtl::Reference<OPredicateInterpreter>	m_aInterpreter;
 
 			mutable sal_Bool 					m_bHasSelectionCode;
 			mutable sal_Bool 					m_bSelectionFirstTime;
@@ -71,7 +71,7 @@ namespace connectivity
 			inline static void SAL_CALL operator delete( void * /*pMem*/,void* /*_pHint*/ ) SAL_THROW( () )
 				{  }
 
-			void describeParam(::vos::ORef<OSQLColumns> rParameterColumns); // genauere Beschreibung der Parameter
+			void describeParam(::rtl::Reference<OSQLColumns> rParameterColumns); // genauere Beschreibung der Parameter
 			::std::vector<sal_Int32>* bindEvaluationRow(OValueRefRow& _pRow);					// Anbinden einer Ergebniszeile an die Restrictions
 			/** bind the select columns if they contain a function which needs a row value
 				@param	_pRow	the result row
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index 6e75113..6cfa432 100644
--- connectivity/source/inc/file/fcode.hxx
+++ connectivity/source/inc/file/fcode.hxx
@@ -152,7 +152,7 @@ namespace connectivity
 		{
 		public:
 			OOperandParam(connectivity::OSQLParseNode* pNode, sal_Int32 _nPos);
-			void describe(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn, ::vos::ORef<connectivity::OSQLColumns> _xParamColumns);
+			void describe(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn, ::rtl::Reference<connectivity::OSQLColumns> _xParamColumns);
 
 			TYPEINFO();
 		};
diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx
index 13cc74c..b992b7f 100644
--- connectivity/source/inc/file/fcomp.hxx
+++ connectivity/source/inc/file/fcomp.hxx
@@ -52,7 +52,7 @@ namespace connectivity
 		class OSQLAnalyzer;
 		typedef::std::vector<OCode*> OCodeList;
 
-		class OPredicateCompiler : public ::vos::OReference
+		class OPredicateCompiler : public ::salhelper::SimpleReferenceObject
 		{
 			friend class OPredicateInterpreter;
 			friend class OSQLAnalyzer;
@@ -98,13 +98,13 @@ namespace connectivity
 		};
 
 
-		class OPredicateInterpreter : public ::vos::OReference
+		class OPredicateInterpreter : public ::salhelper::SimpleReferenceObject
 		{
 			OCodeStack			m_aStack;
-			::vos::ORef<OPredicateCompiler> m_rCompiler;
+			::rtl::Reference<OPredicateCompiler> m_rCompiler;
 
 		public:
-			OPredicateInterpreter(const ::vos::ORef<OPredicateCompiler>& rComp) : m_rCompiler(rComp){}
+			OPredicateInterpreter(const ::rtl::Reference<OPredicateCompiler>& rComp) : m_rCompiler(rComp){}
 			virtual ~OPredicateInterpreter();
 
 			sal_Bool	evaluate(OCodeList& rCodeList);
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 7e70dde..55510df 100644
--- connectivity/source/parse/PColumn.cxx
+++ connectivity/source/parse/PColumn.cxx
@@ -110,11 +110,11 @@ OParseColumn::OParseColumn(	const ::rtl::OUString& _Name,
 }
 
 // -------------------------------------------------------------------------
-::vos::ORef< OSQLColumns > OParseColumn::createColumnsForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData,
+::rtl::Reference< OSQLColumns > OParseColumn::createColumnsForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData,
     const Reference< XDatabaseMetaData >& _rxDBMetaData )
 {
     sal_Int32 nColumnCount = _rxResMetaData->getColumnCount();
-    ::vos::ORef< OSQLColumns > aReturn( new OSQLColumns ); aReturn->reserve( nColumnCount );
+    ::rtl::Reference< OSQLColumns > aReturn( new OSQLColumns ); aReturn->reserve( nColumnCount );
 
     for ( sal_Int32 i = 1; i <= nColumnCount; ++i )
         aReturn->push_back( createColumnForResultSet( _rxResMetaData, _rxDBMetaData, i ) );
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 2451b31..45083f0 100644
--- connectivity/source/parse/sqliterator.cxx
+++ connectivity/source/parse/sqliterator.cxx
@@ -356,7 +356,7 @@ void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQu
         // parameters not to be included in the traversal
         return;
 
-    ::vos::ORef< OSQLColumns > pSubQueryParameterColumns( new OSQLColumns() );
+    ::rtl::Reference< OSQLColumns > pSubQueryParameterColumns( new OSQLColumns() );
 
     // get the command and the EscapeProcessing properties from the sub query
     ::rtl::OUString sSubQueryCommand;
@@ -1563,7 +1563,7 @@ OSQLTable OSQLParseTreeIterator::impl_createTableObject( const ::rtl::OUString&
     return aReturnTable;
 }
 //-----------------------------------------------------------------------------
-void OSQLParseTreeIterator::appendColumns(::vos::ORef<OSQLColumns>& _rColumns,const ::rtl::OUString& _rTableAlias,const OSQLTable& _rTable)
+void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString& _rTableAlias,const OSQLTable& _rTable)
 {
 	
 	if (!_rTable.is())
@@ -1605,7 +1605,7 @@ void OSQLParseTreeIterator::appendColumns(::vos::ORef<OSQLColumns>& _rColumns,co
 	}	 
 }
 //-----------------------------------------------------------------------------
-void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColumns,const ::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString & rTableRange,sal_Bool bFkt,sal_Int32 _nType,sal_Bool bAggFkt)
+void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString & rTableRange,sal_Bool bFkt,sal_Int32 _nType,sal_Bool bAggFkt)
 {
 	if(rColumnName.toChar() == '*' && !rTableRange.getLength())
 	{   // SELECT * ...
diff --git a/dbaccess/inc/pch/precompiled_dbaccess.hxx b/dbaccess/inc/pch/precompiled_dbaccess.hxx
index db66f29..4465046 100644
--- dbaccess/inc/pch/precompiled_dbaccess.hxx
+++ dbaccess/inc/pch/precompiled_dbaccess.hxx
@@ -503,8 +503,8 @@
 
 
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
 #include "vos/thread.hxx"
 
 #include "xmloff/ProgressBarHelper.hxx"
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index 5619c65..afe9a74 100644
--- dbaccess/source/core/api/CRowSetColumn.cxx
+++ dbaccess/source/core/api/CRowSetColumn.cxx
@@ -152,7 +152,7 @@ void SAL_CALL ORowSetColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandl
 			OColumnSettings::getFastPropertyValue( rValue, nHandle );
 			break;
 		case PROPERTY_ID_VALUE:
-			if ( !m_aColumnValue.isNull() && (*m_aColumnValue).isValid() )
+			if ( !m_aColumnValue.isNull() && (*m_aColumnValue).is() )
 				rValue = (*(*m_aColumnValue))[m_nPos].makeAny();
 			break;
 		default:
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index 52c0ec6..c96a57f 100644
--- dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -156,7 +156,7 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH
 			OColumnSettings::getFastPropertyValue( rValue, nHandle );
 			break;
 		case PROPERTY_ID_VALUE:
-			if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() )
+			if ( !m_aColumnValue.isNull() && m_aColumnValue->is() )
 			{
 				::osl::Mutex* pMutex = m_aColumnValue.getMutex();
 				::osl::MutexGuard aGuard( *pMutex );
@@ -242,7 +242,7 @@ Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeExce
 // -------------------------------------------------------------------------
 void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue)
 {
-	if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() && (!((*(*m_aColumnValue))[m_nPos] == _rOldValue)) )
+	if ( !m_aColumnValue.isNull() && m_aColumnValue->is() && (!((*(*m_aColumnValue))[m_nPos] == _rOldValue)) )
 	{
 		sal_Int32 nHandle = PROPERTY_ID_VALUE;
 		m_aOldValue = _rOldValue.makeAny();
@@ -263,7 +263,7 @@ void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue)
 DBG_NAME(ORowSetDataColumns )
 ORowSetDataColumns::ORowSetDataColumns(
 				sal_Bool _bCase,
-				const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+				const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
 				::cppu::OWeakObject& _rParent,
 				::osl::Mutex& _rMutex,
 				const ::std::vector< ::rtl::OUString> &_rVector
@@ -298,7 +298,7 @@ void SAL_CALL ORowSetDataColumns::disposing(void)
 	//	m_aColumns.clear();
 }
 // -----------------------------------------------------------------------------
-void ORowSetDataColumns::assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector)
+void ORowSetDataColumns::assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector)
 {
 	m_aColumns = _rColumns;
 	reFill(_rVector);
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx
index 2414658..2674fe0 100644
--- dbaccess/source/core/api/CRowSetDataColumn.hxx
+++ dbaccess/source/core/api/CRowSetDataColumn.hxx
@@ -105,14 +105,14 @@ namespace dbaccess
 	typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE;
 	class ORowSetDataColumns : public ORowSetDataColumns_BASE
 	{
-		::vos::ORef< ::connectivity::OSQLColumns> m_aColumns;
+		::rtl::Reference< ::connectivity::OSQLColumns> m_aColumns;
 	protected:
 		virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
 		virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
 	public:
 		ORowSetDataColumns(
 						sal_Bool _bCase,
-						const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+						const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
 						::cppu::OWeakObject& _rParent,
 						::osl::Mutex& _rMutex,
 						const ::std::vector< ::rtl::OUString> &_rVector
@@ -120,7 +120,7 @@ namespace dbaccess
 		virtual ~ORowSetDataColumns();
 		// only the name is identical to ::cppu::OComponentHelper
 		virtual void SAL_CALL disposing(void);
-		void assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector);
+		void assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector);
 	};
 }
 
diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx
index a1402f7..5d219ca 100644
--- dbaccess/source/core/api/HelperCollections.cxx
+++ dbaccess/source/core/api/HelperCollections.cxx
@@ -59,7 +59,7 @@ namespace dbaccess
 	using namespace ::cppu;
 	using namespace ::osl;
 	// -----------------------------------------------------------------------------
-	OPrivateColumns::OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+	OPrivateColumns::OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
 						sal_Bool _bCase,
 						::cppu::OWeakObject& _rParent,
 						::osl::Mutex& _rMutex,
@@ -71,7 +71,7 @@ namespace dbaccess
 	}
 
 	// -------------------------------------------------------------------------
-    OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns,
+    OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns,
         sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex )
     {
         ::std::vector< ::rtl::OUString > aNames; aNames.reserve( _rColumns->size() );
@@ -101,7 +101,7 @@ namespace dbaccess
 	// -------------------------------------------------------------------------
 	connectivity::sdbcx::ObjectType OPrivateColumns::createObject(const ::rtl::OUString& _rName)
 	{
-		if ( m_aColumns.isValid() )
+		if ( m_aColumns.is() )
 		{
 			::connectivity::OSQLColumns::const_iterator aIter = find(m_aColumns->begin(),m_aColumns->end(),_rName,isCaseSensitive());
 			if(aIter == m_aColumns->end())
diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx
index b869941..bb222f1 100644
--- dbaccess/source/core/api/HelperCollections.hxx
+++ dbaccess/source/core/api/HelperCollections.hxx
@@ -47,8 +47,8 @@
 #ifndef _CONNECTIVITY_SDBCX_COLUMN_HXX_
 #include <connectivity/PColumn.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 namespace dbaccess
@@ -70,7 +70,7 @@ namespace dbaccess
 	typedef connectivity::sdbcx::OCollection OPrivateColumns_Base;
 	class OPrivateColumns : public OPrivateColumns_Base
 	{
-		::vos::ORef< ::connectivity::OSQLColumns>	m_aColumns;
+		::rtl::Reference< ::connectivity::OSQLColumns>	m_aColumns;
 	protected:
 		virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
 		virtual void impl_refresh() throw(RuntimeException) {}
@@ -79,7 +79,7 @@ namespace dbaccess
 			return NULL;
 		}
 	public:
-		OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+		OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
 						sal_Bool _bCase,
 						::cppu::OWeakObject& _rParent,
 						::osl::Mutex& _rMutex,
@@ -90,7 +90,7 @@ namespace dbaccess
         /** creates a columns instance as above, but taking the names from the columns itself
         */
 		static OPrivateColumns* createWithIntrinsicNames(
-            const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns,
+            const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns,
 			sal_Bool _bCase,
 			::cppu::OWeakObject& _rParent,
 			::osl::Mutex& _rMutex
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 96cea1c..4eca1cd 100644
--- dbaccess/source/core/api/RowSet.cxx
+++ dbaccess/source/core/api/RowSet.cxx
@@ -702,7 +702,7 @@ void ORowSet::freeResources( bool _bComplete )
 		m_bModified		= sal_False;
 		m_bLastKnownRowCountFinal = sal_False;
         m_nLastKnownRowCount      = 0;
-		if ( m_aOldRow.isValid() )
+		if ( m_aOldRow.is() )
 			m_aOldRow->clearRow();
 
         impl_disposeParametersContainer_nothrow();
@@ -1014,7 +1014,7 @@ void SAL_CALL ORowSet::insertRow(  ) throw(SQLException, RuntimeException)
 
 		ORowSetRow aOldValues;
 		if ( !m_aCurrentRow.isNull() )
-			aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
+			aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) );
 		RowChangeEvent aEvt(*this,RowChangeAction::INSERT,1);
 		notifyAllListenersRowBeforeChange(aGuard,aEvt);
 
@@ -1066,7 +1066,7 @@ void SAL_CALL ORowSet::updateRow(  ) throw(SQLException, RuntimeException)
 	{
 		ORowSetRow aOldValues;
 		if ( !m_aCurrentRow.isNull() )
-			aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
+			aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) );
 
 		RowChangeEvent aEvt(*this,RowChangeAction::UPDATE,1);
 		notifyAllListenersRowBeforeChange(aGuard,aEvt);
@@ -1074,7 +1074,7 @@ void SAL_CALL ORowSet::updateRow(  ) throw(SQLException, RuntimeException)
         m_pCache->updateRow(m_aCurrentRow.operator ->());
 		m_aBookmark		= m_pCache->getBookmark();
 		m_aCurrentRow	= m_pCache->m_aMatrixIter;
-		m_aOldRow->setRow(new ORowSetValueVector(m_aCurrentRow->getBody()));
+		m_aOldRow->setRow(new ORowSetValueVector( *(*m_aCurrentRow) ));
 
 		// notification order
 		// - column values
@@ -1121,8 +1121,8 @@ void SAL_CALL ORowSet::deleteRow(  ) throw(SQLException, RuntimeException)
     notifyRowSetAndClonesRowDelete( aBookmarkToDelete );
 
 	ORowSetRow aOldValues;
-	if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && m_pCache->m_aMatrixIter->isValid() )
-		aOldValues = new ORowSetValueVector( m_pCache->m_aMatrixIter->getBody() );
+	if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && m_pCache->m_aMatrixIter->is() )
+		aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) );
 
 	RowChangeEvent aEvt(*this,RowChangeAction::DELETE,1);
 	notifyAllListenersRowBeforeChange(aGuard,aEvt);
@@ -1166,7 +1166,7 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL
 
 	ORowSetRow aOldValues;
 	if ( !m_aCurrentRow.isNull() )
-		aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
+		aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) );
 
 	m_pCache->cancelRowUpdates();
 
@@ -1296,9 +1296,9 @@ void SAL_CALL ORowSet::moveToInsertRow(  ) throw(SQLException, RuntimeException)
 		if  (   !m_bBeforeFirst
             &&  !m_bAfterLast
             &&  m_pCache->m_aMatrixIter != m_pCache->getEnd()
-            &&  m_pCache->m_aMatrixIter->isValid()
+            &&  m_pCache->m_aMatrixIter->is()
             )
-			aOldValues = new ORowSetValueVector( m_pCache->m_aMatrixIter->getBody() );
+			aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) );
 
 		const sal_Bool bNewState = m_bNew;
 		const sal_Bool bModState = m_bModified;
@@ -1714,7 +1714,7 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
     catch( const SQLException& )
     {
         SQLExceptionInfo aError( ::cppu::getCaughtException() );
-        OSL_ENSURE( aError.isValid(), "ORowSet::impl_prepareAndExecute_throw: caught an SQLException which we cannot analyze!" );
+        OSL_ENSURE( aError.is(), "ORowSet::impl_prepareAndExecute_throw: caught an SQLException which we cannot analyze!" );
 
         // append information about what we were actually going to execute
         try
@@ -1864,7 +1864,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
 		if ( xNumberFormat.is() )
 			m_xNumberFormatTypes.set(xNumberFormat->getNumberFormats(),UNO_QUERY);
 
-		::vos::ORef< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
+		::rtl::Reference< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
 		::std::vector< ::rtl::OUString> aNames;
 		::rtl::OUString aDescription;
 		sal_Int32 nFormatKey = 0;
@@ -2746,7 +2746,7 @@ ORowSetClone::ORowSetClone(ORowSet& rParent,::osl::Mutex* _pMutex)
 
 	m_aOldRow = m_pCache->registerOldRow();
 
-	::vos::ORef< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
+	::rtl::Reference< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
 	::std::vector< ::rtl::OUString> aNames;
 
 	::rtl::OUString aDescription;
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 4ba8a7e..11d6ef8 100644
--- dbaccess/source/core/api/RowSetBase.cxx
+++ dbaccess/source/core/api/RowSetBase.cxx
@@ -248,7 +248,7 @@ sal_Bool SAL_CALL ORowSetBase::wasNull(  ) throw(SQLException, RuntimeException)
 	checkCache();
 	
 
-	return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid()) ? (*(*m_aCurrentRow))[m_nLastColumnIndex].isNull() : sal_True;
+	return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) ? (*(*m_aCurrentRow))[m_nLastColumnIndex].isNull() : sal_True;
 }
 // -----------------------------------------------------------------------------
 
@@ -269,7 +269,7 @@ const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
         return m_aEmptyValue;
 	}
 
-    bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+    bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
     if ( !bValidCurrentRow )
     {
         // currentrow is null when the clone moves the window
@@ -277,7 +277,7 @@ const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
 		m_aCurrentRow	= m_pCache->m_aMatrixIter;
 		OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a valid row! Row is null.");
 
-        bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+        bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
 	}
 
     if ( bValidCurrentRow )
@@ -294,14 +294,14 @@ const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
         ORowSetMatrix::iterator k = aHelper.aIterator;
         for (; k != m_pCache->getEnd(); ++k)
         {
-            ORowSetValueVector* pTemp = k->getBodyPtr();
+            ORowSetValueVector* pTemp = k->get();
             OSL_ENSURE( pTemp != (void*)0xfeeefeee,"HALT!" );
         }
 #endif
 		OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow < m_pCache->getEnd() && aCacheIter != m_pCache->m_aCacheIterators.end(),"Invalid iterator set for currentrow!");
 #if OSL_DEBUG_LEVEL > 0
         ORowSetRow rRow = (*m_aCurrentRow);
-        OSL_ENSURE(rRow.isValid() && static_cast<sal_uInt16>(columnIndex) < (*rRow).size(),"Invalid size of vector!");
+        OSL_ENSURE(rRow.is() && static_cast<sal_uInt16>(columnIndex) < (*rRow).size(),"Invalid size of vector!");
 #endif
 		return (*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex];
 	}
@@ -399,14 +399,14 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
         return NULL;
 	}
 
-    bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+    bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
     if ( !bValidCurrentRow )
 	{
         positionCache( MOVE_NONE_REFRESH_ONLY );
 		m_aCurrentRow	= m_pCache->m_aMatrixIter;
 		OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getBinaryStream: we don't stand on a valid row! Row is null.");
 
-        bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+        bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
 	}
 
     if ( bValidCurrentRow )
@@ -1096,7 +1096,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
 		OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is null!");
 		m_aCurrentRow.setBookmark(m_aBookmark);
 		OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd(),"Position of matrix iterator isn't valid!");
-		OSL_ENSURE(m_aCurrentRow->isValid(),"Currentrow isn't valid");
+		OSL_ENSURE(m_aCurrentRow->is(),"Currentrow isn't valid");
 		OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!");
 
 #if OSL_DEBUG_LEVEL > 0
@@ -1111,7 +1111,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
 		OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!");
 #if OSL_DEBUG_LEVEL > 0
         ORowSetRow rRow = (*m_aCurrentRow);
-        OSL_ENSURE(rRow.isValid() ,"Invalid size of vector!");
+        OSL_ENSURE(rRow.is() ,"Invalid size of vector!");
 #endif
 		// the cache could repositioned so we need to adjust the cache
 		// #104144# OJ
@@ -1136,8 +1136,8 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
 	    firePropertyChange(_rOldValues);
 
 	// TODO: can this be done before the notifications?
-	if(!(m_bBeforeFirst || m_bAfterLast) && !m_aCurrentRow.isNull() && m_aCurrentRow->isValid() && m_aCurrentRow != m_pCache->getEnd())
-		m_aOldRow->setRow(new ORowSetValueVector(m_aCurrentRow->getBody()));
+	if(!(m_bBeforeFirst || m_bAfterLast) && !m_aCurrentRow.isNull() && m_aCurrentRow->is() && m_aCurrentRow != m_pCache->getEnd())
+		m_aOldRow->setRow(new ORowSetValueVector( *(*m_aCurrentRow) ));
 
 	if ( _bMoved && _bDoNotify )
 		// - cursorMoved
@@ -1249,7 +1249,7 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
 	try
 	{
 		for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != m_aDataColumns.end();++aIter,++i) // #104278# OJ ++i inserted
-			(*aIter)->fireValueChange(_rOldRow.isValid() ? (*_rOldRow)[i+1] : ::connectivity::ORowSetValue());
+			(*aIter)->fireValueChange(_rOldRow.is() ? (*_rOldRow)[i+1] : ::connectivity::ORowSetValue());
 	}
 	catch(Exception&)
 	{
@@ -1365,10 +1365,10 @@ void ORowSetBase::movementFailed()
 // -----------------------------------------------------------------------------
 ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew)
 {
-	OSL_ENSURE(m_aOldRow.isValid(),"RowSetRowHElper isn't valid!");
+	OSL_ENSURE(m_aOldRow.is(),"RowSetRowHElper isn't valid!");
 	ORowSetRow aOldValues;
-	if ( !_bWasNew && m_aOldRow->getRow().isValid() )
-		aOldValues = new ORowSetValueVector( m_aOldRow->getRow().getBody());	 // remember the old values
+	if ( !_bWasNew && m_aOldRow->getRow().is() )
+		aOldValues = new ORowSetValueVector( *(m_aOldRow->getRow()) );	 // remember the old values
 	return aOldValues;
 }
 // -----------------------------------------------------------------------------
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index e645ef1..ed4de67 100644
--- dbaccess/source/core/api/RowSetCache.cxx
+++ dbaccess/source/core/api/RowSetCache.cxx
@@ -480,7 +480,7 @@ Any ORowSetCache::getBookmark(  )
 	if(m_bAfterLast)
 		throwFunctionSequenceException(m_xSet.get());
 
-	if ( m_aMatrixIter >= m_pMatrix->end() || m_aMatrixIter < m_pMatrix->begin() || !(*m_aMatrixIter).isValid())
+	if ( m_aMatrixIter >= m_pMatrix->end() || m_aMatrixIter < m_pMatrix->begin() || !(*m_aMatrixIter).is())
 	{
 		return Any(); // this is allowed here because the rowset knowns what it is doing
 	}
@@ -514,7 +514,7 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
 			if ( !m_bAfterLast )
 			{
 				m_aMatrixIter = calcPosition();
-				OSL_ENSURE(m_aMatrixIter->isValid(),"Iterator after moveToBookmark not valid");
+				OSL_ENSURE(m_aMatrixIter->is(),"Iterator after moveToBookmark not valid");
 			}
 			else
 				m_aMatrixIter = m_pMatrix->end();
@@ -525,7 +525,7 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
 	else
 		return sal_False;
 
-	return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid();
+	return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is();
 }
 // -------------------------------------------------------------------------
 sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows )
@@ -537,7 +537,7 @@ sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 ro
 		absolute(m_nPosition);
 		//	for(sal_Int32 i=0;i<rows && m_aMatrixIter != m_pMatrix->end();++i,++m_aMatrixIter) ;
 
-		bRet = m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid();
+		bRet = m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is();
 	}
 
 	return bRet;
@@ -717,7 +717,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
 	{
 		if(bCheck)
 		{
-			if(!aIter->isValid())
+			if(!aIter->is())
 				*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount());
 			m_pCacheSet->fillValueRow(*aIter,i);
 		}
@@ -743,7 +743,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
 				{
 					if(bCheck)
 					{
-						if(!aIter->isValid())
+						if(!aIter->is())
 							*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount());
 						m_pCacheSet->fillValueRow(*aIter,nPos++);
 					}
@@ -877,7 +877,7 @@ sal_Bool ORowSetCache::moveWindow()
                     bCheck = m_pCacheSet->next();
 					if ( bCheck )
 					{
-						if(!aIter->isValid())
+						if(!aIter->is())
 							*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount());
 						m_pCacheSet->fillValueRow(*aIter,i+1);
 					}
@@ -896,7 +896,7 @@ sal_Bool ORowSetCache::moveWindow()
 		{	// position in window
 			OSL_ENSURE((m_nPosition - m_nStartPos -1) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!");
 			m_aMatrixIter = calcPosition();
-			if(!m_aMatrixIter->isValid())
+			if(!m_aMatrixIter->is())
 			{
 				sal_Bool bOk( m_pCacheSet->absolute( m_nPosition ) );
 				if ( bOk )
@@ -982,13 +982,13 @@ sal_Bool ORowSetCache::moveWindow()
 					m_nStartPos = 0;
 			}
 			// here we need only to check if the begining row is valid. If not we have to fetch it.
-			if(!m_pMatrix->begin()->isValid())
+			if(!m_pMatrix->begin()->is())
 			{
 				aIter = m_pMatrix->begin();
 
 				nPos	= m_nStartPos;
 				bCheck	= m_pCacheSet->absolute(m_nStartPos);
-				for(; !aIter->isValid() && bCheck;++aIter)
+				for(; !aIter->is() && bCheck;++aIter)
 				{
                     OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator");
                     bCheck = m_pCacheSet->next();
@@ -1068,7 +1068,7 @@ sal_Bool ORowSetCache::last(  )
 #if OSL_DEBUG_LEVEL > 1
 	if(bRet)
 	{
-		OSL_ENSURE((*m_aMatrixIter).isValid(),"ORowSetCache::last: Row not valid!");
+		OSL_ENSURE((*m_aMatrixIter).is(),"ORowSetCache::last: Row not valid!");
 	}
 #endif
 
@@ -1185,7 +1185,7 @@ sal_Bool ORowSetCache::previous(  )
 			else
 			{
 				m_aMatrixIter = calcPosition();
-				bRet = (*m_aMatrixIter).isValid();
+				bRet = (*m_aMatrixIter).is();
 			}
 		}
 	}
@@ -1218,7 +1218,7 @@ sal_Bool ORowSetCache::rowInserted(  )
 // XResultSetUpdate
 sal_Bool ORowSetCache::insertRow(  )
 {
-	if ( !m_bNew || !m_aInsertRow->isValid() )
+	if ( !m_bNew || !m_aInsertRow->is() )
 		throw SQLException(DBACORE_RESSTRING(RID_STR_NO_MOVETOINSERTROW_CALLED),NULL,SQLSTATE_GENERAL,1000,Any() );
 
 	m_pCacheSet->insertRow(*m_aInsertRow,m_aUpdateTable);
@@ -1300,7 +1300,7 @@ bool ORowSetCache::deleteRow(  )
     //	(*m_pMatrix)[(m_nPosition - m_nStartPos)] = NULL; // set the deleted row to NULL
 
 
-    for(++aPos;aPos != m_pMatrix->end() && aPos->isValid();++aPos)
+    for(++aPos;aPos != m_pMatrix->end() && aPos->is();++aPos)
     {
         *(aPos-1) = *aPos;
         (*aPos)	  = NULL;
@@ -1335,7 +1335,7 @@ void ORowSetCache::moveToInsertRow(  )
 	m_bUpdated	= m_bAfterLast = sal_False;
 
 	m_aInsertRow = m_pInsertMatrix->begin();
-	if(!m_aInsertRow->isValid())
+	if(!m_aInsertRow->is())
 		*m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount());
 
 	// we don't unbound the bookmark column
@@ -1388,7 +1388,7 @@ void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
 void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRow)
 {
 	m_aInsertRow = m_pInsertMatrix->begin();
-	if(!m_aInsertRow->isValid())
+	if(!m_aInsertRow->is())
 		*m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount());
 
 	(*(*m_aInsertRow)) = (*(*_rOriginalRow));
@@ -1518,7 +1518,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
 void ORowSetCache::clearInsertRow()
 {
 	// we don't unbound the bookmark column
-	if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->isValid() )
+	if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->is() )
 	{
 		ORowSetValueVector::iterator aIter = (*m_aInsertRow)->begin()+1;
 		ORowSetValueVector::iterator aEnd = (*m_aInsertRow)->end();
@@ -1550,7 +1550,7 @@ void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
 {
 	for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != m_aOldRows.end(); ++aOldRowIter)
 	{
-		if ( aOldRowIter->getBodyPtr() == _rRow.getBodyPtr() )
+		if ( aOldRowIter->get() == _rRow.get() )
 		{
 			m_aOldRows.erase(aOldRowIter);
 			break;
@@ -1563,8 +1563,8 @@ sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPo
 {
 	for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != m_aOldRows.end(); ++aOldRowIter)
 	{
-		if ( aOldRowIter->isValid() && aOldRowIter->getBody().getRow().isValid() )
-			aOldRowIter->getBody().setRow(new ORowSetValueVector(aOldRowIter->getBody().getRow().getBody()) );
+		if ( aOldRowIter->is() && (*aOldRowIter)->getRow().is() )
+			(*aOldRowIter)->setRow(new ORowSetValueVector( *((*aOldRowIter)->getRow()) ) );
 	}
 	sal_Int32 nNewSt = _nNewStartPos;
 	sal_Bool bRet = fillMatrix(nNewSt,_nNewEndPos);
@@ -1578,13 +1578,13 @@ sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix:
 	sal_Int32 nColumnCount = m_xMetaData->getColumnCount();
 	for(; _bCheck && _aIter != _aEnd;)
 	{
-		if ( !_aIter->isValid() )
+		if ( !_aIter->is() )
 			*_aIter = new ORowSetValueVector(nColumnCount);
 		else
 		{
 			for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != m_aOldRows.end(); ++aOldRowIter)
 			{
-				if ( aOldRowIter->getBody().getRow().isEqualBody(*_aIter) )
+				if ( (*aOldRowIter)->getRow().get() == (*_aIter).get() )
 					*_aIter = new ORowSetValueVector(nColumnCount);
 			}
 		}
diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx
index 3ac5b5f..d277804 100644
--- dbaccess/source/core/api/RowSetRow.hxx
+++ dbaccess/source/core/api/RowSetRow.hxx
@@ -35,8 +35,8 @@
 #ifndef DBACCESS_CORE_API_ROWSETROW_HXX
 #define DBACCESS_CORE_API_ROWSETROW_HXX
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
 #include <connectivity/CommonTools.hxx>
@@ -51,7 +51,7 @@
 namespace dbaccess
 {
 	typedef connectivity::ORowVector< connectivity::ORowSetValue >	ORowSetValueVector;
-	typedef ::vos::ORef< ORowSetValueVector >						ORowSetRow;
+	typedef ::rtl::Reference< ORowSetValueVector >						ORowSetRow;
 	typedef ::std::vector< ORowSetRow >								ORowSetMatrix;
 
 	class ORowSetOldRowHelper
@@ -86,7 +86,7 @@ namespace dbaccess
 		inline void setRow(const ORowSetRow& _rRow) { m_aRow = _rRow; }
 	};
 
-	typedef ::vos::ORef< ORowSetOldRowHelper >	TORowSetOldRowHelperRef;
+	typedef ::rtl::Reference< ORowSetOldRowHelper >	TORowSetOldRowHelperRef;
 
 	class ORowSetValueCompare
 	{
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index dab061f..86638c8 100644
--- dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -737,7 +737,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns(  ) thr
         return m_aCurrentColumns[SelectColumns];
 
     ::std::vector< ::rtl::OUString> aNames;
-	::vos::ORef< OSQLColumns> aSelectColumns;
+	::rtl::Reference< OSQLColumns> aSelectColumns;
 	sal_Bool bCase = sal_True;
 
     do {
@@ -1291,7 +1291,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters(  )
 	// now set the Parameters
 	if ( !m_aCurrentColumns[ParameterColumns] )
 	{
-		::vos::ORef< OSQLColumns> aCols = m_aSqlIterator.getParameters();
+		::rtl::Reference< OSQLColumns> aCols = m_aSqlIterator.getParameters();
 		::std::vector< ::rtl::OUString> aNames;
 		for(OSQLColumns::const_iterator aIter = aCols->begin(); aIter != aCols->end();++aIter)
 			aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME)));
@@ -1334,7 +1334,7 @@ void OSingleSelectQueryComposer::clearCurrentCollections()
 }
 // -----------------------------------------------------------------------------
 Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumnType _eType,
-    const ::vos::ORef< OSQLColumns >& _rCols )
+    const ::rtl::Reference< OSQLColumns >& _rCols )
 {
 	::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
 
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 3c8d8bd..186c90d 100644
--- dbaccess/source/core/api/query.cxx
+++ dbaccess/source/core/api/query.cxx
@@ -232,7 +232,7 @@ void OQuery::rebuildColumns()
             }
 
             Reference< XDatabaseMetaData > xDBMeta( m_xConnection->getMetaData(), UNO_QUERY_THROW );
-            ::vos::ORef< OSQLColumns > aParseColumns(
+            ::rtl::Reference< OSQLColumns > aParseColumns(
                 ::connectivity::parse::OParseColumn::createColumnsForResultSet( xResultSetMeta, xDBMeta ) );
             xColumns = OPrivateColumns::createWithIntrinsicNames(
                 aParseColumns, xDBMeta->storesMixedCaseQuotedIdentifiers(), *this, m_aMutex );
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index a6c6685..1a1e251 100644
--- dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -175,7 +175,6 @@ using namespace ::com::sun::star::reflection;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::cppu;
 using namespace ::osl;
-using namespace ::vos;
 using namespace ::dbtools;
 using namespace ::comphelper;
 namespace css = ::com::sun::star;
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 0bd01c7..816b329 100644
--- dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -93,8 +93,8 @@
 #ifndef _DBA_CORE_BOOKMARKCONTAINER_HXX_
 #include "bookmarkcontainer.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _STRING_HXX
 #include <tools/string.hxx>
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index c0a68d8..5043635 100644
--- dbaccess/source/core/dataaccess/datasource.cxx
+++ dbaccess/source/core/dataaccess/datasource.cxx
@@ -162,7 +162,6 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::reflection;
 using namespace ::cppu;
 using namespace ::osl;
-using namespace ::vos;
 using namespace ::dbtools;
 using namespace ::comphelper;
 namespace css = ::com::sun::star;
diff --git a/dbaccess/source/core/dataaccess/datasource.hxx b/dbaccess/source/core/dataaccess/datasource.hxx
index 1960097..a8c0724 100644
--- dbaccess/source/core/dataaccess/datasource.hxx
+++ dbaccess/source/core/dataaccess/datasource.hxx
@@ -99,8 +99,8 @@
 #ifndef _DBA_CORE_BOOKMARKCONTAINER_HXX_
 #include "bookmarkcontainer.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _STRING_HXX
 #include <tools/string.hxx>
diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
index 044fb8d..8774435 100644
--- dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
+++ dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
@@ -188,7 +188,7 @@ namespace dbaccess
 					getStructuredCondition( TGetParseNode& _aGetFunctor );
 
 		::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
-					setCurrentColumns( EColumnType _eType, const ::vos::ORef< ::connectivity::OSQLColumns >& _rCols );
+					setCurrentColumns( EColumnType _eType, const ::rtl::Reference< ::connectivity::OSQLColumns >& _rCols );
 
 		//helper methods for mem_fun_t
 		inline bool implSetFilter(::rtl::OUString _sFilter) { setFilter(_sFilter); return true;}
diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx
index cd39bc9..f29e178 100644
--- dbaccess/source/filter/xml/xmlColumn.cxx
+++ dbaccess/source/filter/xml/xmlColumn.cxx
@@ -80,7 +80,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+    using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
 	using namespace ::com::sun::star::sdbcx;
diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx
index 525b887..1c740d9 100644
--- dbaccess/source/filter/xml/xmlComponent.cxx
+++ dbaccess/source/filter/xml/xmlComponent.cxx
@@ -71,7 +71,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+    using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
 	using namespace ::com::sun::star::container;
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index 1f2d9a7..27e2546 100644
--- dbaccess/source/filter/xml/xmlDataSource.cxx
+++ dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -80,7 +80,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+    using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 DBG_NAME(OXMLDataSource)
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index 1a62a63..5a71ef1 100644
--- dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -69,7 +69,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+    using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 DBG_NAME(OXMLDataSourceInfo)
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index e271a04..1e9e638 100644
--- dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -68,7 +68,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+    using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 DBG_NAME(OXMLDataSourceSetting)
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
index 72da3fe..0e3a9d1 100644
--- dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
+++ dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
@@ -70,7 +70,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 DBG_NAME(OXMLDataSourceSettings)
diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx
index d8e3688..76028c0 100644
--- dbaccess/source/filter/xml/xmlDatabase.cxx
+++ dbaccess/source/filter/xml/xmlDatabase.cxx
@@ -77,7 +77,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::sdb;
 	using namespace ::com::sun::star::sdbcx;
diff --git a/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx
index 3365d08..b54f4b2 100644
--- dbaccess/source/filter/xml/xmlDocuments.cxx
+++ dbaccess/source/filter/xml/xmlDocuments.cxx
@@ -71,7 +71,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::container;
 	using namespace ::com::sun::star::xml::sax;
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index bb7b924..cb7cbda 100644
--- dbaccess/source/filter/xml/xmlExport.hxx
+++ dbaccess/source/filter/xml/xmlExport.hxx
@@ -104,7 +104,6 @@
 
 namespace dbaxml
 {
-using namespace ::rtl;
 using namespace ::xmloff::token;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 68a2e89..ce55007 100644
--- dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -78,7 +78,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
 	using namespace ::com::sun::star::container;
diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx
index 5d6803a..f6b70b4 100644
--- dbaccess/source/filter/xml/xmlLogin.cxx
+++ dbaccess/source/filter/xml/xmlLogin.cxx
@@ -67,7 +67,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 DBG_NAME(OXMLLogin)
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index c040535..3eee8bd 100644
--- dbaccess/source/filter/xml/xmlQuery.cxx
+++ dbaccess/source/filter/xml/xmlQuery.cxx
@@ -71,7 +71,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
 	using namespace ::com::sun::star::container;
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index f18778e..cd02afc 100644
--- dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -98,7 +98,7 @@
 namespace dbaxml
 {
 
-using namespace ::rtl;
+using rtl::OUString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index 3abe268..8f56d3f 100644
--- dbaccess/source/filter/xml/xmlTable.cxx
+++ dbaccess/source/filter/xml/xmlTable.cxx
@@ -80,7 +80,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
     using namespace ::com::sun::star;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::sdbcx;
diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.cxx b/dbaccess/source/filter/xml/xmlTableFilterList.cxx
index ad355bd..6d5d2c6 100644
--- dbaccess/source/filter/xml/xmlTableFilterList.cxx
+++ dbaccess/source/filter/xml/xmlTableFilterList.cxx
@@ -74,7 +74,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::xmloff::token;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
index f41087a..a362672 100644
--- dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
+++ dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
@@ -47,7 +47,7 @@
 
 namespace dbaxml
 {
-	using namespace ::rtl;
+	using rtl::OUString;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 DBG_NAME(OXMLTableFilterPattern)
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index c388161..e262a21 100644
--- dbaccess/source/filter/xml/xmlfilter.cxx
+++ dbaccess/source/filter/xml/xmlfilter.cxx
@@ -130,6 +130,7 @@
 #include <toolkit/helper/vclunohelper.hxx>
 #endif
 
+using rtl::OUString;
 using namespace ::com::sun::star;
 
 extern "C" void SAL_CALL createRegistryInfo_ODBFilter( ) 
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index 07913fa..4aec8eb 100644
--- dbaccess/source/filter/xml/xmlfilter.hxx
+++ dbaccess/source/filter/xml/xmlfilter.hxx
@@ -98,7 +98,6 @@
 
 namespace dbaxml
 {
-using namespace ::rtl;
 using namespace ::xmloff::token;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx
index 18fea83..755566d 100644
--- dbaccess/source/filter/xml/xmlservices.cxx
+++ dbaccess/source/filter/xml/xmlservices.cxx
@@ -48,7 +48,7 @@
 
 /********************************************************************************************/
 
-using namespace ::rtl;
+using rtl::OUString;
 using namespace ::dbaxml;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index d95a9b4..6b95487 100644
--- dbaccess/source/ui/control/RelationControl.cxx
+++ dbaccess/source/ui/control/RelationControl.cxx
@@ -325,7 +325,7 @@ namespace dbaui
 		if ( m_pConnData->GetConnLineDataList()->size() > static_cast<size_t>(nRow) )
 		{
 			OConnectionLineDataRef pConnLineData = (*m_pConnData->GetConnLineDataList())[nRow];
-			if( pConnLineData.isValid() )
+			if( pConnLineData.is() )
 			{
 				switch( getColumnIdent( nColId ) )
 				{
diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx
index 4b850b5..6f2edd0 100644
--- dbaccess/source/ui/inc/ConnectionLineData.hxx
+++ dbaccess/source/ui/inc/ConnectionLineData.hxx
@@ -38,13 +38,13 @@
 #ifndef DBAUI_ENUMTYPES_HXX
 #include "QEnumTypes.hxx"
 #endif
-#ifndef _VOS_REFERNCE_HXX_ 
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #include <vector>
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef DBAUI_REFFUNCTOR_HXX
@@ -70,7 +70,7 @@ namespace dbaui
 		the class OConnectionLineData contains the data of a connection
 		e.g. the source and the destanation field
 	**/
-	class OConnectionLineData : public ::vos::OReference
+	class OConnectionLineData : public ::salhelper::SimpleReferenceObject
 	{
 		::rtl::OUString m_aSourceFieldName;
 		::rtl::OUString m_aDestFieldName;
@@ -110,7 +110,7 @@ namespace dbaui
 	};
 
 	//------------------------------------------------------------------
-	typedef ::vos::ORef< OConnectionLineData >		OConnectionLineDataRef;
+	typedef ::rtl::Reference< OConnectionLineData >		OConnectionLineDataRef;
 	typedef ::std::vector< OConnectionLineDataRef >	OConnectionLineDataVec;
 }
 #endif // DBAUI_CONNECTIONLINEDATA_HXX
diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx
index 1a7f06d..39d8d59 100644
--- dbaccess/source/ui/inc/RefFunctor.hxx
+++ dbaccess/source/ui/inc/RefFunctor.hxx
@@ -36,8 +36,8 @@
 #ifndef DBAUI_REFFUNCTOR_HXX
 #define DBAUI_REFFUNCTOR_HXX
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef INCLUDED_FUNCTIONAL
 #define INCLUDED_FUNCTIONAL
@@ -46,19 +46,19 @@
 
 namespace dbaui
 {
-	template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::vos::ORef<T> ,void>
+	template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::rtl::Reference<T> ,void>
 	{
 		::std::mem_fun_t<bool,T> m_aFunction;
 	public:
 		OUnaryRefFunctor(const ::std::mem_fun_t<bool,T>& _aFunc) : m_aFunction(_aFunc)
 		{}
-		inline void operator()(const ::vos::ORef<T>& _aType) const
+		inline void operator()(const ::rtl::Reference<T>& _aType) const
 		{
-			m_aFunction(_aType.getBodyPtr());
+			m_aFunction(_aType.get());
 		}
-//		inline void operator()(const ::vos::ORef<T>& _aType)
+//		inline void operator()(const ::rtl::Reference<T>& _aType)
 //		{
-//			m_aFunction(_aType.getBodyPtr());
+//			m_aFunction(_aType.get());
 //		}
 	};
 // -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index 652a180..0ac59d8 100644
--- dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -48,14 +48,16 @@
 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
 #include <com/sun/star/beans/PropertyValue.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
+#include <salhelper/simplereferenceobject.hxx>
+
 class Window;
 namespace dbaui
 {
-	class OTableFieldDesc : public ::vos::OReference
+	class OTableFieldDesc : public ::salhelper::SimpleReferenceObject
 	{
 	private:
 		::std::vector< ::rtl::OUString>	m_vecCriteria;
@@ -160,7 +162,7 @@ namespace dbaui
 		return bEmpty;
 	}
 	//------------------------------------------------------------------
-	typedef ::vos::ORef< OTableFieldDesc>		OTableFieldDescRef;
+	typedef ::rtl::Reference< OTableFieldDesc>		OTableFieldDescRef;
 	typedef ::std::vector<OTableFieldDescRef>	OTableFields;
 }
 #endif //
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index dafca14..013d911 100644
--- dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -360,7 +360,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev )
 // -----------------------------------------------------------------------------
 BOOL OConnectionLine::IsValid() const
 {
-	return m_pData.isValid() && m_pData->IsValid();
+	return m_pData.is() && m_pData->IsValid();
 }
 //------------------------------------------------------------------------
 double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q)
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
index 49c271e..ab9e917 100644
--- dbaccess/source/ui/querydesign/ConnectionLineData.cxx
+++ dbaccess/source/ui/querydesign/ConnectionLineData.cxx
@@ -64,7 +64,7 @@ OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldNam
 
 //------------------------------------------------------------------------
 OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
-    : ::vos::OReference()
+    : ::salhelper::SimpleReferenceObject()
 {
 	DBG_CTOR(OConnectionLineData,NULL);
 	*this = rConnLineData;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 10096f9..70953ef 100644
--- dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1438,7 +1438,7 @@ namespace
 			aDragLeft->SetField(aCondition);
 			aDragLeft->SetFunctionType(FKT_CONDITION);
 
-			eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).isValid() ? eOk : eTooManyColumns;
+			eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns;
 		}
 		else //! TODO not supported yet
 			eErrorCode = eStatementTooComplex;
@@ -1822,7 +1822,7 @@ namespace
 		OQueryController* pController = static_cast<OQueryController*>(_pView->getController());
 		OTableFields& rUnUsedFields = pController->getUnUsedFields();
 		for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != rUnUsedFields.end();++aIter)
-			if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).isValid())
+			if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is())
 				(*aIter) = NULL;
 		OTableFields().swap( rUnUsedFields );
 	}
@@ -2253,7 +2253,7 @@ namespace
 						for(;aIter != aList.end();++aIter)
 						{
 							OTableFieldDescRef pEntry = *aIter;
-							if(pEntry.isValid() && pEntry->GetFieldAlias() == aColumnName)
+							if(pEntry.is() && pEntry->GetFieldAlias() == aColumnName)
 								pEntry->SetOrderDir( eOrderDir );
 						}
 					}
@@ -2615,7 +2615,7 @@ void OQueryDesignView::DeleteFields( const ::rtl::OUString& rAliasName )
 // -----------------------------------------------------------------------------
 SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate)
 {
-	return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).isValid() ? eOk : eTooManyColumns;
+	return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns;
 }
 // -----------------------------------------------------------------------------
 sal_Bool OQueryDesignView::getColWidth( const ::rtl::OUString& rAliasName, const ::rtl::OUString& rFieldName, sal_uInt32& nWidth )
@@ -2884,8 +2884,8 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE
 														   ::rtl::OUString& _rsErrorMessage,
 														   Reference<XPropertySet>& _rxColumn)
 {
-	OSL_ENSURE(pEntry.isValid(),"Entry is null!");
-	if(!pEntry.isValid())
+	OSL_ENSURE(pEntry.is(),"Entry is null!");
+	if(!pEntry.is())
 		return NULL;
 	Reference< XConnection> xConnection = static_cast<OQueryController*>(getController())->getConnection();
 	if(!xConnection.is())
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index f621fd7..df9c8bf 100644
--- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -492,9 +492,9 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
     if ( nColId >= getFields().size() )
         return NULL;
 	OTableFieldDescRef pEntry = getFields()[nColId-1];
-	DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
+	DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
 
-	if (!pEntry.isValid())
+	if (!pEntry.is())
 		return NULL;
 
 	if (static_cast<OQueryController*>(getDesignView()->getController())->isReadOnly())
@@ -529,7 +529,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
 	if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
 		return;
 	OTableFieldDescRef pEntry = getFields()[nPos-1];
-	DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
+	DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
 	long nCellIndex = GetRealRow(nRow);
 
 	switch (nCellIndex)
@@ -790,7 +790,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
             {
                 USHORT nColumnPostion;
                 aSelEntry = FindFirstFreeCol(nColumnPostion);
-                if ( !aSelEntry.isValid() )
+                if ( !aSelEntry.is() )
                 {
                     AppendNewCol(1);
                     aSelEntry = FindFirstFreeCol(nColumnPostion);
@@ -949,7 +949,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
                     notifyTableFieldChanged(sOldAlias,aSelEntry->GetAlias(),_bListAction, nColumnId);
                 }
             }
-            if ( i > 0 && InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).isEmpty() ) // may we have to append more than one field
+            if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field
             { // the field could not be isnerted
                 String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
                 sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
@@ -975,11 +975,11 @@ sal_Bool OSelectionBrowseBox::SaveModified()
 	if(getFields().size() > static_cast<USHORT>(nCurrentColumnPos - 1))
 		pEntry = getEntry(nCurrentColumnPos - 1);
 
-	sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False;
+	sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False;
 	sal_Bool bError			= sal_False;
 	sal_Bool bListAction	= sal_False;
 
-	if (pEntry.isValid() && Controller().Is() && Controller()->IsModified())
+	if (pEntry.is() && Controller().Is() && Controller()->IsModified())
 	{
 		// fuer die Undo-Action
 		String strOldCellContents,sNewValue;
@@ -1274,7 +1274,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
 	}
 
 	// habe ich Daten in einer FieldDescription gespeichert, die vorher leer war und es nach den Aenderungen nicht mehr ist ?
-	if ( pEntry.isValid() && bWasEmpty && !pEntry->IsEmpty() && !bError )
+	if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError )
 	{
 		// Default auf sichtbar
 		pEntry->SetVisible(sal_True);
@@ -1316,7 +1316,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
 	if(getFields().size() > sal_uInt16(nPos - 1))
 		pEntry = getFields()[nPos - 1];
 
-	if (!pEntry.isValid())
+	if (!pEntry.is())
 		return;
 
 	long nRow = GetRealRow(m_nSeekRow);
@@ -1578,7 +1578,7 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth)
 
 	// der FieldDescription Bescheid sagen
 	OTableFieldDescRef pEntry = getEntry(GetColumnPos(nColId) - 1);
-	if (pEntry.isValid())
+	if (pEntry.is())
 		pEntry->SetColWidth(sal_uInt16(GetColumnWidth(nColId)));
 
 	if (bWasEditing)
@@ -1724,7 +1724,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount()
 
 	while (aIter != getFields().end())
 	{
-		if ((*aIter).isValid() && !(*aIter)->IsEmpty())
+		if ((*aIter).is() && !(*aIter)->IsEmpty())
 			++nCount;
 		++aIter;
 	}
@@ -1745,7 +1745,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPositio
 	{
 		++_rColumnPosition;
 		OTableFieldDescRef pEntry = (*aIter);
-		if ( pEntry.isValid() && pEntry->IsEmpty() )
+		if ( pEntry.is() && pEntry->IsEmpty() )
 			return pEntry;
 		++aIter;
 	}
@@ -1761,7 +1761,7 @@ void OSelectionBrowseBox::CheckFreeColumns(USHORT& _rColumnPosition)
 	{
 		// es ist voll, also einen Packen Spalten anhaengen
 		AppendNewCol(DEFAULT_QUERY_COLS);
-		OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).isValid());
+		OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).is());
 	}
 }
 //------------------------------------------------------------------------------
@@ -1782,7 +1782,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
 	for(;aIter != rFields.end();++aIter)
 	{
 		pEntry = *aIter;
-		OSL_ENSURE(pEntry.isValid(),"OTableFieldDescRef was null!");
+		OSL_ENSURE(pEntry.is(),"OTableFieldDescRef was null!");
 
 		::rtl::OUString	aField = pEntry->GetField();
 		::rtl::OUString	aAlias = pEntry->GetAlias();
@@ -1824,7 +1824,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
 	if(!xConnection.is())
 		return;
 	DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-	DBG_ASSERT(rInfo.isValid() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
+	DBG_ASSERT(rInfo.is() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
 
 	OTableFieldDescRef pEntry;
 	Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
@@ -1868,7 +1868,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
 		OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
 		if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // das GroupBy wird bereits von rInfo "ubernommen
 			pTmp->SetGroupBy(sal_False);
-		if ( pTmp.isValid() )
+		if ( pTmp.is() )
 		{
 			pTmp->SetCriteria( nLevel, rValue);
 			if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
@@ -1922,7 +1922,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
 	if (aIter == rFields.end())
 	{
 		OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
-		if(pTmp.isValid())
+		if(pTmp.is())
 		{
 			if ( !m_bOrderByUnRelated && !bAppend )
 				pTmp->SetVisible(sal_True);
@@ -2413,11 +2413,11 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
 	USHORT nPos = GetColumnPos(nColId);
 	DBG_ASSERT(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
 	OTableFieldDescRef pEntry = getEntry(nPos-1);
-	DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
+	DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
 	static_cast<OQueryController*>(getDesignView()->getController())->setModified();
 	EditBrowseBox::ColumnResized(nColId);
 
-	if ( pEntry.isValid())
+	if ( pEntry.is())
 	{
 		if ( !m_bInUndoMode )
 		{
@@ -2439,7 +2439,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
 	DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
 
 	OTableFieldDescRef pEntry = getFields()[nPos-1];
-	DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
+	DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
 
 	long nRow = GetRealRow(nRowId);
 	String strText(GetCellText(nRow, nColId));
@@ -2640,8 +2640,8 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos)
 	OSL_ENSURE(aFields.size() > _nPos,"ColID is to great!");
 
 	OTableFieldDescRef pEntry = aFields[_nPos];
-	OSL_ENSURE(pEntry.isValid(),"Invalid entry!");
-	if ( !pEntry.isValid() )
+	OSL_ENSURE(pEntry.is(),"Invalid entry!");
+	if ( !pEntry.is() )
 	{
 		pEntry = new OTableFieldDesc();
 		pEntry->SetColumnId(
@@ -2769,7 +2769,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
 	if(getFields().size() > sal_uInt16(_nColumnPos - 1))
 		pEntry = getFields()[_nColumnPos - 1];
 
-	if ( _nRow == BROW_VIS_ROW && pEntry.isValid() )
+	if ( _nRow == BROW_VIS_ROW && pEntry.is() )
 		return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK );
 
 	return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index aa78a23..fa3bbe9 100644
--- dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -170,7 +170,7 @@ BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldNa
 	if(aIter == m_vConnLineData.end())
 	{
 		OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName);
-		if (!pNew.isValid())
+		if (!pNew.is())
 			return FALSE;
 
 		m_vConnLineData.push_back(pNew);
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 1eb3361..296ed07 100644
--- dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -73,7 +73,7 @@ OTableFieldDesc::OTableFieldDesc()
 }
 //------------------------------------------------------------------------------
 OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS)
-    : ::vos::OReference()
+    : ::salhelper::SimpleReferenceObject()
     ,m_vecCriteria( rRS.m_vecCriteria)
     ,m_aTableName(rRS.GetTable())
     ,m_aAliasName(rRS.GetAlias())		// table range
diff --git a/dbaccess/util/makefile.mk b/dbaccess/util/makefile.mk
index b439400..7da9a2f 100644
--- dbaccess/util/makefile.mk
+++ dbaccess/util/makefile.mk
@@ -126,7 +126,8 @@ SHL2STDLIBS= \
 		$(CPPULIB)				\
 		$(SO2LIB)				\
 		$(VOSLIB)				\
-		$(SALLIB)
+		$(SALLIB)				\
+		$(SALHELPERLIB)
 
 SHL2DEPN=
 SHL2IMPLIB=i$(TARGET2)
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 9e931db..f72d832 100644
--- desktop/inc/app.hxx
+++ desktop/inc/app.hxx
@@ -71,7 +71,6 @@
 using namespace com::sun::star::task;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
-using namespace rtl;
 
 #define DESKTOP_SAVETASKS_MOD 0x1
 #define DESKTOP_SAVETASKS_UNMOD 0x2
@@ -86,7 +85,7 @@ namespace desktop
 class IntroWindow_Impl;
 class CommandLineArgs;
 class Lockfile;
-class AcceptorMap : public std::map< OUString, Reference<XInitialization> > {};
+class AcceptorMap : public std::map< rtl::OUString, Reference<XInitialization> > {};
 struct ConvertData;
 class Desktop : public Application
 {
@@ -208,9 +207,9 @@ class Desktop : public Application
         static void             retrieveCrashReporterState();
 
         // on-demand acceptors
-		static void							createAcceptor(const OUString& aDescription);
+		static void							createAcceptor(const rtl::OUString& aDescription);
 		static void							enableAcceptors();
-		static void							destroyAcceptor(const OUString& aDescription);
+		static void							destroyAcceptor(const rtl::OUString& aDescription);
 
 		sal_Bool						m_bMinimized;
 		sal_Bool						m_bInvisible;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7a07c50..2a5d975 100644
--- desktop/source/app/app.cxx
+++ desktop/source/app/app.cxx
@@ -202,8 +202,8 @@
 #ifndef _VOS_SECURITY_HXX_
 #include <vos/security.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _COMPHELPER_PROCESSFACTORY_HXX_
 #include <comphelper/processfactory.hxx>
@@ -324,7 +324,8 @@
 #define U2S(STRING)                                ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
 
 using namespace vos;
-using namespace rtl;
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 //Gives an ICE with MSVC6
 //namespace css = ::com::sun::star;
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index 1d0a9f8..fb952b1 100644
--- desktop/source/app/userinstall.cxx
+++ desktop/source/app/userinstall.cxx
@@ -65,8 +65,8 @@
 #ifndef _VOS_SECURITY_HXX_
 #include <vos/security.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _TOOLS_RESMGR_HXX_
@@ -104,7 +104,8 @@
 
 #include "app.hxx"
 
-using namespace rtl;
+using rtl::OString;
+using rtl::OUString;
 using namespace osl;
 using namespace utl;
 using namespace com::sun::star::container;
diff --git a/extensions/inc/pch/precompiled_extensions.hxx b/extensions/inc/pch/precompiled_extensions.hxx
index 2af1582..4bfa679 100644
--- extensions/inc/pch/precompiled_extensions.hxx
+++ extensions/inc/pch/precompiled_extensions.hxx
@@ -549,8 +549,8 @@
 #include "vos/module.hxx"
 #include "vos/mutex.hxx"
 #include "vos/pipe.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
 #include "vos/thread.hxx"
 #include "vos/timer.hxx"
 
diff --git a/extensions/source/bibliography/loadlisteneradapter.cxx b/extensions/source/bibliography/loadlisteneradapter.cxx
index e0391fd..646e5af 100644
--- extensions/source/bibliography/loadlisteneradapter.cxx
+++ extensions/source/bibliography/loadlisteneradapter.cxx
@@ -43,8 +43,8 @@
 #ifndef _OSL_DIAGNOSE_H_
 #include <osl/diagnose.h>
 #endif
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 //.........................................................................
@@ -145,7 +145,7 @@ namespace bib
 	{
 		if ( m_bListening )
 		{
-			::vos::ORef< OComponentAdapterBase > xPreventDelete(this);
+			::rtl::Reference< OComponentAdapterBase > xPreventDelete(this);
 
 			disposing();
 
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 9a16d8e..5f06584 100644
--- extensions/source/ole/unoobjw.cxx
+++ extensions/source/ole/unoobjw.cxx
@@ -48,7 +48,7 @@
 
 
 #include <osl/diagnose.h>
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 #include <tools/debug.hxx>
 
 #ifndef _RTL_USTRING_HXX_
diff --git a/extensions/source/ole/unoobjw.hxx b/extensions/source/ole/unoobjw.hxx
index 825e133..0c0d08c 100644
--- extensions/source/ole/unoobjw.hxx
+++ extensions/source/ole/unoobjw.hxx
@@ -40,7 +40,7 @@
 #include <com/sun/star/beans/XExactName.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/script/InvocationInfo.hpp>
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 
 #include <tools/presys.h>
 #include "comifaces.hxx"
diff --git a/framework/inc/classes/framecontainer.hxx b/framework/inc/classes/framecontainer.hxx
index ed7c492..5d4636f 100644
--- framework/inc/classes/framecontainer.hxx
+++ framework/inc/classes/framecontainer.hxx
@@ -91,8 +91,8 @@
 #include <cppuhelper/weakref.hxx>
 #endif
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _RTL_USTRING_
diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx
index d612d92..6d31ef7 100644
--- framework/inc/pch/precompiled_framework.hxx
+++ framework/inc/pch/precompiled_framework.hxx
@@ -494,7 +494,7 @@
 #include "vcl/wintypes.hxx"
 
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
+#include "rtl/ref.hxx"
 #include "vos/thread.hxx"
 #include "vos/timer.hxx"
 
diff --git a/framework/source/helper/dockingareadefaultacceptor.cxx b/framework/source/helper/dockingareadefaultacceptor.cxx
index f7d389d..bb51707 100644
--- framework/source/helper/dockingareadefaultacceptor.cxx
+++ framework/source/helper/dockingareadefaultacceptor.cxx
@@ -80,7 +80,6 @@ using namespace ::com::sun::star::lang			;
 using namespace ::com::sun::star::uno			;
 using namespace ::cppu							;
 using namespace ::osl							;
-using namespace ::rtl							;
 
 //_________________________________________________________________________________________________________________
 //	non exported const
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index aba83ce..652af8a 100644
--- framework/source/helper/oframes.cxx
+++ framework/source/helper/oframes.cxx
@@ -80,9 +80,9 @@ using namespace ::com::sun::star::lang			;
 using namespace ::com::sun::star::uno			;
 using namespace ::cppu							;
 using namespace ::osl							;
-using namespace ::rtl							;
 using namespace ::std							;
-using namespace ::vos							;
+
+using rtl::OUString;
 
 //_________________________________________________________________________________________________________________
 //	non exported const
diff --git a/package/inc/HashMaps.hxx b/package/inc/HashMaps.hxx
index f31fcff..a66b874 100644
--- package/inc/HashMaps.hxx
+++ package/inc/HashMaps.hxx
@@ -38,8 +38,8 @@
 #ifndef _ZIP_ENTRY_HXX_
 #include <ZipEntry.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #include <hash_map>
 
@@ -63,7 +63,7 @@ typedef std::hash_map < rtl::OUString,
 						eqFunc > FolderHash;
 
 typedef std::hash_map < rtl::OUString, 
-						vos::ORef < com::sun::star::packages::ContentInfo >,
+						rtl::Reference < com::sun::star::packages::ContentInfo >,
 						::rtl::OUStringHash, 
 						eqFunc > ContentHash;
 
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 262602a..fff013a 100644
--- package/inc/ZipFile.hxx
+++ package/inc/ZipFile.hxx
@@ -64,9 +64,9 @@ namespace com { namespace sun { namespace star {
 	namespace lang { class XMultiServiceFactory; }
 	namespace ucb  { class XProgressHandler; }
 } } }
-namespace vos 
+namespace rtl
 {
-	template < class T > class ORef;
+	template < class T > class Reference;
 }
 /*  
  * We impose arbitrary but reasonable limit on ZIP files.
@@ -97,25 +97,25 @@ protected:
 
 	com::sun::star::uno::Reference < com::sun::star::io::XInputStream >  createMemoryStream( 
 			ZipEntry & rEntry,
-			const vos::ORef < EncryptionData > &rData, 
+			const rtl::Reference < EncryptionData > &rData, 
 			sal_Bool bRawStream,
 			sal_Bool bDecrypt );
 
 	com::sun::star::uno::Reference < com::sun::star::io::XInputStream >  createFileStream(
 			ZipEntry & rEntry,
-			const vos::ORef < EncryptionData > &rData, 
+			const rtl::Reference < EncryptionData > &rData, 
 			sal_Bool bRawStream,
 			sal_Bool bDecrypt );
 
 	// aMediaType parameter is used only for raw stream header creation
 	com::sun::star::uno::Reference < com::sun::star::io::XInputStream >  createUnbufferedStream(
 			ZipEntry & rEntry,
-			const vos::ORef < EncryptionData > &rData, 
+			const rtl::Reference < EncryptionData > &rData, 
 			sal_Int8 nStreamMode,
 			sal_Bool bDecrypt,
 			::rtl::OUString aMediaType = ::rtl::OUString() );
 
-	sal_Bool hasValidPassword ( ZipEntry & rEntry, const vos::ORef < EncryptionData > &rData );
+	sal_Bool hasValidPassword ( ZipEntry & rEntry, const rtl::Reference < EncryptionData > &rData );
 
 	sal_Bool checkSizeAndCRC( const ZipEntry& aEntry );
 
@@ -146,42 +146,42 @@ public:
 	void setInputStream ( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewStream );
     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData( 
 			ZipEntry& rEntry,
-			const vos::ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			sal_Bool bDecrypt)
 		throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
 	
-	static void StaticGetCipher ( const vos::ORef < EncryptionData > & xEncryptionData, rtlCipher &rCipher );
+	static void StaticGetCipher ( const rtl::Reference < EncryptionData > & xEncryptionData, rtlCipher &rCipher );
 
-	static void StaticFillHeader ( const vos::ORef < EncryptionData > & rData,
+	static void StaticFillHeader ( const rtl::Reference < EncryptionData > & rData,
 									sal_Int32 nSize,
 									const ::rtl::OUString& aMediaType,
 									sal_Int8 * & pHeader );
 
-	static sal_Bool StaticFillData ( vos::ORef < EncryptionData > & rData,
+	static sal_Bool StaticFillData ( rtl::Reference < EncryptionData > & rData,
 									 sal_Int32 &rSize,
 									 ::rtl::OUString& aMediaType,
 									 ::com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &rStream );
 
 	static ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > StaticGetDataFromRawStream(
 			const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream,
-			const vos::ORef < EncryptionData > &rData )
+			const rtl::Reference < EncryptionData > &rData )
 		throw ( ::com::sun::star::packages::WrongPasswordException,
 				::com::sun::star::packages::zip::ZipIOException,
 				::com::sun::star::uno::RuntimeException );
 				
 	static sal_Bool StaticHasValidPassword ( const ::com::sun::star::uno::Sequence< sal_Int8 > &aReadBuffer,
-											 const vos::ORef < EncryptionData > &rData );
+											 const rtl::Reference < EncryptionData > &rData );
 	
 
     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream( 
 			ZipEntry& rEntry,
-			const vos::ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			sal_Bool bDecrypt )
 		throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
 
     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getDataStream( 
 			ZipEntry& rEntry,
-			const vos::ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			sal_Bool bDecrypt )
 		throw ( ::com::sun::star::packages::WrongPasswordException,
 				::com::sun::star::io::IOException,
@@ -190,7 +190,7 @@ public:
 
     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getWrappedRawStream( 
 			ZipEntry& rEntry,
-			const vos::ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			const ::rtl::OUString& aMediaType )
 		throw ( ::com::sun::star::packages::NoEncryptionException,
 				::com::sun::star::io::IOException,
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index 85c597d..057eecf 100644
--- package/inc/ZipOutputStream.hxx
+++ package/inc/ZipOutputStream.hxx
@@ -55,9 +55,9 @@
 
 struct ZipEntry;
 class EncryptionData;
-namespace vos 
+namespace rtl
 {
-	template < class T > class ORef;
+	template < class T > class Reference;
 }
 class ZipOutputStream
 {
@@ -94,7 +94,7 @@ public:
     void SAL_CALL setLevel( sal_Int32 nNewLevel )
 		throw(::com::sun::star::uno::RuntimeException);
     void SAL_CALL putNextEntry( ZipEntry& rEntry, 
-			vos::ORef < EncryptionData > &rData,
+			rtl::Reference < EncryptionData > &rData,
 			sal_Bool bEncrypt = sal_False )
 		throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
     void SAL_CALL closeEntry(  )
diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx
index 96eed44..e0c0922 100644
--- package/source/manifest/UnoRegister.cxx
+++ package/source/manifest/UnoRegister.cxx
@@ -57,7 +57,6 @@
 
 #include <zipfileaccess.hxx>
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
@@ -65,6 +64,8 @@ using namespace ::com::sun::star::registry;
 using namespace ::com::sun::star::packages;
 using namespace ::com::sun::star::packages::manifest;
 
+using rtl::OUString;
+
 static sal_Bool writeInfo( void * pRegistryKey,
 						   const OUString & rImplementationName,
    						   Sequence< OUString > const & rServiceNames )
diff --git a/package/source/zipapi/EntryInputStream.cxx b/package/source/zipapi/EntryInputStream.cxx
index f989afe..74ce2af 100644
--- package/source/zipapi/EntryInputStream.cxx
+++ package/source/zipapi/EntryInputStream.cxx
@@ -68,7 +68,7 @@ using namespace com::sun::star::packages::zip::ZipConstants;
 
 EntryInputStream::EntryInputStream( Reference < io::XInputStream > xNewInput, 
 									const ZipEntry & rNewEntry,
-									const vos::ORef < EncryptionData > &xEncryptData,
+									const rtl::Reference < EncryptionData > &xEncryptData,
 									sal_Bool bGetRawStream)
 : xStream( xNewInput )
 , xSeek( xNewInput, UNO_QUERY )
diff --git a/package/source/zipapi/EntryInputStream.hxx b/package/source/zipapi/EntryInputStream.hxx
index 651141e..8877b75 100644
--- package/source/zipapi/EntryInputStream.hxx
+++ package/source/zipapi/EntryInputStream.hxx
@@ -51,7 +51,7 @@
 #include <com/sun/star/packages/zip/ZipEntry.hpp>
 #endif
 #ifndef _VOS_REF_H_
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #endif
 #ifndef _ENCRYPTION_DATA_HXX
 #include <EncryptionData.hxx>
@@ -65,7 +65,7 @@ protected:
 	sal_Int64 nEnd, nCurrent, nUncompressedSize;
 	sal_Bool bRawStream, bHaveInMemory, bEncrypted;
 	com::sun::star::uno::Sequence < sal_Int8 > aBuffer;
-	const vos::ORef < EncryptionData > xEncryptionData;
+	const rtl::Reference < EncryptionData > xEncryptionData;
 	const com::sun::star::packages::zip::ZipEntry aEntry;
 	Inflater aInflater;
 	void readIntoMemory()
@@ -73,7 +73,7 @@ protected:
 public:
 			 EntryInputStream( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xInput, 
 					 		   const com::sun::star::packages::zip::ZipEntry &rNewEntry, 
-							   const vos::ORef < EncryptionData > &xEncryptData,
+							   const rtl::Reference < EncryptionData > &xEncryptData,
 							   sal_Bool bGetRawStream = sal_False);
 	virtual ~EntryInputStream();
 
diff --git a/package/source/zipapi/XFileStream.cxx b/package/source/zipapi/XFileStream.cxx
index bb2870c..323a029 100644
--- package/source/zipapi/XFileStream.cxx
+++ package/source/zipapi/XFileStream.cxx
@@ -69,7 +69,7 @@ using ::rtl::OUString;
 XFileStream::XFileStream( ZipEntry & rEntry,
 			 			  com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewZipStream,
 			 			  com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewTempStream,
-			 			  const vos::ORef < EncryptionData > &rData, 
+			 			  const rtl::Reference < EncryptionData > &rData, 
 			 			  sal_Bool bNewRawStream,
 			 			  sal_Bool bIsEncrypted )
 : maEntry ( rEntry )
diff --git a/package/source/zipapi/XFileStream.hxx b/package/source/zipapi/XFileStream.hxx
index cac7951..503c858 100644
--- package/source/zipapi/XFileStream.hxx
+++ package/source/zipapi/XFileStream.hxx
@@ -48,7 +48,7 @@
 #include <cppuhelper/implbase2.hxx>
 #endif
 #ifndef _VOS_REF_H_
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #endif
 #ifndef _INFLATER_HXX
 #include <Inflater.hxx>
@@ -76,7 +76,7 @@ protected:
 	com::sun::star::uno::Reference < com::sun::star::io::XOutputStream > mxTempOut;
 	com::sun::star::uno::Sequence < sal_Int8 > maBuffer, maCompBuffer;
 	ZipEntry maEntry;
-	vos::ORef < EncryptionData > mxData;
+	rtl::Reference < EncryptionData > mxData;
 	rtlCipher maCipher;
 	Inflater maInflater;
 	sal_Bool mbRawStream, mbFinished;
@@ -87,7 +87,7 @@ public:
 	XFileStream( ZipEntry & rEntry,
 				 com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewZipStream,
 				 com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewTempStream,
-				 const vos::ORef < EncryptionData > &rData, 
+				 const rtl::Reference < EncryptionData > &rData, 
 				 sal_Bool bRawStream,
 				 sal_Bool bIsEncrypted );
 	virtual ~XFileStream();
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index e967052..34a83a5 100644
--- package/source/zipapi/XUnbufferedStream.cxx
+++ package/source/zipapi/XUnbufferedStream.cxx
@@ -77,7 +77,7 @@ using ::rtl::OUString;
 
 XUnbufferedStream::XUnbufferedStream( ZipEntry & rEntry,
 			 			  Reference < XInputStream > xNewZipStream,
-			 			  const vos::ORef < EncryptionData > &rData, 
+			 			  const rtl::Reference < EncryptionData > &rData, 
 			 			  sal_Int8 nStreamMode,
 			 			  sal_Bool bIsEncrypted,
 						  const ::rtl::OUString& aMediaType,
@@ -109,7 +109,7 @@ XUnbufferedStream::XUnbufferedStream( ZipEntry & rEntry,
 		mnZipSize = maEntry.nSize;
 		mnZipEnd = maEntry.nMethod == DEFLATED ? maEntry.nOffset + maEntry.nCompressedSize : maEntry.nOffset + maEntry.nSize;
 	}
-	sal_Bool bHaveEncryptData = ( !rData.isEmpty() && rData->aSalt.getLength() && rData->aInitVector.getLength() && rData->nIterationCount != 0 ) ? sal_True : sal_False;
+	sal_Bool bHaveEncryptData = ( rData.is() && rData->aSalt.getLength() && rData->aInitVector.getLength() && rData->nIterationCount != 0 ) ? sal_True : sal_False;
 	sal_Bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
 	
 	if ( bMustDecrypt )
@@ -134,7 +134,7 @@ XUnbufferedStream::XUnbufferedStream( ZipEntry & rEntry,
 
 // allows to read package raw stream
 XUnbufferedStream::XUnbufferedStream( const Reference < XInputStream >& xRawStream,
-					const vos::ORef < EncryptionData > &rData )
+					const rtl::Reference < EncryptionData > &rData )
 : mxZipStream ( xRawStream )
 , mxZipSeek ( xRawStream, UNO_QUERY )
 , mxData ( rData )
diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx
index dd40359..230277d 100644
--- package/source/zipapi/XUnbufferedStream.hxx
+++ package/source/zipapi/XUnbufferedStream.hxx
@@ -54,7 +54,7 @@
 #include <cppuhelper/implbase1.hxx>
 #endif
 #ifndef _VOS_REF_H_
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #endif
 #ifndef _INFLATER_HXX
 #include <Inflater.hxx>
@@ -82,7 +82,7 @@ protected:
 	com::sun::star::uno::Reference < com::sun::star::io::XSeekable > mxZipSeek;
 	com::sun::star::uno::Sequence < sal_Int8 > maCompBuffer, maHeader;
 	ZipEntry maEntry;
-	vos::ORef < EncryptionData > mxData;
+	rtl::Reference < EncryptionData > mxData;
 	rtlCipher maCipher;
 	Inflater maInflater;
 	sal_Bool mbRawStream, mbWrappedRaw, mbFinished;
@@ -94,7 +94,7 @@ protected:
 public:
 	XUnbufferedStream( ZipEntry & rEntry,
 				 com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewZipStream,
-				 const vos::ORef < EncryptionData > &rData, 
+				 const rtl::Reference < EncryptionData > &rData, 
 				 sal_Int8 nStreamMode,
 				 sal_Bool bIsEncrypted,
 				 const ::rtl::OUString& aMediaType,
@@ -102,7 +102,7 @@ public:
 
 	// allows to read package raw stream
 	XUnbufferedStream( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& xRawStream,
-				 const vos::ORef < EncryptionData > &rData );
+				 const rtl::Reference < EncryptionData > &rData );
 
 
 	virtual ~XUnbufferedStream();
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 7422f09..d9e0523 100644
--- package/source/zipapi/ZipFile.cxx
+++ package/source/zipapi/ZipFile.cxx
@@ -87,8 +87,6 @@
 #include <string.h> // for memcpy
 #include <vector>
 
-using namespace vos;
-using namespace rtl;
 using namespace com::sun::star;
 using namespace com::sun::star::io;
 using namespace com::sun::star::uno;
@@ -98,6 +96,7 @@ using namespace com::sun::star::packages;
 using namespace com::sun::star::packages::zip;
 using namespace com::sun::star::packages::zip::ZipConstants;
 
+using rtl::OUString;
 
 /** This class is used to read entries from a zip file
  */
@@ -158,9 +157,9 @@ void ZipFile::setInputStream ( Reference < XInputStream > xNewStream )
 	aGrabber.setInputStream ( xStream );
 }
 
-void ZipFile::StaticGetCipher ( const ORef < EncryptionData > & xEncryptionData, rtlCipher &rCipher )
+void ZipFile::StaticGetCipher ( const rtl::Reference < EncryptionData > & xEncryptionData, rtlCipher &rCipher )
 {
-    if ( ! xEncryptionData.isEmpty() )
+    if ( xEncryptionData.is() )
 	{
 		Sequence < sal_uInt8 > aDerivedKey (16);
 		rtlCipherError aResult;
@@ -184,7 +183,7 @@ void ZipFile::StaticGetCipher ( const ORef < EncryptionData > & xEncryptionData,
 	}
 }
 
-void ZipFile::StaticFillHeader ( const ORef < EncryptionData > & rData, 
+void ZipFile::StaticFillHeader ( const rtl::Reference < EncryptionData > & rData, 
 								sal_Int32 nSize,
 								const ::rtl::OUString& aMediaType,
 								sal_Int8 * & pHeader )
@@ -251,7 +250,7 @@ void ZipFile::StaticFillHeader ( const ORef < EncryptionData > & rData,
 	pHeader += nMediaTypeLength;
 }
 
-sal_Bool ZipFile::StaticFillData ( ORef < EncryptionData > & rData,
+sal_Bool ZipFile::StaticFillData ( rtl::Reference < EncryptionData > & rData,
 									sal_Int32 &rSize,
 									::rtl::OUString& aMediaType,
 									Reference < XInputStream > &rStream )
@@ -316,10 +315,10 @@ sal_Bool ZipFile::StaticFillData ( ORef < EncryptionData > & rData,
 }
 
 Reference< XInputStream > ZipFile::StaticGetDataFromRawStream(	const Reference< XInputStream >& xStream,
-																const ORef < EncryptionData > &rData )
+																const rtl::Reference < EncryptionData > &rData )
 		throw ( packages::WrongPasswordException, ZipIOException, RuntimeException )
 {
-	if ( rData.isEmpty() )
+	if ( !rData.is() )
 		throw ZipIOException( OUString::createFromAscii( "Encrypted stream without encryption data!\n" ),
 							Reference< XInterface >() );
 
@@ -356,9 +355,9 @@ Reference< XInputStream > ZipFile::StaticGetDataFromRawStream(	const Reference<
 	return new XUnbufferedStream ( xStream, rData );
 }
 
-sal_Bool ZipFile::StaticHasValidPassword( const Sequence< sal_Int8 > &aReadBuffer, const ORef < EncryptionData > &rData )
+sal_Bool ZipFile::StaticHasValidPassword( const Sequence< sal_Int8 > &aReadBuffer, const rtl::Reference < EncryptionData > &rData )
 {
-	if ( !rData.isValid() || !rData->aKey.getLength() )
+	if ( !rData.is() || !rData->aKey.getLength() )
 		return sal_False;
 
 	sal_Bool bRet = sal_False;
@@ -405,7 +404,7 @@ sal_Bool ZipFile::StaticHasValidPassword( const Sequence< sal_Int8 > &aReadBuffe
 	return bRet;
 }
 
-sal_Bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ORef < EncryptionData > &rData )
+sal_Bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const rtl::Reference < EncryptionData > &rData )
 {
 	sal_Bool bRet = sal_False;
 	if ( rData->aKey.getLength() )
@@ -427,7 +426,7 @@ sal_Bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ORef < EncryptionD
 #if 0
 Reference < XInputStream > ZipFile::createFileStream(
 			ZipEntry & rEntry,
-			const ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			sal_Bool bRawStream,
 			sal_Bool bIsEncrypted )
 {
@@ -437,7 +436,7 @@ Reference < XInputStream > ZipFile::createFileStream(
 }
 Reference < XInputStream > ZipFile::createMemoryStream(
 			ZipEntry & rEntry,
-			const ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			sal_Bool bRawStream, 
 			sal_Bool bIsEncrypted )
 {
@@ -460,7 +459,7 @@ Reference < XInputStream > ZipFile::createMemoryStream(
 	// we have the salt. If we have the salt, then check if we have the encryption key
 	// if not, return rawStream instead.
 	
-	sal_Bool bHaveEncryptData = ( !rData.isEmpty() && rData->aSalt.getLength() && rData->aInitVector.getLength() && rData->nIterationCount != 0 ) ? sal_True : sal_False;
+	sal_Bool bHaveEncryptData = ( rData.is() && rData->aSalt.getLength() && rData->aInitVector.getLength() && rData->nIterationCount != 0 ) ? sal_True : sal_False;
 	sal_Bool bMustDecrypt = ( !bRawStream && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
 
 	if ( bMustDecrypt )
@@ -519,7 +518,7 @@ Reference < XInputStream > ZipFile::createMemoryStream(
 #endif
 Reference < XInputStream > ZipFile::createUnbufferedStream(
 			ZipEntry & rEntry,
-			const ORef < EncryptionData > &rData,
+			const rtl::Reference < EncryptionData > &rData,
 			sal_Int8 nStreamMode,
 			sal_Bool bIsEncrypted,
 			::rtl::OUString aMediaType )
@@ -546,7 +545,7 @@ sal_Int32 SAL_CALL ZipFile::getSize(  )
 }
 
 Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntry,
-		const vos::ORef < EncryptionData > &rData,
+		const rtl::Reference < EncryptionData > &rData,
 		sal_Bool bIsEncrypted )
 	throw(IOException, ZipException, RuntimeException)
 {
@@ -560,7 +559,7 @@ Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntry,
 	
 	// if we have a digest, then this file is an encrypted one and we should
 	// check if we can decrypt it or not
-	if ( bIsEncrypted && !rData.isEmpty() && rData->aDigest.getLength() )
+	if ( bIsEncrypted && rData.is() && rData->aDigest.getLength() )
 		bNeedRawStream = !hasValidPassword ( rEntry, rData );
 
 	return createUnbufferedStream ( rEntry,
@@ -570,7 +569,7 @@ Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntry,
 }
 
 Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry,
-		const vos::ORef < EncryptionData > &rData,
+		const rtl::Reference < EncryptionData > &rData,
 		sal_Bool bIsEncrypted )
 	throw ( packages::WrongPasswordException,
 			IOException,
@@ -587,7 +586,7 @@ Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry,
 	{
 		// in case no digest is provided there is no way
 		// to detect password correctness
-		if ( rData.isEmpty() )
+		if ( !rData.is() )
 			throw ZipException( OUString::createFromAscii( "Encrypted stream without encryption data!\n" ),
 								Reference< XInterface >() );
 
@@ -607,7 +606,7 @@ Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry,
 }
 
 Reference< XInputStream > SAL_CALL ZipFile::getRawData( ZipEntry& rEntry,
-		const vos::ORef < EncryptionData > &rData,
+		const rtl::Reference < EncryptionData > &rData,
 		sal_Bool bIsEncrypted )
 	throw(IOException, ZipException, RuntimeException)
 {
@@ -619,14 +618,14 @@ Reference< XInputStream > SAL_CALL ZipFile::getRawData( ZipEntry& rEntry,
 
 Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream(
 		ZipEntry& rEntry,
-		const vos::ORef < EncryptionData > &rData,
+		const rtl::Reference < EncryptionData > &rData,
 		const ::rtl::OUString& aMediaType )
 	throw ( packages::NoEncryptionException,
 			IOException,
 			ZipException,
 			RuntimeException )
 {
-	if ( rData.isEmpty() )
+	if ( !rData.is() )
 		throw packages::NoEncryptionException();
 
 	if ( rEntry.nOffset <= 0 )
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 8d90ae8..d7b60d7 100644
--- package/source/zipapi/ZipOutputStream.cxx
+++ package/source/zipapi/ZipOutputStream.cxx
@@ -54,7 +54,7 @@
 #include <ZipEntry.hxx>
 #endif
 #ifndef _VOS_REF_H_
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #endif
 #ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
 #include <com/sun/star/io/XOutputStream.hpp>
@@ -63,7 +63,6 @@
 #include <ImplValidCharacters.hxx>
 #endif
 
-using namespace rtl;
 using namespace com::sun::star::io;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::packages;
@@ -109,7 +108,7 @@ void SAL_CALL ZipOutputStream::setLevel( sal_Int32 nNewLevel )
 }
 
 void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry, 
-						vos::ORef < EncryptionData > &xEncryptData,
+						rtl::Reference < EncryptionData > &xEncryptData,
 						sal_Bool bEncrypt)
 	throw(IOException, RuntimeException)
 {
@@ -142,7 +141,7 @@ void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry,
 		aDigest = rtl_digest_createSHA1();
 		mnDigested = 0;
 		rEntry.nFlag |= 1 << 4;
-		pCurrentEncryptData = xEncryptData.getBodyPtr();
+		pCurrentEncryptData = xEncryptData.get();
 	}
 	sal_Int32 nLOCLength = writeLOC(rEntry);
 	rEntry.nOffset = static_cast < sal_Int32 > (aChucker.getPosition()) - nLOCLength;
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 162ce3f..76cafb4 100644
--- package/source/zippackage/ZipPackage.cxx
+++ package/source/zippackage/ZipPackage.cxx
@@ -998,7 +998,7 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
 
 	try
 	{
-		vos::ORef < EncryptionData > xEmpty;
+		rtl::Reference < EncryptionData > xEmpty;
 		aZipOut.putNextEntry( *pEntry, xEmpty );
 		aZipOut.write( aType, 0, nBufferLength );
 		aZipOut.closeEntry();
@@ -1156,7 +1156,7 @@ sal_Bool ZipPackage::writeFileIsTemp()
 				pBuffer->realloc( nBufferLength );
 
 				// the manifest.xml is never encrypted - so pass an empty reference
-				vos::ORef < EncryptionData > xEmpty;
+				rtl::Reference < EncryptionData > xEmpty;
 				aZipOut.putNextEntry( *pEntry, xEmpty );
 				aZipOut.write( pBuffer->getSequence(), 0, nBufferLength );
 				aZipOut.closeEntry();
@@ -1215,7 +1215,7 @@ sal_Bool ZipPackage::writeFileIsTemp()
 			pBuffer->realloc( nBufferLength );
 
 			// there is no encryption in this format currently
-			vos::ORef < EncryptionData > xEmpty;
+			rtl::Reference < EncryptionData > xEmpty;
 			aZipOut.putNextEntry( *pEntry, xEmpty );
 			aZipOut.write( pBuffer->getSequence(), 0, nBufferLength );
 			aZipOut.closeEntry();
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index f3a56be..51ebcb7 100644
--- package/source/zippackage/ZipPackageEntry.cxx
+++ package/source/zippackage/ZipPackageEntry.cxx
@@ -69,7 +69,6 @@
 #endif
 #endif
  
-using namespace rtl;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
@@ -77,6 +76,8 @@ using namespace com::sun::star::container;
 using namespace com::sun::star::packages::zip;
 using namespace com::sun::star::packages::zip::ZipConstants;
 
+using rtl::OUString;
+
 ZipPackageEntry::ZipPackageEntry ( bool bNewFolder )
 : mbIsFolder ( bNewFolder )
 , mbAllowRemoveOnInsert( sal_True )
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index af0b527..2051cb1 100644
--- package/source/zippackage/ZipPackageFolder.cxx
+++ package/source/zippackage/ZipPackageFolder.cxx
@@ -91,10 +91,10 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::io;
 using namespace cppu;
-using namespace rtl;
 using namespace std;
 using namespace ::com::sun::star;
-using vos::ORef;
+
+using rtl::OUString;
 
 Sequence < sal_Int8 > ZipPackageFolder::aImplementationId = Sequence < sal_Int8 > ();
 
@@ -311,7 +311,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
 
 		try
 		{
-			vos::ORef < EncryptionData > aEmptyEncr;
+			rtl::Reference < EncryptionData > aEmptyEncr;
 			rZipOut.putNextEntry ( *pTempEntry, aEmptyEncr, sal_False );
 			rZipOut.rawCloseEntry();
 		}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index cdbcbd8..2d72b71 100644
--- package/source/zippackage/ZipPackageStream.cxx
+++ package/source/zippackage/ZipPackageStream.cxx
@@ -93,7 +93,8 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star;
 using namespace cppu;
-using namespace rtl;
+
+using rtl::OUString;
 
 Sequence < sal_Int8 > ZipPackageStream::aImplementationId = Sequence < sal_Int8 > ();
 
@@ -196,7 +197,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCop
 	if ( m_nStreamMode != PACKAGE_STREAM_RAW || !GetOwnSeekStream().is() )
 		throw io::IOException(); // TODO
 
-	if ( xEncryptionData.isEmpty() )
+	if ( !xEncryptionData.is() )
 		throw ZipIOException( OUString::createFromAscii( "Encrypted stream without encryption data!\n" ),
 							Reference< XInterface >() );
 
@@ -236,7 +237,7 @@ Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( sal_B
 	
 	if ( bToBeEncrypted )
 	{
-		aKey = ( xEncryptionData.isEmpty() || !bHaveOwnKey ) ? rZipPackage.getEncryptionKey() : 
+		aKey = ( !xEncryptionData.is() || !bHaveOwnKey ) ? rZipPackage.getEncryptionKey() : 
 																				xEncryptionData->aKey;
 		if ( !aKey.getLength() )
 			throw packages::NoEncryptionException(); // TODO
@@ -351,7 +352,7 @@ sal_Bool ZipPackageStream::ParsePackageRawStream()
 
 	sal_Bool bOk = sal_False;
 
-	vos::ORef < EncryptionData > xTempEncrData;
+	rtl::Reference < EncryptionData > xTempEncrData;
 	sal_Int32 nMagHackSize = 0;
 	Sequence < sal_Int8 > aHeader ( 4 );
 
@@ -438,7 +439,7 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData()
 	{
 		if (IsPackageMember())
 		{
-			if ( !xEncryptionData.isEmpty() && !bHaveOwnKey )
+			if ( xEncryptionData.is() && !bHaveOwnKey )
 				xEncryptionData->aKey = rZipPackage.getEncryptionKey();
 			return rZipPackage.getZipFile().getRawData( aEntry, xEncryptionData, bIsEncrypted );
 		}
@@ -471,7 +472,7 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream(  )
 	{
 		if (IsPackageMember())
 		{
-			if ( !xEncryptionData.isEmpty() && !bHaveOwnKey )
+			if ( xEncryptionData.is() && !bHaveOwnKey )
 				xEncryptionData->aKey = rZipPackage.getEncryptionKey();
 			return rZipPackage.getZipFile().getInputStream( aEntry, xEncryptionData, bIsEncrypted );
 		}
@@ -511,12 +512,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream()
 	if ( m_nStreamMode == PACKAGE_STREAM_DETECT )
 		throw packages::zip::ZipIOException(); // TODO
 
-	if ( !xEncryptionData.isEmpty() && !bHaveOwnKey )
+	if ( xEncryptionData.is() && !bHaveOwnKey )
 		xEncryptionData->aKey = rZipPackage.getEncryptionKey();
 
 	if (IsPackageMember())
 	{
-		if ( !xEncryptionData.isEmpty() && !bHaveOwnKey )
+		if ( xEncryptionData.is() && !bHaveOwnKey )
 			xEncryptionData->aKey = rZipPackage.getEncryptionKey();
 
 		return rZipPackage.getZipFile().getDataStream( aEntry, xEncryptionData, bIsEncrypted );
@@ -549,7 +550,7 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream()
 
 	if (IsPackageMember())
 	{
-		if ( !bIsEncrypted || xEncryptionData.isEmpty() )
+		if ( !bIsEncrypted || !xEncryptionData.is() )
 			throw packages::NoEncryptionException(); // TODO
 
 		return rZipPackage.getZipFile().getWrappedRawStream( aEntry, xEncryptionData, sMediaType );
@@ -704,7 +705,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
 												2 );
 
 			bToBeEncrypted = bEnc;
-			if ( bToBeEncrypted && xEncryptionData.isEmpty())
+			if ( bToBeEncrypted && !xEncryptionData.is())
 				xEncryptionData = new EncryptionData;
 		}
 		else
@@ -741,7 +742,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
 
 		if ( aNewKey.getLength() )
 		{
-			if ( xEncryptionData.isEmpty())
+			if ( !xEncryptionData.is())
 				xEncryptionData = new EncryptionData;
 
 			xEncryptionData->aKey = aNewKey;
@@ -813,7 +814,7 @@ Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
 	}
 	else if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EncryptionKey" ) ) )
 	{
-		aAny <<= xEncryptionData.isEmpty () ? Sequence < sal_Int8 > () : xEncryptionData->aKey;
+		aAny <<= !xEncryptionData.is() ? Sequence < sal_Int8 > () : xEncryptionData->aKey;
 		return aAny;
 	}
 	else
diff --git a/package/source/zippackage/ZipPackageStream.hxx b/package/source/zippackage/ZipPackageStream.hxx
index 08b943b..a32e97c 100644
--- package/source/zippackage/ZipPackageStream.hxx
+++ package/source/zippackage/ZipPackageStream.hxx
@@ -50,7 +50,7 @@
 #include <ZipPackageEntry.hxx>
 #endif
 #ifndef _VOS_REF_H_
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #endif
 #ifndef _ENCRYPTION_DATA_HXX_
 #include <EncryptionData.hxx>
@@ -84,7 +84,7 @@ protected:
 	const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
 	ZipPackage 			&rZipPackage;
 	sal_Bool			bToBeCompressed, bToBeEncrypted, bHaveOwnKey, bIsEncrypted;
-	vos::ORef < EncryptionData > xEncryptionData;
+	rtl::Reference < EncryptionData > xEncryptionData;
 
 	sal_uInt8	m_nStreamMode;
 	sal_uInt32	m_nMagicalHackPos;
@@ -104,7 +104,7 @@ public:
 	sal_Bool IsToBeEncrypted ()  { return bToBeEncrypted;}
 	sal_Bool IsEncrypted ()  	 { return bIsEncrypted;}
 	sal_Bool IsPackageMember ()  { return m_nStreamMode == PACKAGE_STREAM_PACKAGEMEMBER;}
-	vos::ORef < EncryptionData > & getEncryptionData ()
+	rtl::Reference < EncryptionData > & getEncryptionData ()
 	{ return xEncryptionData;}
 	const com::sun::star::uno::Sequence < sal_Int8 >& getKey ()
 	{ return xEncryptionData->aKey;}
@@ -128,10 +128,10 @@ public:
 	void SetToBeEncrypted (sal_Bool bNewValue)  
     { 
         bToBeEncrypted  = bNewValue;
-        if ( bToBeEncrypted && xEncryptionData.isEmpty())
+        if ( bToBeEncrypted && !xEncryptionData.is())
             xEncryptionData = new EncryptionData;
-		else if ( !bToBeEncrypted && !xEncryptionData.isEmpty() )
-			xEncryptionData.unbind();
+		else if ( !bToBeEncrypted && xEncryptionData.is() )
+			xEncryptionData.clear();
     }
 	void SetPackageMember (sal_Bool bNewValue);
 	void setKey (const com::sun::star::uno::Sequence < sal_Int8 >& rNewKey )
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index 544b855..aac0592 100644
--- reportdesign/source/filter/xml/xmlCell.cxx
+++ reportdesign/source/filter/xml/xmlCell.cxx
@@ -101,11 +101,11 @@
 namespace rptxml
 {
     using namespace ::comphelper;
-	using namespace ::rtl;
     using namespace ::com::sun::star;
 	using namespace uno;
 	using namespace beans;
 	using namespace xml::sax;
+    using rtl::OUString;
 
 DBG_NAME( rpt_OXMLCell )
 
diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx
index 618563e..af66ae8 100644
--- reportdesign/source/filter/xml/xmlColumn.cxx
+++ reportdesign/source/filter/xml/xmlColumn.cxx
@@ -86,10 +86,10 @@
 namespace rptxml
 {
     using namespace ::comphelper;
-	using namespace ::rtl;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
 	using namespace ::com::sun::star::xml::sax;
+    using rtl::OUString;
 
 DBG_NAME( rpt_OXMLRowColumn )
 
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index a01dcd5..6980a7a 100644
--- reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -67,11 +67,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace report;
 	using namespace uno;
 	using namespace xml::sax;
+
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLCondPrtExpr )
 
 OXMLCondPrtExpr::OXMLCondPrtExpr( ORptFilter& _rImport,
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index 3a65b25..0e26d2a 100644
--- reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -74,11 +74,12 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::beans;
 	using namespace ::com::sun::star::xml::sax;
 
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLControlProperty )
 
 OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport
diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx
index 713d327..151b946 100644
--- reportdesign/source/filter/xml/xmlExport.hxx
+++ reportdesign/source/filter/xml/xmlExport.hxx
@@ -1,5 +1,3 @@
-#ifndef RPT_XMLEXPORT_HXX
-#define RPT_XMLEXPORT_HXX
 /*************************************************************************
  *
  *  OpenOffice.org - a multi-platform office productivity suite
@@ -35,6 +33,8 @@
  *
  ************************************************************************/
 
+#ifndef RPT_XMLEXPORT_HXX
+#define RPT_XMLEXPORT_HXX
 
 #ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
 #include <com/sun/star/container/XNamed.hpp>
@@ -112,7 +112,6 @@
 
 namespace rptxml
 {
-using namespace ::rtl;
 using namespace ::xmloff::token;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx
index 26e93ee..bd68358 100644
--- reportdesign/source/filter/xml/xmlFixedContent.cxx
+++ reportdesign/source/filter/xml/xmlFixedContent.cxx
@@ -81,9 +81,10 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 
+    using rtl::OUString;
+
 class OXMLCharContent : public XMLCharContext
 {
     OXMLFixedContent* m_pFixedContent;
diff --git a/reportdesign/source/filter/xml/xmlFixedText.cxx b/reportdesign/source/filter/xml/xmlFixedText.cxx
index bb74cc1..91188da 100644
--- reportdesign/source/filter/xml/xmlFixedText.cxx
+++ reportdesign/source/filter/xml/xmlFixedText.cxx
@@ -62,11 +62,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::report;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
+
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLFixedText )
 
 OXMLFixedText::OXMLFixedText( ORptFilter& rImport,
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index 8835900..7c6304f 100644
--- reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -82,7 +82,6 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::comphelper;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::report;
@@ -90,6 +89,8 @@ namespace rptxml
 	using namespace ::com::sun::star::xml::sax;
 	using namespace ::com::sun::star::beans;
 
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLFormatCondition )
 
 OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport,
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx
index 80ca17c..62486d8 100644
--- reportdesign/source/filter/xml/xmlFunction.cxx
+++ reportdesign/source/filter/xml/xmlFunction.cxx
@@ -62,12 +62,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::report;
 	using namespace ::com::sun::star::xml::sax;
 
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLFunction )
 
 OXMLFunction::OXMLFunction( ORptFilter& _rImport
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index ae2f2a7..995bf57 100644
--- reportdesign/source/filter/xml/xmlImage.cxx
+++ reportdesign/source/filter/xml/xmlImage.cxx
@@ -67,10 +67,12 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
+
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLImage )
 
 OXMLImage::OXMLImage( ORptFilter& rImport,
diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx b/reportdesign/source/filter/xml/xmlMasterFields.cxx
index ed5f2b4..663ee2f 100644
--- reportdesign/source/filter/xml/xmlMasterFields.cxx
+++ reportdesign/source/filter/xml/xmlMasterFields.cxx
@@ -62,11 +62,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::report;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
+
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLMasterFields )
 
 OXMLMasterFields::OXMLMasterFields( ORptFilter& rImport,
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx
index 702bedb..7e58a5c 100644
--- reportdesign/source/filter/xml/xmlReport.cxx
+++ reportdesign/source/filter/xml/xmlReport.cxx
@@ -76,11 +76,12 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace uno;
 	using namespace xml::sax;
 
+    using rtl::OUString;
+
 	Sequence< ::rtl::OUString> lcl_getColumnNames(const ::rtl::OUString& _sValue)
 	{
 		String sColumns = _sValue;
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx
index e53764d..8f5a2eb 100644
--- reportdesign/source/filter/xml/xmlReportElement.cxx
+++ reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -68,11 +68,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace report;
 	using namespace uno;
 	using namespace xml::sax;
+
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLReportElement )
 
 OXMLReportElement::OXMLReportElement( ORptFilter& rImport,
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
index b434600..4e5e219 100644
--- reportdesign/source/filter/xml/xmlReportElementBase.cxx
+++ reportdesign/source/filter/xml/xmlReportElementBase.cxx
@@ -55,12 +55,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::report;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
 
+    using rtl::OUString;
+
 OXMLReportElementBase::OXMLReportElementBase( ORptFilter& rImport
 				,sal_uInt16 nPrfx
                 , const OUString& rLName
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index e476a1b..7c9047d 100644
--- reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -97,7 +97,6 @@
 namespace rptxml
 {
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -107,6 +106,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 // -----------------------------------------------------------------------------
 
 class OSpecialHanldeXMLImportPropertyMapper : public SvXMLImportPropertyMapper
diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx
index 801b626..8c96f93 100644
--- reportdesign/source/filter/xml/xmlSubDocument.cxx
+++ reportdesign/source/filter/xml/xmlSubDocument.cxx
@@ -62,11 +62,13 @@
 
 namespace rptxml
 {
-	using namespace ::rtl;
 	using namespace ::com::sun::star;
 	using namespace ::com::sun::star::report;
 	using namespace ::com::sun::star::uno;
 	using namespace ::com::sun::star::xml::sax;
+
+    using rtl::OUString;
+
 DBG_NAME( rpt_OXMLSubDocument )
 
 OXMLSubDocument::OXMLSubDocument( ORptFilter& rImport,
diff --git a/sal/typesconfig/core b/sal/typesconfig/core
index c7cbe4f..9e29fe7 100644
Binary files a/sal/typesconfig/core and b/sal/typesconfig/core differ
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d77f3d8..12d47ce 100644
--- sc/inc/document.hxx
+++ sc/inc/document.hxx
@@ -49,8 +49,8 @@
 #include <com/sun/star/uno/Reference.hxx>
 #endif
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef INCLUDED_SCDLLAPI_H
@@ -260,7 +260,7 @@ friend class ScPivot;
 private:
 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
 
-	vos::ORef<ScPoolHelper> xPoolHelper;
+	rtl::Reference<ScPoolHelper> xPoolHelper;
 
 	ScFieldEditEngine*	pEditEngine;					// uses pEditPool from xPoolHelper
 	ScNoteEditEngine*	pNoteEngine;					// uses pEditPool from xPoolHelper
@@ -298,7 +298,7 @@ private:
 	ScChangeViewSettings* pChangeViewSettings;
 	ScScriptTypeData*	pScriptTypeData;
 	ScRefreshTimerControl* pRefreshTimerControl;
-	vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharacters;
+	rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharacters;
 
 	ScFieldEditEngine*	pCacheFieldEditEngine;
 
@@ -1468,8 +1468,8 @@ SC_DLLPUBLIC	SvNumberFormatter*	GetFormatTable() const;
 	ScChangeViewSettings* GetChangeViewSettings() const		{ return pChangeViewSettings; }
 	void				SetChangeViewSettings(const ScChangeViewSettings& rNew);
 
-	vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharacters();
-	void			SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew );
+	rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharacters();
+	void			SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew );
 
 	BYTE			GetAsianCompression() const;		// CharacterCompressionType values
 	BOOL			IsValidAsianCompression() const;
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 9115eab..15234c4 100644
--- sc/source/core/data/documen2.cxx
+++ sc/source/core/data/documen2.cxx
@@ -583,9 +583,9 @@ ScDocument::~ScDocument()
 	// delete the EditEngine before destroying the xPoolHelper
 	delete pCacheFieldEditEngine;
 
-	if ( xPoolHelper.isValid() && !bIsClip )
+	if ( xPoolHelper.is() && !bIsClip )
 		xPoolHelper->SourceDocumentGone();
-	xPoolHelper.unbind();
+	xPoolHelper.clear();
 
 	DeleteColorTable();
 	delete pScriptTypeData;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index e350a99..fa1e026 100644
--- sc/source/core/data/documen3.cxx
+++ sc/source/core/data/documen3.cxx
@@ -1826,7 +1826,7 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy
 	eLanguage = eLatin;
 	eCjkLanguage = eCjk;
 	eCtlLanguage = eCtl;
-	if ( xPoolHelper.isValid() )
+	if ( xPoolHelper.is() )
 	{
 		ScDocumentPool* pPool = xPoolHelper->GetDocPool();
 		pPool->SetPoolDefaultItem( SvxLanguageItem( eLanguage, ATTR_FONT_LANGUAGE ) );
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index a6e80bd..f38712d 100644
--- sc/source/core/data/documen9.cxx
+++ sc/source/core/data/documen9.cxx
@@ -914,12 +914,12 @@ void ScDocument::SetXMLFromWrapper( BOOL bVal )
     bXMLFromWrapper = bVal;
 }
 
-vos::ORef<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
+rtl::Reference<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
 {
 	return xForbiddenCharacters;
 }
 
-void ScDocument::SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew )
+void ScDocument::SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew )
 {
 	xForbiddenCharacters = xNew;
 	if ( pEditEngine )
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index a0e9026..38f64d8 100644
--- sc/source/core/data/document.cxx
+++ sc/source/core/data/document.cxx
@@ -1528,7 +1528,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
 BOOL ScDocument::IsClipboardSource() const
 {
 	ScDocument* pClipDoc = SC_MOD()->GetClipDoc();
-	return pClipDoc && pClipDoc->xPoolHelper.isValid() &&
+	return pClipDoc && pClipDoc->xPoolHelper.is() &&
 			xPoolHelper->GetDocPool() == pClipDoc->xPoolHelper->GetDocPool();
 }
 
@@ -4336,7 +4336,7 @@ BOOL ScDocument::LoadPool( SvStream& rStream, BOOL /* bLoadRefCounts */ )
 
 	ScPatternAttr::pDoc = this;
 
-	if ( xPoolHelper.isValid() && !bIsClip )
+	if ( xPoolHelper.is() && !bIsClip )
 		xPoolHelper->SourceDocumentGone();
 
 	xPoolHelper = new ScPoolHelper( this );
diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx
index 70d1230..fa4dc43 100644
--- sc/source/core/inc/poolhelp.hxx
+++ sc/source/core/inc/poolhelp.hxx
@@ -36,8 +36,8 @@
 #ifndef SC_POOLHELP_HXX
 #define SC_POOLHELP_HXX
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 #ifndef _LINK_HXX
@@ -51,7 +51,7 @@ class SvNumberFormatter;
 class SfxItemPool;
 
 
-class ScPoolHelper : public vos::OReference
+class ScPoolHelper : public salhelper::SimpleReferenceObject
 {
 private:
 	ScDocumentPool*		pDocPool;
diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx
index 8c2d933..28c6650 100644
--- sc/source/filter/inc/filt_pch.hxx
+++ sc/source/filter/inc/filt_pch.hxx
@@ -239,7 +239,7 @@
 #include <vcl/svapp.hxx>
 #include <vos/thread.hxx>
 #include <vos/runnable.hxx>
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 #include <vcl/apptypes.hxx>
 #include <svx/editdata.hxx>
 #include <svx/editeng.hxx>
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index 6129af3..999ca8d 100644
--- sc/source/filter/xml/XMLDDELinksContext.cxx
+++ sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -73,6 +73,8 @@
 using namespace com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScXMLDDELinksContext::ScXMLDDELinksContext( ScXMLImport& rImport,
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
index 503816d..e10a542 100644
--- sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
+++ sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
@@ -57,7 +57,6 @@
 
 #include "unonames.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -65,6 +64,7 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace xmloff::token;
 
+using rtl::OUString;
 
 TYPEINIT1( XMLTableHeaderFooterContext, SvXMLImportContext );
 
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.cxx b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
index 1c36358..acfdfbe 100644
--- sc/source/filter/xml/XMLTableMasterPageExport.cxx
+++ sc/source/filter/xml/XMLTableMasterPageExport.cxx
@@ -66,7 +66,6 @@
 #include "unonames.hxx"
 #include "xmlexprt.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 104ab3c..e4b28f8 100644
--- sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -88,6 +88,8 @@
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 XMLTableShapeImportHelper::XMLTableShapeImportHelper(
 		ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper ) :
 	XMLShapeImportHelper(rImp, rImp.GetModel(), pImpMapper ),
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index f48d9cf..33e4af2 100644
--- sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -89,6 +89,8 @@
 using namespace com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //-----------------------------------------------------------------------------
 
 class ScXMLChangeInfoContext : public SvXMLImportContext
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 0196454..d552f6c 100644
--- sc/source/filter/xml/xmlcelli.cxx
+++ sc/source/filter/xml/xmlcelli.cxx
@@ -155,6 +155,8 @@
 using namespace com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScMyImportAnnotation::~ScMyImportAnnotation()
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 21786f7..377df32 100644
--- sc/source/filter/xml/xmldpimp.cxx
+++ sc/source/filter/xml/xmldpimp.cxx
@@ -99,6 +99,8 @@
 using namespace com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScXMLDataPilotTablesContext::ScXMLDataPilotTablesContext( ScXMLImport& rImport,
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 8d1268a..9cdc751 100644
--- sc/source/filter/xml/xmlimprt.cxx
+++ sc/source/filter/xml/xmlimprt.cxx
@@ -178,6 +178,8 @@
 using namespace com::sun::star;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 OUString SAL_CALL ScXMLImport_getImplementationName() throw()
 {
 	return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Calc.XMLOasisImporter" ) );
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index ef7e698..6ded970 100644
--- sc/source/filter/xml/xmlimprt.hxx
+++ sc/source/filter/xml/xmlimprt.hxx
@@ -92,8 +92,6 @@ class ScRangeList;
 class ScMyStyleNumberFormats;
 class XMLNumberFormatAttributesExportHelper;
 
-using namespace rtl;
-
 enum ScXMLShapeHlinkTokens // #i66550 HLINK_FOR_SHAPES
 {
 	XML_TOK_SHAPE_ATTR_HREF
diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx
index 2375d11..943634a 100644
--- sc/source/filter/xml/xmlsceni.cxx
+++ sc/source/filter/xml/xmlsceni.cxx
@@ -65,6 +65,8 @@
 using namespace com::sun::star;
 using namespace xmloff::token;
 
+using rtl::OUString;
+
 //------------------------------------------------------------------
 
 ScXMLTableScenarioContext::ScXMLTableScenarioContext(
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 441227a..6d35340 100644
--- sc/source/filter/xml/xmlstyle.cxx
+++ sc/source/filter/xml/xmlstyle.cxx
@@ -115,6 +115,8 @@
 using namespace com::sun::star;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 #define MAP(name,prefix,token,type,context)  { name, sizeof(name)-1, prefix, token, type, context }
 #define MAP_END()	{ NULL, 0, 0, XML_TOKEN_INVALID, 0 }
 
diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx
index 0f327bf..6a5c627 100644
--- sc/source/filter/xml/xmlstyle.hxx
+++ sc/source/filter/xml/xmlstyle.hxx
@@ -61,8 +61,6 @@
 #include <xmloff/contextid.hxx>
 #endif
 
-using namespace rtl;
-
 extern const XMLPropertyMapEntry aXMLScCellStylesProperties[];
 extern const XMLPropertyMapEntry aXMLScColumnStylesProperties[];
 extern const XMLPropertyMapEntry aXMLScRowStylesProperties[];
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index a267ba9..dd2bd41 100644
--- sc/source/filter/xml/xmlstyli.cxx
+++ sc/source/filter/xml/xmlstyli.cxx
@@ -107,7 +107,6 @@
 #define XML_LINE_TLBR 0
 #define XML_LINE_BLTR 1
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -118,6 +117,9 @@ using namespace ::com::sun::star::container;
 using namespace xmloff::token;
 //using namespace ::com::sun::star::text;
 
+using rtl::OUString;
+using com::sun::star::uno::Reference;
+
 ScXMLCellImportPropertyMapper::ScXMLCellImportPropertyMapper(
 		const UniReference< XMLPropertySetMapper >& rMapper,
         SvXMLImport& rImportP) :
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 6465fd0..3e41ecf 100644
--- sc/source/filter/xml/xmlwrap.cxx
+++ sc/source/filter/xml/xmlwrap.cxx
@@ -150,6 +150,8 @@
 
 using namespace com::sun::star;
 
+using rtl::OUString;
+
 // -----------------------------------------------------------------------
 
 ScXMLImportWrapper::ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const uno::Reference < embed::XStorage >& xStor ) :
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index cfb2899..2871b76 100644
--- sc/source/ui/docshell/docsh2.cxx
+++ sc/source/ui/docshell/docsh2.cxx
@@ -165,19 +165,19 @@ void ScDocShell::InitItems()
         PutItem( SvxColorTableItem( XColorTable::GetStdColorTable(), SID_COLOR_TABLE ) );
 	}
 
-	if ( !aDocument.GetForbiddenCharacters().isValid() ||
+	if ( !aDocument.GetForbiddenCharacters().is() ||
 			!aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning() )
 	{
 		//	get settings from SvxAsianConfig
 		SvxAsianConfig aAsian( sal_False );
 
-		if ( !aDocument.GetForbiddenCharacters().isValid() )
+		if ( !aDocument.GetForbiddenCharacters().is() )
 		{
 			// set forbidden characters if necessary
 			uno::Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
 			if (aLocales.getLength())
 			{
-				vos::ORef<SvxForbiddenCharactersTable> xForbiddenTable =
+				rtl::Reference<SvxForbiddenCharactersTable> xForbiddenTable =
 						new SvxForbiddenCharactersTable( aDocument.GetServiceManager() );
 
 				const lang::Locale* pLocales = aLocales.getConstArray();
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index 70b26f4..cf13212 100644
--- sc/source/ui/unoobj/forbiuno.cxx
+++ sc/source/ui/unoobj/forbiuno.cxx
@@ -47,14 +47,14 @@ using namespace ::com::sun::star;
 
 //------------------------------------------------------------------------
 
-vos::ORef<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* pDocSh )
+rtl::Reference<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* pDocSh )
 {
-	vos::ORef<SvxForbiddenCharactersTable> xRet;
+	rtl::Reference<SvxForbiddenCharactersTable> xRet;
 	if ( pDocSh )
 	{
 		ScDocument* pDoc = pDocSh->GetDocument();
 		xRet = pDoc->GetForbiddenCharacters();
-		if ( !xRet.isValid() )
+		if ( !xRet.is() )
 		{
 			//	create an empty SvxForbiddenCharactersTable for SvxUnoForbiddenCharsTable,
 			//	so changes can be stored.
diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
index b84732a..8289f87 100644
--- sc/util/makefile.mk
+++ sc/util/makefile.mk
@@ -97,6 +97,7 @@ SHL1STDLIBS=       \
 	$(TKLIB)		\
 	$(VOSLIB)		\
 	$(SALLIB)		\
+	$(SALHELPERLIB)		\
 	$(TOOLSLIB)	\
 	$(I18NUTILLIB) \
 	$(I18NISOLANGLIB) \
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index b07b8ae..fdc9214 100644
--- sd/source/core/EffectMigration.cxx
+++ sd/source/core/EffectMigration.cxx
@@ -80,7 +80,6 @@
 #include <anminfo.hxx>
 #endif
 
-using namespace ::vos;
 using namespace ::sd;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::animations;
diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx
index 480c017..4408614 100644
--- sd/source/core/sdpage_animations.cxx
+++ sd/source/core/sdpage_animations.cxx
@@ -87,12 +87,12 @@
 #endif
 
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::sd;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::animations;
 using namespace ::com::sun::star::presentation;
 
+using rtl::OUString;
 using ::com::sun::star::drawing::XShape;
 
 /** returns a helper class to manipulate effects inside the main sequence */
diff --git a/sd/source/ui/unoidl/unogsfm.cxx b/sd/source/ui/unoidl/unogsfm.cxx
index 0c55c68..7105973 100644
--- sd/source/ui/unoidl/unogsfm.cxx
+++ sd/source/ui/unoidl/unogsfm.cxx
@@ -76,7 +76,7 @@
 //#include "docshell.hxx"
 //#endif
 
-using namespace ::rtl;
+using rtl::OUString;
 using namespace ::vos;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index 26ab788..1a9f94f 100644
--- sd/util/makefile.mk
+++ sd/util/makefile.mk
@@ -91,6 +91,7 @@ SHL1STDLIBS+= \
 	$(VOSLIB) \
 	$(CANVASLIB) \
 	$(SALLIB) \
+	$(SALHELPERLIB) \
 	$(AVMEDIALIB)
 
 SHL1LIBS= $(LIB3TARGET) $(LIB5TARGET) $(LIB6TARGET)
diff --git a/so3/source/persist/transprt.cxx b/so3/source/persist/transprt.cxx
index 90c43e7..afc3f84 100644
--- so3/source/persist/transprt.cxx
+++ so3/source/persist/transprt.cxx
@@ -130,8 +130,8 @@
 #ifndef _VOS_MUTEX_HXX_
 #include <vos/mutex.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _SOLAR_H
@@ -1322,7 +1322,7 @@ protected:
 	String                               m_aUrl;
 	SvBindingTransportContext           &m_rCtx;
 	SvBindingTransportCallback          *m_pCallback;
-	vos::ORef<UcbTransportDataSink_Impl> m_xSink;
+	rtl::Reference<UcbTransportDataSink_Impl> m_xSink;
 	SvLockBytesRef                       m_xLockBytes;
 	Reference<XContent>                  m_xContent;
 	OUString                             m_aContentType;
@@ -1463,10 +1463,10 @@ IMPL_LINK( UcbTransport_Impl, ExecuteCallback, void*, pVoid )
         if ( bAborted || bException  )
         {
             // download aborted
-            if ( m_xSink.isValid() )
+            if ( m_xSink.is() )
             {
                 m_xSink->terminate();
-                m_xSink.unbind();
+                m_xSink.clear();
             }
 
             if ( getCallback_Impl(pCB) )
@@ -1480,12 +1480,12 @@ IMPL_LINK( UcbTransport_Impl, ExecuteCallback, void*, pVoid )
                 m_aContentType = getContentType_Impl(xProcessor);
             }
 
-            if ( m_xSink.isValid() )
+            if ( m_xSink.is() )
             {
                 m_xSink->terminate();
                 if( !m_xLockBytes.Is() )
                     m_xLockBytes = m_xSink->getLockBytes();
-                m_xSink.unbind();
+                m_xSink.clear();
             }
 
             if ( !m_bMimeAvail )
@@ -1553,7 +1553,7 @@ void UcbTransport_Impl::start (void)
 		aArgument.Priority = m_rCtx.GetPriority();
 
 		m_xSink = new UcbTransportDataSink_Impl();
-		aArgument.Sink = SAL_STATIC_CAST(OWeakObject*, m_xSink.getBodyPtr());
+		aArgument.Sink = SAL_STATIC_CAST(OWeakObject*, m_xSink.get());
 
 		if (m_rCtx.GetBindMode() & SVBIND_NEWESTVERSION)
             m_aCommand.Name = OUString::createFromAscii ("synchronize");
@@ -1703,7 +1703,7 @@ void SAL_CALL UcbTransport_Impl::push ( const Any &rStatus) throw(RuntimeExcepti
 		}
 		if (!m_xLockBytes.Is())
 		{
-			if (m_xSink.isValid())
+			if (m_xSink.is())
 				m_xLockBytes = m_xSink->getLockBytes();
 		}
 		if (m_bMimeAvail && m_xLockBytes.Is() && getCallback_Impl (pCB))
@@ -1731,7 +1731,7 @@ void SAL_CALL UcbTransport_Impl::update ( const Any &rStatus) throw(RuntimeExcep
 			}
 			if (!m_xLockBytes.Is())
 			{
-				if (m_xSink.isValid())
+				if (m_xSink.is())
 					m_xLockBytes = m_xSink->getLockBytes();
 			}
 			if (m_bMimeAvail && m_xLockBytes.Is() && getCallback_Impl (pCB))
@@ -1783,7 +1783,7 @@ void SAL_CALL UcbTransport_Impl::propertiesChange ( const Sequence<PropertyChang
 		}
 		if (evt.PropertyName == OUString::createFromAscii ("DocumentBody"))
 		{
-			if (m_xSink.isValid())
+			if (m_xSink.is())
 				m_xLockBytes = m_xSink->getLockBytes();
 			continue;
 		}
@@ -1980,7 +1980,7 @@ void UcbHTTPTransport_Impl::start (void)
 		OpenCommandArgument2 aArgument;
 		aArgument.Mode = OpenMode::DOCUMENT;
 		aArgument.Priority = m_rCtx.GetPriority();
-		aArgument.Sink = SAL_STATIC_CAST(OWeakObject*, m_xSink.getBodyPtr());
+		aArgument.Sink = SAL_STATIC_CAST(OWeakObject*, m_xSink.get());
         m_aCommand.Argument <<= aArgument;
 
         m_nCommandId = xProcessor->createCommandIdentifier();
@@ -2033,7 +2033,7 @@ void UcbHTTPTransport_Impl::start (void)
 
 			PostCommandArgument aArgument;
 			aArgument.Source = new UcbTransportInputStream_Impl(xLockBytes);
-            aArgument.Sink = static_cast< OWeakObject* >(m_xSink.getBodyPtr());
+            aArgument.Sink = static_cast< OWeakObject* >(m_xSink.get());
             m_aCommand.Argument <<= aArgument;
 		}
 
@@ -2221,7 +2221,7 @@ void UcbHTTPTransport_Impl::handleError_Impl (
 class UcbTransport : public SvBindingTransport
 {
 public:
-	UcbTransport (const vos::ORef<UcbTransport_Impl> &rxImpl);
+	UcbTransport (const rtl::Reference<UcbTransport_Impl> &rxImpl);
 	virtual ~UcbTransport (void);
 
 	/** SvBindingTransport.
@@ -2232,7 +2232,7 @@ public:
 private:
 	/** Representation.
 	 */
-	vos::ORef<UcbTransport_Impl> m_xImpl;
+	rtl::Reference<UcbTransport_Impl> m_xImpl;
 
 	/** Not implemented.
 	 */
@@ -2242,7 +2242,7 @@ private:
 /*
  * UcbTransport.
  */
-UcbTransport::UcbTransport (const vos::ORef<UcbTransport_Impl> &rxImpl)
+UcbTransport::UcbTransport (const rtl::Reference<UcbTransport_Impl> &rxImpl)
 	: m_xImpl (rxImpl)
 {
 }
@@ -2259,7 +2259,7 @@ UcbTransport::~UcbTransport (void)
  */
 void UcbTransport::Start (void)
 {
-	if (m_xImpl.isValid())
+	if (m_xImpl.is())
 		m_xImpl->start();
 }
 
@@ -2268,7 +2268,7 @@ void UcbTransport::Start (void)
  */
 void UcbTransport::Abort (void)
 {
-	if (m_xImpl.isValid())
+	if (m_xImpl.is())
 		m_xImpl->abort();
 }
 
@@ -2318,7 +2318,7 @@ SvBindingTransport* CntTransportFactory::CreateTransport (
 		(eProto == INET_PROT_FILE ) ||
 		(eProto == INET_PROT_FTP  )    )
 	{
-		vos::ORef<UcbTransport_Impl> xImpl;
+		rtl::Reference<UcbTransport_Impl> xImpl;
 		if ((eProto == INET_PROT_HTTPS) || (eProto == INET_PROT_HTTP))
 			xImpl = new UcbHTTPTransport_Impl (rUrl, rCtx, pCB);
 		else if ((eProto == INET_PROT_FTP) && BAPP()->ShouldUseFtpProxy (rUrl))
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 341dc8f..100aa89 100644
--- starmath/inc/symbol.hxx
+++ starmath/inc/symbol.hxx
@@ -35,8 +35,8 @@
 #ifndef SYMBOL_HXX
 #define SYMBOL_HXX
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _FONT_HXX //autogen
 #include <vcl/font.hxx>
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index ffa3902..212693c 100644
--- starmath/source/accessibility.cxx
+++ starmath/source/accessibility.cxx
@@ -129,7 +129,7 @@
 #include <view.hxx>
 #endif
 
-using namespace rtl;
+using rtl::OUString;
 using namespace com::sun::star;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::uno;
diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx
index 4bc5bb5..45dbedf 100644
--- starmath/source/math_pch.cxx
+++ starmath/source/math_pch.cxx
@@ -126,7 +126,7 @@
 #include <usr/uno.hxx>
 #include <usr/xiface.hxx>
 #include <usr/ustring.hxx>
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 #include <vos/types.hxx>
 #include <osl/types.h>
 #include <osl/interlck.h>
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 3646b37..1700a69 100644
--- starmath/source/unomodel.cxx
+++ starmath/source/unomodel.cxx
@@ -118,7 +118,6 @@
 #include <smdll.hxx>
 
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::std;
 using namespace ::comphelper;
@@ -130,6 +129,8 @@ using namespace ::com::sun::star::formula;
 using namespace ::com::sun::star::view;
 using namespace ::com::sun::star::script;
 
+using rtl::OUString;
+
 #define TWIP_TO_MM100(TWIP) 	((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
 #define MM100_TO_TWIP(MM100)	((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
 
diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx
index 785be00..2e06f3e 100644
--- svtools/inc/pch/precompiled_svtools.hxx
+++ svtools/inc/pch/precompiled_svtools.hxx
@@ -431,8 +431,8 @@
 #include <vcl/unohelp.hxx>
 
 #include <vos/mutex.hxx>
-#include <vos/ref.hxx>
-#include <vos/refernce.hxx>
+#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 #include <vos/security.hxx>
 #include <vos/thread.hxx>
 #include <vos/timer.hxx>
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 1007421..9d786bd 100644
--- svtools/source/misc/templatefoldercache.cxx
+++ svtools/source/misc/templatefoldercache.cxx
@@ -69,11 +69,11 @@
 #ifndef _UCBHELPER_CONTENT_HXX
 #include <ucbhelper/content.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _URLOBJ_HXX
 #include <tools/urlobj.hxx>
@@ -156,13 +156,13 @@ namespace svt
 	//= TemplateContent
 	//=====================================================================
 	struct TemplateContent;
-	typedef	::std::vector< ::vos::ORef< TemplateContent > >	TemplateFolderContent;
+	typedef	::std::vector< ::rtl::Reference< TemplateContent > >	TemplateFolderContent;
         typedef TemplateFolderContent::const_iterator           ConstFolderIterator;
         typedef TemplateFolderContent::iterator                 FolderIterator;
 
 	/** a struct describing one content in one of the template dirs (or at least it's relevant aspects)
 	*/
-	struct TemplateContent : public ::vos::OReference
+	struct TemplateContent : public ::salhelper::SimpleReferenceObject
 	{
 	public:
 
@@ -201,7 +201,7 @@ namespace svt
 		inline TemplateFolderContent::size_type
 										size() const	{ return m_aSubContents.size(); }
 
-		inline void						push_back( const ::vos::ORef< TemplateContent >& _rxNewElement )
+		inline void						push_back( const ::rtl::Reference< TemplateContent >& _rxNewElement )
 														{ m_aSubContents.push_back( _rxNewElement ); }
 	};
 
@@ -247,12 +247,12 @@ namespace svt
 	//---------------------------------------------------------------------
 	/// compares two TemplateContent by URL
 	struct TemplateContentURLLess
-		:public ::std::binary_function	<	::vos::ORef< TemplateContent >
-										,	::vos::ORef< TemplateContent >
+		:public ::std::binary_function	<	::rtl::Reference< TemplateContent >
+										,	::rtl::Reference< TemplateContent >
 										,	bool
 										>
 	{
-		bool operator() ( const ::vos::ORef< TemplateContent >& _rxLHS, const ::vos::ORef< TemplateContent >& _rxRHS ) const
+		bool operator() ( const ::rtl::Reference< TemplateContent >& _rxLHS, const ::rtl::Reference< TemplateContent >& _rxRHS ) const
 		{
 			return	_rxLHS->getURL() < _rxRHS->getURL()
 				?	true
@@ -262,7 +262,7 @@ namespace svt
 
 	//---------------------------------------------------------------------
 	/// sorts the sib contents of a TemplateFolderContent
-	struct SubContentSort : public ::std::unary_function< ::vos::ORef< TemplateContent >, void >
+	struct SubContentSort : public ::std::unary_function< ::rtl::Reference< TemplateContent >, void >
 	{
 		void operator() ( TemplateFolderContent& _rFolder ) const
 		{
@@ -281,9 +281,9 @@ namespace svt
 			);
 		}
 
-		void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const
+		void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
 		{
-			if ( _rxContent.isValid() && _rxContent->size() )
+			if ( _rxContent.is() && _rxContent->size() )
 			{
 				operator()( _rxContent->getSubContents() );
 			}
@@ -293,15 +293,15 @@ namespace svt
 	/** does a deep compare of two template contents
 	*/
 	struct TemplateContentEqual
-		:public ::std::binary_function	<	::vos::ORef< TemplateContent >
-										,	::vos::ORef< TemplateContent >
+		:public ::std::binary_function	<	::rtl::Reference< TemplateContent >
+										,	::rtl::Reference< TemplateContent >
 										,	bool
 										>
 	{
 		//.................................................................
-		bool operator() (const ::vos::ORef< TemplateContent >& _rLHS, const ::vos::ORef< TemplateContent >& _rRHS )
+		bool operator() (const ::rtl::Reference< TemplateContent >& _rLHS, const ::rtl::Reference< TemplateContent >& _rRHS )
 		{
-			if ( !_rLHS.isValid() || !_rRHS.isValid() )
+			if ( !_rLHS.is() || !_rRHS.is() )
 			{
 				DBG_ERROR( "TemplateContentEqual::operator(): invalid contents!" );
 				return true;
@@ -360,12 +360,12 @@ namespace svt
 	//---------------------------------------------------------------------
 	/// functor which stores the local name of a TemplateContent
 	struct StoreLocalContentName
-			:public ::std::unary_function< ::vos::ORef< TemplateContent >, void >
+			:public ::std::unary_function< ::rtl::Reference< TemplateContent >, void >
 			,public StoreString
 	{
 		StoreLocalContentName( SvStream& _rStorage ) : StoreString( _rStorage ) { }
 
-		void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const
+		void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
 		{
 			DBG_ERRORFILE( "This method must not be used, the whole URL must be stored!" );
 
@@ -376,7 +376,7 @@ namespace svt
 
 	//---------------------------------------------------------------------
 	struct StoreContentURL
-			:public ::std::unary_function< ::vos::ORef< TemplateContent >, void >
+			:public ::std::unary_function< ::rtl::Reference< TemplateContent >, void >
 			,public StoreString
 	{
         uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs;
@@ -387,7 +387,7 @@ namespace svt
                                 xOfficeInstDirs )
         : StoreString( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { }
 
-		void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const
+		void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
 		{
 			// use the base class operator with the local name of the content
             String sURL = _rxContent->getURL();
@@ -401,7 +401,7 @@ namespace svt
 	//---------------------------------------------------------------------
 	/// functor which stores the complete content of a TemplateContent
 	struct StoreFolderContent
-			:public ::std::unary_function< ::vos::ORef< TemplateContent >, void >
+			:public ::std::unary_function< ::rtl::Reference< TemplateContent >, void >
 			,public StorageHelper
 	{
         uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs;
@@ -437,9 +437,9 @@ namespace svt
 		}
 
 		//.................................................................
-		void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const
+		void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
 		{
-			if ( _rxContent.isValid() )
+			if ( _rxContent.is() )
 			{
 				operator()( *_rxContent );
 			}
@@ -449,7 +449,7 @@ namespace svt
 	//---------------------------------------------------------------------
 	/// functor which reads a complete TemplateContent instance
 	struct ReadFolderContent
-			:public ::std::unary_function< ::vos::ORef< TemplateContent >, void >
+			:public ::std::unary_function< ::rtl::Reference< TemplateContent >, void >
 			,public StorageHelper
 	{
         uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs;
@@ -494,9 +494,9 @@ namespace svt
 		}
 
 		//.................................................................
-		void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const
+		void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
 		{
-			if ( _rxContent.isValid() )
+			if ( _rxContent.is() )
 			{
 				operator()( *_rxContent );
 			}
@@ -541,7 +541,7 @@ namespace svt
 
 		String		implParseSmart( const String& _rPath );
 
-		sal_Bool	implReadFolder( const ::vos::ORef< TemplateContent >& _rxRoot );
+		sal_Bool	implReadFolder( const ::rtl::Reference< TemplateContent >& _rxRoot );
 
 		static	String		getCacheFileName();
 		static	sal_Int32	getMagicNumber();
@@ -668,7 +668,7 @@ namespace svt
 	}
 
 	//---------------------------------------------------------------------
-	sal_Bool TemplateFolderCacheImpl::implReadFolder( const ::vos::ORef< TemplateContent >& _rxRoot )
+	sal_Bool TemplateFolderCacheImpl::implReadFolder( const ::rtl::Reference< TemplateContent >& _rxRoot )
 	{
 		try
 		{
@@ -710,7 +710,7 @@ namespace svt
 					INetURLObject aSubContentURL( xContentAccess->queryContentIdentifierString() );
 
 					// a new content instance
-					::vos::ORef< TemplateContent > xChild = new TemplateContent( aSubContentURL );
+					::rtl::Reference< TemplateContent > xChild = new TemplateContent( aSubContentURL );
 
 					// the modified date
 					xChild->setModDate( xRow->getTimestamp( 2 ) );	// date modified
diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk
index 85f9b77..8ed592e 100644
--- svtools/util/makefile.mk
+++ svtools/util/makefile.mk
@@ -153,6 +153,7 @@ SHL1STDLIBS+= \
 		$(CPPULIB)			\
 		$(VOSLIB)			\
 		$(SALLIB)			\
+		$(SALHELPERLIB)			\
 		$(ICUUCLIB)		\
 		$(JVMFWKLIB)
 
diff --git a/svx/inc/UnoForbiddenCharsTable.hxx b/svx/inc/UnoForbiddenCharsTable.hxx
index 92934d9..c92c99d 100644
--- svx/inc/UnoForbiddenCharsTable.hxx
+++ svx/inc/UnoForbiddenCharsTable.hxx
@@ -43,8 +43,8 @@
 #include <com/sun/star/linguistic2/XSupportedLocales.hpp>
 #endif
 
-#ifndef _VOS_REF_HXX_ 
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #include <cppuhelper/implbase2.hxx>
@@ -63,10 +63,10 @@ protected:
 	/** this virtual function is called if the forbidden characters are changed */
 	virtual void onChange();
 
-	vos::ORef<SvxForbiddenCharactersTable> mxForbiddenChars;
+	rtl::Reference<SvxForbiddenCharactersTable> mxForbiddenChars;
 
 public:
-	SvxUnoForbiddenCharsTable(vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars);
+	SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars);
 	~SvxUnoForbiddenCharsTable();
 
 	// XForbiddenCharacters
diff --git a/svx/inc/forbiddencharacterstable.hxx b/svx/inc/forbiddencharacterstable.hxx
index bc776ed..254cbb3 100644
--- svx/inc/forbiddencharacterstable.hxx
+++ svx/inc/forbiddencharacterstable.hxx
@@ -40,7 +40,7 @@
 #include <tools/table.hxx>
 #endif
 
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
 
 #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
 #include <com/sun/star/uno/Reference.hxx>
@@ -69,7 +69,7 @@ struct ForbiddenCharactersInfo
 
 DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* )
 
-class SVX_DLLPUBLIC SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public vos::OReference
+class SVX_DLLPUBLIC SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public salhelper::SimpleReferenceObject
 {
 private:	
 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index df20422..69bd6d2 100644
--- svx/inc/pch/precompiled_svx.hxx
+++ svx/inc/pch/precompiled_svx.hxx
@@ -953,8 +953,8 @@
 #include "vcl/wall.hxx"
 #include "vcl/wintypes.hxx"
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
 #include "vos/thread.hxx"
 #include "vos/xception.hxx"
 #include "xmloff/DashStyle.hxx"
diff --git a/svx/inc/svx/editeng.hxx b/svx/inc/svx/editeng.hxx
index 045f699..6610fd7 100644
--- svx/inc/svx/editeng.hxx
+++ svx/inc/svx/editeng.hxx
@@ -69,7 +69,7 @@ class SvxLRSpaceItem;
 class SvKeyValueIterator;
 class SvxForbiddenCharactersTable;
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #include <vector>
 
 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
@@ -376,8 +376,8 @@ public:
 	void			SetHyphenator( ::com::sun::star::uno::Reference<
 							::com::sun::star::linguistic2::XHyphenator >& xHyph );
 
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
 
 	void 			SetDefaultLanguage( LanguageType eLang );
 	LanguageType	GetDefaultLanguage() const;
diff --git a/svx/inc/svx/outliner.hxx b/svx/inc/svx/outliner.hxx
index 0c0010c..dcc0a54 100644
--- svx/inc/svx/outliner.hxx
+++ svx/inc/svx/outliner.hxx
@@ -109,7 +109,7 @@ class SvxForbiddenCharactersTable;
 #include <com/sun/star/uno/Reference.h>
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 #include <svx/svxfont.hxx>
 
 namespace com { namespace sun { namespace star { namespace linguistic2 {
@@ -878,8 +878,8 @@ public:
 	void			SetHyphenator( ::com::sun::star::uno::Reference<
 						::com::sun::star::linguistic2::XHyphenator >& xHyph );
 
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
 
 	// Depricated
 	void 			SetDefaultLanguage( LanguageType eLang );
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 08fa400..cecf66d 100644
--- svx/inc/svx/svdmodel.hxx
+++ svx/inc/svx/svdmodel.hxx
@@ -89,7 +89,7 @@ class OutputDevice;
 #include "svx/svxdllapi.h"
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
 #if defined(UNX) || defined(WIN) || defined(WNT)
 #define DEGREE_CHAR ((sal_Unicode)176)   /* 0xB0 = Ansi */
@@ -726,8 +726,8 @@ public:
 	BOOL isLocked() const { return (BOOL)mbModelLocked; }
 	void setLock( BOOL bLock );
 
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable() const;
 
 	void SetCharCompressType( UINT16 nType );
 	UINT16 GetCharCompressType() const { return mnCharCompressType; }
diff --git a/svx/inc/unolingu.hxx b/svx/inc/unolingu.hxx
index c98c5dd..5f65362 100644
--- svx/inc/unolingu.hxx
+++ svx/inc/unolingu.hxx
@@ -42,8 +42,8 @@
 #ifndef _STRING_HXX
 #include <tools/string.hxx>
 #endif
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 
 #ifndef _COM_SUN_STAR_UTIL_LANGUAGE_HPP_
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
old mode 100755
new mode 100644
index e6aee0a..c424e25
--- svx/source/accessibility/AccessibleShape.cxx
+++ svx/source/accessibility/AccessibleShape.cxx
@@ -111,11 +111,12 @@
 #include <svx/svdview.hxx>
 #include "AccessibleEmptyEditSource.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace	::com::sun::star::accessibility;
 using ::com::sun::star::uno::Reference;
 
+using rtl::OUString;
+
 namespace accessibility {
 
 //=====  internal  ============================================================
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index cfabc09..0b774cf 100644
--- svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -130,7 +130,6 @@
 using namespace ::vos;
 using namespace ::cppu;
 using namespace ::osl;
-using namespace	::rtl;
 using namespace ::accessibility;
 using namespace	::com::sun::star;
 using namespace	::com::sun::star::uno;
@@ -138,6 +137,8 @@ using namespace	::com::sun::star::drawing;
 using namespace	::com::sun::star::lang;
 using namespace	::com::sun::star::accessibility;
 
+using rtl::OUString;
+
 //=====  internal  ============================================================
 
 /** initialize this component and set default values */
diff --git a/svx/source/dialog/hltpbase.cxx b/svx/source/dialog/hltpbase.cxx
index d015cfa..b5a6110 100644
--- svx/source/dialog/hltpbase.cxx
+++ svx/source/dialog/hltpbase.cxx
@@ -255,7 +255,7 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem )
 						if ( aRow.Is() )
 						{
 							aAddress += pDBMgr->
-								ImportDBField( (USHORT)nPos, &aDBDef, aRow.getBodyPtr() );
+								ImportDBField( (USHORT)nPos, &aDBDef, aRow.get() );
 							aAddress += ',';
 						}
 						else
diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx
index 4b7c134..7643ec9 100644
--- svx/source/editeng/editeng.cxx
+++ svx/source/editeng/editeng.cxx
@@ -128,7 +128,8 @@
 
 // Spaeter -> TOOLS\STRING.H (fuer Grep: WS_TARGET)
 
-//using namespace ::rtl;
+
+using rtl::OUString;
 //using namespace ::utl;
 using namespace ::com::sun::star;
 //using namespace ::com::sun::star::util;
@@ -2066,13 +2067,13 @@ void EditEngine::SetHyphenator( Reference< XHyphenator > & xHyph )
 	pImpEditEngine->SetHyphenator( xHyph );
 }
 
-void EditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 {
 	DBG_CHKTHIS( EditEngine, 0 );
 	pImpEditEngine->SetForbiddenCharsTable( xForbiddenChars );
 }
 
-vos::ORef<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const
+rtl::Reference<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const
 {
 	DBG_CHKTHIS( EditEngine, 0 );
 	return pImpEditEngine->GetForbiddenCharsTable( FALSE );
diff --git a/svx/source/editeng/editview.cxx b/svx/source/editeng/editview.cxx
index 5023e75..68920b6 100644
--- svx/source/editeng/editview.cxx
+++ svx/source/editeng/editview.cxx
@@ -91,12 +91,13 @@
 #endif
 
 
-using namespace rtl;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::linguistic2;
 
+using rtl::OUString;
+
 
 DBG_NAME( EditView )
 
diff --git a/svx/source/editeng/edtspell.cxx b/svx/source/editeng/edtspell.cxx
index ddd8e3f..00fe1eb 100644
--- svx/source/editeng/edtspell.cxx
+++ svx/source/editeng/edtspell.cxx
@@ -56,7 +56,6 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
 
-using namespace rtl;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::linguistic2;
diff --git a/svx/source/editeng/eerdll.cxx b/svx/source/editeng/eerdll.cxx
index d34a54b..1ae5d62 100644
--- svx/source/editeng/eerdll.cxx
+++ svx/source/editeng/eerdll.cxx
@@ -208,9 +208,9 @@ SfxPoolItem** GlobalEditData::GetDefItems()
 	return ppDefItems;
 }
 
-vos::ORef<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable()
+rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable()
 {
-	if ( !xForbiddenCharsTable.isValid() )
+	if ( !xForbiddenCharsTable.is() )
 	{
 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
 		xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF );
diff --git a/svx/source/editeng/eerdll2.hxx b/svx/source/editeng/eerdll2.hxx
index 2e5fa5a..db8a76a 100644
--- svx/source/editeng/eerdll2.hxx
+++ svx/source/editeng/eerdll2.hxx
@@ -41,7 +41,7 @@
 #endif
 
 #include <forbiddencharacterstable.hxx>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
 class SfxPoolItem;
 
@@ -53,7 +53,7 @@ private:
 	SfxPoolItem** 	ppDefItems;
 	OutputDevice*	pStdRefDevice;
 
-	vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
+	rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
 
 public:
 					GlobalEditData();
@@ -62,8 +62,8 @@ public:
 	SfxPoolItem**	GetDefItems();
 	OutputDevice*	GetStdRefDevice();
 
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable();
-	void			SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; }
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable();
+	void			SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; }
     ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > GetLanguageGuesser();
 };
 
diff --git a/svx/source/editeng/impedit.hxx b/svx/source/editeng/impedit.hxx
index 182d50b..b747c28 100644
--- svx/source/editeng/impedit.hxx
+++ svx/source/editeng/impedit.hxx
@@ -100,7 +100,7 @@
 #include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
 #endif
 
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
 
 DBG_NAMEEX( EditView )
 DBG_NAMEEX( EditEngine )
@@ -564,7 +564,7 @@ private:
 	Link				maBeginDropHdl;
 	Link				maEndDropHdl;
 
-	vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
+	rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
 
 
 	// ================================================================
@@ -1058,8 +1058,8 @@ public:
     void                SetAddExtLeading( BOOL b );
     BOOL                IsAddExtLeading() const { return bAddExtLeading; }
 
-	vos::ORef<SvxForbiddenCharactersTable>	GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const;
-	void				SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
+	rtl::Reference<SvxForbiddenCharactersTable>	GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const;
+	void				SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
 
     // #110496#
     void				EnableVerboseTextComments( BOOL bEnable ) { bVerboseTextComments=bEnable; }
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx
index 233894c..f8e6aa7 100644
--- svx/source/editeng/impedit2.cxx
+++ svx/source/editeng/impedit2.cxx
@@ -4327,15 +4327,15 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight )
 	}
 }
 
-vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const
+rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const
 {
-	vos::ORef<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
-	if ( !xF.isValid() && bGetInternal )
+	rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
+	if ( !xF.is() && bGetInternal )
 		xF = EE_DLL()->GetGlobalData()->GetForbiddenCharsTable();
 	return xF;
 }
 
-void ImpEditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+void ImpEditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 {
 	EE_DLL()->GetGlobalData()->SetForbiddenCharsTable( xForbiddenChars );
 }
diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx
index a5c46cc..369e19a 100644
--- svx/source/editeng/impedit3.cxx
+++ svx/source/editeng/impedit3.cxx
@@ -112,12 +112,13 @@
 
 #include <comphelper/processfactory.hxx>
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::linguistic2;
 
+using rtl::OUString;
+
 SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16, 8 )
 SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
 
diff --git a/svx/source/editeng/textconv.cxx b/svx/source/editeng/textconv.cxx
index 1ca343d..a438b0d 100644
--- svx/source/editeng/textconv.cxx
+++ svx/source/editeng/textconv.cxx
@@ -63,13 +63,14 @@
 #endif
 
 
-using namespace rtl;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::linguistic2;
 
+using rtl::OUString;
+
 #define C2U(cChar) OUString::createFromAscii(cChar)
 
 //////////////////////////////////////////////////////////////////////
diff --git a/svx/source/items/xmlcnitm.cxx b/svx/source/items/xmlcnitm.cxx
index 68475b1..a96d970 100644
--- svx/source/items/xmlcnitm.cxx
+++ svx/source/items/xmlcnitm.cxx
@@ -51,12 +51,13 @@
 #endif
 #include "xmlcnitm.hxx"
 
-using namespace rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml;
 
+using rtl::OUString;
+
 // ------------------------------------------------------------------------
 
 TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem);
diff --git a/svx/source/msfilter/eschesdo.cxx b/svx/source/msfilter/eschesdo.cxx
index f3befc2..989d615 100644
--- svx/source/msfilter/eschesdo.cxx
+++ svx/source/msfilter/eschesdo.cxx
@@ -125,7 +125,6 @@
 #endif
 
 using ::rtl::OUString;
-using namespace ::vos;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
diff --git a/svx/source/outliner/outlin2.cxx b/svx/source/outliner/outlin2.cxx
index 6946b68..480ab91 100644
--- svx/source/outliner/outlin2.cxx
+++ svx/source/outliner/outlin2.cxx
@@ -542,13 +542,13 @@ Reference< XSpellChecker1 > Outliner::GetSpeller()
 	return pEditEngine->GetSpeller();
 }
 
-void Outliner::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 {
 	DBG_CHKTHIS(Outliner,0);
 	pEditEngine->SetForbiddenCharsTable( xForbiddenChars );
 }
 
-vos::ORef<SvxForbiddenCharactersTable> Outliner::GetForbiddenCharsTable() const
+rtl::Reference<SvxForbiddenCharactersTable> Outliner::GetForbiddenCharsTable() const
 {
 	DBG_CHKTHIS(Outliner,0);
 	return pEditEngine->GetForbiddenCharsTable();
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 1b75328..5922fa9 100644
--- svx/source/svdraw/svdmodel.cxx
+++ svx/source/svdraw/svdmodel.cxx
@@ -1929,12 +1929,12 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
-void SdrModel::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
+void SdrModel::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
 {
 	if( mpForbiddenCharactersTable )
 		mpForbiddenCharactersTable->release();
 
-	mpForbiddenCharactersTable = xForbiddenChars.getBodyPtr();
+	mpForbiddenCharactersTable = xForbiddenChars.get();
 
 	if( mpForbiddenCharactersTable )
 		mpForbiddenCharactersTable->acquire();
@@ -1943,7 +1943,7 @@ void SdrModel::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xF
 	ImpSetOutlinerDefaults( pHitTestOutliner );
 }
 
-vos::ORef<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const
+rtl::Reference<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const
 {
 	return mpForbiddenCharactersTable;
 }
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index f092451..833fbbe 100644
--- svx/source/tbxctrls/grafctrl.cxx
+++ svx/source/tbxctrls/grafctrl.cxx
@@ -98,13 +98,14 @@
 #include "tbxcolor.hxx"
 
 // namespaces
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 
+using rtl::OUString;
+
 #include <svx/svxdlg.hxx> //CHINA001
 // -----------
 // - Defines -
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index af70ec7..0fbefad 100644
--- svx/source/unodraw/UnoGraphicExporter.cxx
+++ svx/source/unodraw/UnoGraphicExporter.cxx
@@ -234,7 +234,6 @@
 using namespace ::comphelper;
 using namespace ::osl;
 using namespace ::vos;
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -247,6 +246,8 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::task;
 
+using rtl::OUString;
+
 #ifndef _SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
 #include <svx/sdr/contact/viewobjectcontactredirector.hxx>
 #endif
diff --git a/svx/source/unoedit/UnoForbiddenCharsTable.cxx b/svx/source/unoedit/UnoForbiddenCharsTable.cxx
index de4e9e3..2f7d9a8 100644
--- svx/source/unoedit/UnoForbiddenCharsTable.cxx
+++ svx/source/unoedit/UnoForbiddenCharsTable.cxx
@@ -64,7 +64,7 @@ using namespace ::rtl;
 using namespace ::vos;
 using namespace ::cppu;
 
-SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(ORef<SvxForbiddenCharactersTable> xForbiddenChars) :
+SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars) :
 	mxForbiddenChars( xForbiddenChars )
 {
 }
@@ -82,7 +82,7 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Loc
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		throw RuntimeException();
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -98,7 +98,7 @@ sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocal
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		return sal_False;
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -112,7 +112,7 @@ void SvxUnoForbiddenCharsTable::setForbiddenCharacters(const Locale& rLocale, co
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		throw RuntimeException();
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -126,7 +126,7 @@ void SvxUnoForbiddenCharsTable::removeForbiddenCharacters( const Locale& rLocale
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	if(!mxForbiddenChars.isValid())
+	if(!mxForbiddenChars.is())
 		throw RuntimeException();
 
 	const LanguageType eLang = SvxLocaleToLanguage( rLocale );
@@ -141,7 +141,7 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales()
 {
 	OGuard aGuard( Application::GetSolarMutex() );
 
-	const sal_Int32 nCount = mxForbiddenChars.isValid() ? mxForbiddenChars->Count() : 0;
+	const sal_Int32 nCount = mxForbiddenChars.is() ? mxForbiddenChars->Count() : 0;
 
 	Sequence< Locale > aLocales( nCount );
 	if( nCount )
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index f139aed..c8e5519 100644
--- svx/source/xml/xmlexport.cxx
+++ svx/source/xml/xmlexport.cxx
@@ -109,10 +109,11 @@
 
 #include <svx/unomodel.hxx>
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+
 sal_Bool SvxDrawingLayerExport( SdrModel* pModel, uno::Reference<io::XOutputStream> xOut, Reference< lang::XComponent > xComponent )
 {
 	return SvxDrawingLayerExport( pModel, xOut, xComponent, "com.sun.star.comp.DrawingLayer.XMLExporter" );
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
index ff6e61a..4f2f57e 100644
--- svx/util/makefile.mk
+++ svx/util/makefile.mk
@@ -133,6 +133,7 @@ SHL1STDLIBS= \
 			$(CPPULIB) \
             $(VOSLIB) \
             $(SALLIB) \
+            $(SALHELPERLIB) \
             $(ICUUCLIB)
 
 .IF "$(GUI)"=="WNT"
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 3be0d27..6d47163 100644
--- sw/inc/IDocumentSettingAccess.hxx
+++ sw/inc/IDocumentSettingAccess.hxx
@@ -39,8 +39,8 @@
 #ifndef _SOLAR_H
 #include <tools/solar.h>
 #endif
-#ifndef _VOS_REF_HXX
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CHCMPRSE_HXX
 #include <chcmprse.hxx>
@@ -153,14 +153,14 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
        @returns
        the forbidden characters table.
     */
-    virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
+    virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
 
     /** Get the forbidden character table.
 
        @returns
        the forbidden characters table.
     */
-    virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
+    virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
 
     /** Get the current link update mode.
 
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index ebf43e8..68fa6ca 100644
--- sw/inc/accmap.hxx
+++ sw/inc/accmap.hxx
@@ -39,8 +39,8 @@
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #endif
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _VOS_MUTEX_HXX_ //autogen
@@ -249,7 +249,7 @@ public:
                             const SwPageFrm* _pSelectedPageFrm,
                             const Size&      _rPrevwWinSize );
 
-	::vos::ORef < SwAccessibleContext > GetContextImpl(
+	::rtl::Reference < SwAccessibleContext > GetContextImpl(
 									 			const SwFrm *pFrm,
 												sal_Bool bCreate = sal_True );
 	::com::sun::star::uno::Reference<
@@ -257,7 +257,7 @@ public:
 									 			const SwFrm *pFrm,
 												sal_Bool bCreate = sal_True );
 
-	::vos::ORef < ::accessibility::AccessibleShape > GetContextImpl(
+	::rtl::Reference < ::accessibility::AccessibleShape > GetContextImpl(
 										const SdrObject *pObj,
 										SwAccessibleContext *pParentImpl,
 										sal_Bool bCreate = sal_True );
@@ -312,7 +312,7 @@ public:
 	void InvalidateFocus();
 
 	void SetCursorContext(
-		const ::vos::ORef < SwAccessibleContext >& rCursorContext );
+		const ::rtl::Reference < SwAccessibleContext >& rCursorContext );
 
 	// Invalidate state of whole tree. If an action is open, this call
 	// is processed when the last action ends.
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index ad85703..a8efbaf 100644
--- sw/inc/doc.hxx
+++ sw/inc/doc.hxx
@@ -138,8 +138,8 @@
 #ifndef _COM_SUN_STAR_LINGUISTIC2_XHYPHENATEDWORD_HPP_
 #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
 #endif
-#ifndef _VOS_REF_HXX
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _SVDTYPES_HXX
 #include <svx/svdtypes.hxx>
@@ -445,7 +445,7 @@ class SwDoc :
     SwChartLockController_Helper  *pChartControllerHelper;
 
 	// table of forbidden characters of this document
-	vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
+	rtl::Reference<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
 
 	// -------------------------------------------------------------------
 	// sonstige
@@ -747,8 +747,8 @@ public:
     virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
     virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const;
     virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
-    virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
-    virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
+    virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
+    virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
     virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
     virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode );
     virtual sal_uInt16 getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const;
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 74be0cb..749be09 100644
--- sw/inc/pch/precompiled_sw.hxx
+++ sw/inc/pch/precompiled_sw.hxx
@@ -969,7 +969,7 @@
 #include "vcl/wrkwin.hxx"
 
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
+#include "rtl/ref.hxx"
 
 #include "xmloff/DocumentSettingsContext.hxx"
 #include "xmloff/ProgressBarHelper.hxx"
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 6ca65bc..54eef39 100644
--- sw/source/core/access/acccell.cxx
+++ sw/source/core/access/acccell.cxx
@@ -145,7 +145,7 @@ void SwAccessibleCell::GetStates(
 	{
 		rStateSet.AddState( AccessibleStateType::SELECTED );
 		ASSERT( bIsSelected, "bSelected out of sync" );
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 }
@@ -176,7 +176,7 @@ sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
 	{
 		// remember that object as the one that has the caret. This is
 		// neccessary to notify that object if the cursor leaves it.
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 
@@ -201,14 +201,14 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
 		{
 			if( rLower.IsAccessible( GetMap()->GetShell()->IsPreView() )  )
 			{
-				::vos::ORef< SwAccessibleContext > xAccImpl(
+				::rtl::Reference< SwAccessibleContext > xAccImpl(
 					GetMap()->GetContextImpl( pLower, sal_False ) );
-				if( xAccImpl.isValid() )
+				if( xAccImpl.is() )
 				{
 					ASSERT( xAccImpl->GetFrm()->IsCellFrm(),
 						 	"table child is not a cell frame" )
 					bChanged |= static_cast< SwAccessibleCell *>( 
-							xAccImpl.getBodyPtr() )->_InvalidateMyCursorPos();
+							xAccImpl.get() )->_InvalidateMyCursorPos();
 				}
 				else
 					bChanged = sal_True; // If the context is not know we 
@@ -241,9 +241,9 @@ void SwAccessibleCell::_InvalidateCursorPos()
 		sal_Bool bChanged = _InvalidateChildrenCursorPos( pTabFrm );
 		if( bChanged )
 		{
-			::vos::ORef< SwAccessibleContext > xAccImpl(
+			::rtl::Reference< SwAccessibleContext > xAccImpl(
 				GetMap()->GetContextImpl( pTabFrm, sal_False ) );
-			if( xAccImpl.isValid() )
+			if( xAccImpl.is() )
 			{
 				AccessibleEventObject aEvent;
 				aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
@@ -300,9 +300,9 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
 void SwAccessibleCell::Dispose( sal_Bool bRecursive )
 {
 	const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
-	::vos::ORef< SwAccessibleContext > xAccImpl(
+	::rtl::Reference< SwAccessibleContext > xAccImpl(
 			GetMap()->GetContextImpl( pParent, sal_False ) );
-	if( xAccImpl.isValid() )
+	if( xAccImpl.is() )
 		xAccImpl->DisposeChild( GetFrm(), bRecursive );
 	SwAccessibleContext::Dispose( bRecursive );
 }
@@ -310,9 +310,9 @@ void SwAccessibleCell::Dispose( sal_Bool bRecursive )
 void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
 {
 	const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
-	::vos::ORef< SwAccessibleContext > xAccImpl(
+	::rtl::Reference< SwAccessibleContext > xAccImpl(
 			GetMap()->GetContextImpl( pParent, sal_False ) );
-	if( xAccImpl.isValid() )
+	if( xAccImpl.is() )
 		xAccImpl->InvalidateChildPosOrSize( GetFrm(), rOldBox );
 	SwAccessibleContext::InvalidatePosOrSize( rOldBox );
 }
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 6ea5da9..ccd3646 100644
--- sw/source/core/access/acccontext.cxx
+++ sw/source/core/access/acccontext.cxx
@@ -267,10 +267,10 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
 			{
 				if( pLower  )
 				{
-					::vos::ORef< SwAccessibleContext > xAccImpl =
+					::rtl::Reference< SwAccessibleContext > xAccImpl =
 						GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction ||
 												SCROLLED_IN == eAction );
-					if( xAccImpl.isValid() )
+					if( xAccImpl.is() )
 					{
 						switch( eAction )
 						{
@@ -297,12 +297,12 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
 				}
 				else
 				{
-					::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+					::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
 						GetMap()->GetContextImpl( rLower.GetSdrObject(),
 												  this,
 												  SCROLLED_OUT == eAction ||
 												  SCROLLED_IN == eAction );
-					if( xAccImpl.isValid() )
+					if( xAccImpl.is() )
 					{
 						switch( eAction )
 						{
@@ -314,7 +314,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
 							break;
 						case SCROLLED_IN:
 							ScrolledInShape( rLower.GetSdrObject(),
-											 xAccImpl.getBodyPtr() );
+											 xAccImpl.get() );
 							break;
 						case SCROLLED_OUT:
 							{
@@ -322,7 +322,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
 									::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
 									GetMap() );
 								DisposeShape( rLower.GetSdrObject(),
-											  xAccImpl.getBodyPtr() );
+											  xAccImpl.get() );
 							}
 							break;
 						case NONE:
@@ -381,19 +381,19 @@ void SwAccessibleContext::ScrolledIn()
 
 	// Send child event at parent. That's all we have to do here.
 	const SwFrm *pParent = GetParent();
-	::vos::ORef< SwAccessibleContext > xParentImpl(
+	::rtl::Reference< SwAccessibleContext > xParentImpl(
 		 GetMap()->GetContextImpl( pParent, sal_False ) );
 	uno::Reference < XAccessibleContext > xThis( this );
-	if( xParentImpl.isValid() )
+	if( xParentImpl.is() )
 	{
-		SetParent( xParentImpl.getBodyPtr() );
+		SetParent( xParentImpl.get() );
 
 		AccessibleEventObject aEvent;
 		aEvent.EventId = AccessibleEventId::CHILD;
 		aEvent.NewValue <<= xThis;
 
 		xParentImpl->FireAccessibleEvent( aEvent );
-		DBG_MSG_PARAM( "AccessibleChild (added)", xChildImpl.getBodyPtr() );
+		DBG_MSG_PARAM( "AccessibleChild (added)", xChildImpl.get() );
 
 		if( HasCursor() )
 		{
@@ -441,10 +441,10 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
 		const SwFrm *pLower = rLower.GetSwFrm();
 		if( pLower )
 		{
-			::vos::ORef< SwAccessibleContext > xAccImpl;
+			::rtl::Reference< SwAccessibleContext > xAccImpl;
 			if( rLower.IsAccessible( GetShell()->IsPreView() ) )
 				xAccImpl = GetMap()->GetContextImpl( pLower, sal_False );
-			if( xAccImpl.isValid() )
+			if( xAccImpl.is() )
                 xAccImpl->InvalidateStates( _nStates );
 			else
                 InvalidateChildrenStates( pLower, _nStates );
@@ -469,21 +469,21 @@ void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm,
 		const SwFrm *pLower = rLower.GetSwFrm();
 		if( pLower )
 		{
-			::vos::ORef< SwAccessibleContext > xAccImpl;
+			::rtl::Reference< SwAccessibleContext > xAccImpl;
 			if( rLower.IsAccessible( GetShell()->IsPreView() ) )
 				xAccImpl = GetMap()->GetContextImpl( pLower, sal_False );
-			if( xAccImpl.isValid() )
+			if( xAccImpl.is() )
 				xAccImpl->Dispose( bRecursive );
 			else if( bRecursive )
 				DisposeChildren( pLower, bRecursive );
 		}
 		else
 		{
-			::vos::ORef< ::accessibility::AccessibleShape > xAccImpl(
+			::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl(
 					GetMap()->GetContextImpl( rLower.GetSdrObject(),
 										  this, sal_False )  );
-			if( xAccImpl.isValid() )
-				DisposeShape( rLower.GetSdrObject(), xAccImpl.getBodyPtr() );
+			if( xAccImpl.is() )
+				DisposeShape( rLower.GetSdrObject(), xAccImpl.get() );
 		}
 		++aIter;
 	}
@@ -641,21 +641,21 @@ uno::Reference< XAccessible> SAL_CALL
 	uno::Reference< XAccessible > xChild;
 	if( aChild.GetSwFrm() )
 	{
-		::vos::ORef < SwAccessibleContext > xChildImpl(
+		::rtl::Reference < SwAccessibleContext > xChildImpl(
 				GetMap()->GetContextImpl( aChild.GetSwFrm(), !bDisposing )  );
-		if( xChildImpl.isValid() )
+		if( xChildImpl.is() )
 		{
 			xChildImpl->SetParent( this );
-			xChild = xChildImpl.getBodyPtr();
+			xChild = xChildImpl.get();
 		}
 	}
 	else
 	{
-		::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+		::rtl::Reference < ::accessibility::AccessibleShape > xChildImpl(
 				GetMap()->GetContextImpl( aChild.GetSdrObject(),
 										  this, !bDisposing )  );
-		if( xChildImpl.isValid() )
-			xChild = xChildImpl.getBodyPtr();
+		if( xChildImpl.is() )
+			xChild = xChildImpl.get();
 	}
 
 	return xChild;
@@ -699,10 +699,10 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent (void)
 	sal_Int32 nIndex = -1;
 	if( pUpper )
 	{
-		::vos::ORef < SwAccessibleContext > xAccImpl(
+		::rtl::Reference < SwAccessibleContext > xAccImpl(
 			GetMap()->GetContextImpl( pUpper, !bDisposing )  );
-		ASSERT( xAccImpl.isValid() || bDisposing, "no parent found" );
-		if( xAccImpl.isValid() )
+		ASSERT( xAccImpl.is() || bDisposing, "no parent found" );
+		if( xAccImpl.is() )
 			nIndex = xAccImpl->GetChildIndex( GetFrm() );
 	}
 
@@ -1051,13 +1051,13 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleContext::getSupportedServiceNames
 void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
 								::accessibility::AccessibleShape *pAccImpl )
 {
-	::vos::ORef< ::accessibility::AccessibleShape > xAccImpl( pAccImpl );
-	if( !xAccImpl.isValid() )
+	::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl( pAccImpl );
+	if( !xAccImpl.is() )
 		xAccImpl = GetMap()->GetContextImpl( pObj, this, sal_True );
 
 	AccessibleEventObject aEvent;
 	aEvent.EventId = AccessibleEventId::CHILD;
-	uno::Reference< XAccessible > xAcc( xAccImpl.getBodyPtr() );
+	uno::Reference< XAccessible > xAcc( xAccImpl.get() );
 	aEvent.OldValue <<= xAcc;
 	FireAccessibleEvent( aEvent );
 
@@ -1155,18 +1155,18 @@ void SwAccessibleContext::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
 		// get notified of the movement.
 		if( rChildFrmOrObj.GetSwFrm() )
 		{
-			::vos::ORef< SwAccessibleContext > xAccImpl =
+			::rtl::Reference< SwAccessibleContext > xAccImpl =
 					GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
 											  sal_True );
 			xAccImpl->Dispose( bRecursive );
 		}
 		else
 		{
-			::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+			::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
 					GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
 											  this, sal_True );
 			DisposeShape( rChildFrmOrObj.GetSdrObject(),
-						  xAccImpl.getBodyPtr() );
+						  xAccImpl.get() );
 		}
 	}
 	else if( bRecursive && rChildFrmOrObj.GetSwFrm() )
@@ -1233,21 +1233,21 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
 			if( rChildFrmOrObj.GetSwFrm() )
 			{
 				// The frame becomes visible. A child event must be send.
-				::vos::ORef< SwAccessibleContext > xAccImpl =
+				::rtl::Reference< SwAccessibleContext > xAccImpl =
 					GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
 											  sal_True );
 				xAccImpl->ScrolledIn();
 			}
 			else
 			{
-				::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+				::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
 						GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
 												  this, sal_True );
                 // --> OD 2004-11-29 #i37790#
-                if ( xAccImpl.isValid() )
+                if ( xAccImpl.is() )
                 {
                     ScrolledInShape( rChildFrmOrObj.GetSdrObject(),
-                                     xAccImpl.getBodyPtr() );
+                                     xAccImpl.get() );
                 }
                 else
                 {
@@ -1269,7 +1269,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
 		{
 			if( rChildFrmOrObj.GetSwFrm() )
 			{
-				::vos::ORef< SwAccessibleContext > xAccImpl =
+				::rtl::Reference< SwAccessibleContext > xAccImpl =
 					GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
 											  sal_True );
 				xAccImpl->SetParent( this );
@@ -1277,11 +1277,11 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
 			}
 			else
 			{
-				::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+				::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
 						GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
 												  this, sal_True );
 				DisposeShape( rChildFrmOrObj.GetSdrObject(),
-						  xAccImpl.getBodyPtr() );
+						  xAccImpl.get() );
 			}
 		}
 	}
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 0a3f016..eee61f5 100644
--- sw/source/core/access/accframebase.cxx
+++ sw/source/core/access/accframebase.cxx
@@ -135,7 +135,7 @@ void SwAccessibleFrameBase::GetStates(
 	{
 		rStateSet.AddState( AccessibleStateType::SELECTED );
 		ASSERT( bIsSelected, "bSelected out of sync" );
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 
 		Window *pWin = GetWindow();
@@ -205,7 +205,7 @@ void SwAccessibleFrameBase::_InvalidateCursorPos()
 	{
 		// remember that object as the one that has the caret. This is
 		// neccessary to notify that object if the cursor leaves it.
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 9056c02..9ecaeca 100644
--- sw/source/core/access/acchyperlink.cxx
+++ sw/source/core/access/acchyperlink.cxx
@@ -78,7 +78,7 @@ SwAccessibleHyperlink::SwAccessibleHyperlink( sal_uInt16 nHPos,
 const SwTxtAttr *SwAccessibleHyperlink::GetTxtAttr() const
 {
 	const SwTxtAttr *pTxtAttr = 0;
-	if( xPara.isValid() && xPara->GetMap() )
+	if( xPara.is() && xPara->GetMap() )
 	{
 		const SwTxtNode *pTxtNd = xPara->GetTxtNode();
 		const SwpHints *pHints = pTxtNd->GetpSwpHints();
@@ -205,7 +205,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::isValid(  )
 		throw (uno::RuntimeException)
 {
 	vos::OGuard aGuard(Application::GetSolarMutex());
-	return xPara.isValid();
+	return xPara.is();
 }
 
 void SwAccessibleHyperlink::Invalidate() 
diff --git a/sw/source/core/access/acchyperlink.hxx b/sw/source/core/access/acchyperlink.hxx
index 140f2b7..8fde0ab 100644
--- sw/source/core/access/acchyperlink.hxx
+++ sw/source/core/access/acchyperlink.hxx
@@ -37,8 +37,8 @@
 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEHYPERLINK_HPP_
 #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
 #include <cppuhelper/implbase1.hxx>
@@ -57,7 +57,7 @@ class SwAccessibleHyperlink :
 	friend class SwAccessibleParagraph;
 	friend class SwAccessibleHyperTextData;
 	sal_uInt16 nHintPos;
-	::vos::ORef< SwAccessibleParagraph > xPara;
+	::rtl::Reference< SwAccessibleParagraph > xPara;
 	sal_Int32 nStartIdx;
 	sal_Int32 nEndIdx;
 
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index d48d0a3..ebb38b1 100644
--- sw/source/core/access/accmap.cxx
+++ sw/source/core/access/accmap.cxx
@@ -37,8 +37,8 @@
 #include "precompiled_sw.hxx"
 
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CPPUHELPER_WEAKREF_HXX_
 #include <cppuhelper/weakref.hxx>
@@ -294,7 +294,7 @@ struct SwShapeFunc
 	}
 };
 typedef ::std::map < const SdrObject *, uno::WeakReference < XAccessible >, SwShapeFunc > _SwAccessibleShapeMap_Impl;
-typedef ::std::pair < const SdrObject *, ::vos::ORef < ::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl;
+typedef ::std::pair < const SdrObject *, ::rtl::Reference < ::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl;
 
 class SwAccessibleShapeMap_Impl: public _SwAccessibleShapeMap_Impl
 
@@ -484,10 +484,10 @@ public:
         return meType;
     }
 
-    inline ::vos::ORef < SwAccessibleContext > GetContext() const
+    inline ::rtl::Reference < SwAccessibleContext > GetContext() const
     {
         uno::Reference < XAccessible > xTmp( mxAcc );
-        ::vos::ORef < SwAccessibleContext > xAccImpl(
+        ::rtl::Reference < SwAccessibleContext > xAccImpl(
                             static_cast<SwAccessibleContext*>( xTmp.get() ) );
 
         return xAccImpl;
@@ -682,12 +682,12 @@ static sal_Bool AreInSameTable( const uno::Reference< XAccessible >& rAcc,
 
 void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
 {
-	::vos::ORef < SwAccessibleContext > xAccImpl( rEvent.GetContext() );
+	::rtl::Reference < SwAccessibleContext > xAccImpl( rEvent.GetContext() );
 	if( SwAccessibleEvent_Impl::SHAPE_SELECTION == rEvent.GetType() )
 	{
 		DoInvalidateShapeSelection();
 	}
-	else if( xAccImpl.isValid() && xAccImpl->GetFrm() )
+	else if( xAccImpl.is() && xAccImpl->GetFrm() )
 	{
 		switch( rEvent.GetType() )
 		{
@@ -702,7 +702,7 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
 									   rEvent.GetOldBox() );
 			break;
 		case SwAccessibleEvent_Impl::DISPOSE:
-			ASSERT( xAccImpl.isValid(),
+			ASSERT( xAccImpl.is(),
 					"dispose event has been stored" );
 			break;
 		default:
@@ -907,7 +907,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
 		SwAccessibleObjShape_Impl *pShape = pShapes;
 		while( nShapes )
 		{
-			if( pShape->second.isValid() )
+			if( pShape->second.is() )
 			{
 				sal_Bool bChanged;
 				if( pShape >= pSelShape )
@@ -944,7 +944,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
 			::std::list< const SwFrm * >::const_iterator aEndIter = aParents.end();
 			while( aIter != aEndIter )
 			{
-				::vos::ORef< SwAccessibleContext > xParentAccImpl;
+				::rtl::Reference< SwAccessibleContext > xParentAccImpl;
 				{
 					vos::OGuard aGuard( maMutex );
 					if(  mpFrmMap )
@@ -959,7 +959,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
 						}
 					}
 				}
-				if( xParentAccImpl.isValid() )
+				if( xParentAccImpl.is() )
 				{
 					AccessibleEventObject aEvent;
 					aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
@@ -1002,7 +1002,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus()
 		SwAccessibleObjShape_Impl  *pShape = pShapes;
 		while( nShapes )
 		{
-			if( pShape->second.isValid() )
+			if( pShape->second.is() )
 			{
 				if( bFocused && pShape >= pSelShape )
 					pShape->second->SetState( AccessibleStateType::FOCUSED );
@@ -1357,13 +1357,13 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
 	return xAcc;
 }
 
-::vos::ORef < SwAccessibleContext > SwAccessibleMap::GetContextImpl(
+::rtl::Reference < SwAccessibleContext > SwAccessibleMap::GetContextImpl(
 			const SwFrm *pFrm,
 			sal_Bool bCreate )
 {
 	uno::Reference < XAccessible > xAcc( GetContext( pFrm, bCreate ) );
 
-	::vos::ORef < SwAccessibleContext > xAccImpl(
+	::rtl::Reference < SwAccessibleContext > xAccImpl(
 		 static_cast< SwAccessibleContext * >( xAcc.get() ) );
 
 	return xAccImpl;
@@ -1435,14 +1435,14 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
 	return xAcc;
 }
 
-::vos::ORef < ::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl(
+::rtl::Reference < ::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl(
 			const SdrObject *pObj,
 			SwAccessibleContext *pParentImpl,
 			sal_Bool bCreate )
 {
 	uno::Reference < XAccessible > xAcc( GetContext( pObj, pParentImpl, bCreate ) );
 
-	::vos::ORef < ::accessibility::AccessibleShape > xAccImpl(
+	::rtl::Reference < ::accessibility::AccessibleShape > xAccImpl(
 		 static_cast< ::accessibility::AccessibleShape* >( xAcc.get() ) );
 
 	return xAccImpl;
@@ -1524,9 +1524,9 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
 	ASSERT( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(),
 			"non accessible frame should be disposed" );
 
-	::vos::ORef< SwAccessibleContext > xAccImpl;
-	::vos::ORef< SwAccessibleContext > xParentAccImpl;
-	::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl;
+	::rtl::Reference< SwAccessibleContext > xAccImpl;
+	::rtl::Reference< SwAccessibleContext > xParentAccImpl;
+	::rtl::Reference< ::accessibility::AccessibleShape > xShapeAccImpl;
 	if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
 	{
 		// get accessible context for frame
@@ -1545,7 +1545,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
 						static_cast< SwAccessibleContext *>( xAcc.get() );
 				}
 			}
-			if( !xAccImpl.isValid() && mpFrmMap )
+			if( !xAccImpl.is() && mpFrmMap )
 			{
 				// If there is none, look if the parent is accessible.
 				const SwFrm *pParent =
@@ -1564,7 +1564,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
 					}
 				}
 			}
-			if( !xParentAccImpl.isValid() && !aFrmOrObj.GetSwFrm() &&
+			if( !xParentAccImpl.is() && !aFrmOrObj.GetSwFrm() &&
 				mpShapeMap )
 			{
 				SwAccessibleShapeMap_Impl::iterator aIter =
@@ -1577,7 +1577,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
 				}
 			}
 			if( pObj && GetShell()->ActionPend() &&
-				(xParentAccImpl.isValid() || xShapeAccImpl.isValid()) )
+				(xParentAccImpl.is() || xShapeAccImpl.is()) )
 			{
 				// Keep a reference to the XShape to avoid that it
 				// is deleted with a SwFrmFmt::Modify.
@@ -1613,11 +1613,11 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
 		// the frame. If the frame is no context for it but disposing should
 		// take place recursive, the frame's children have to be disposed
 		// anyway, so we have to create the context then.
-		if( xAccImpl.isValid() )
+		if( xAccImpl.is() )
 		{
 			xAccImpl->Dispose( bRecursive );
 		}
-		else if( xParentAccImpl.isValid() )
+		else if( xParentAccImpl.is() )
 		{
 			// If the frame is a cell frame, the table must be notified.
 			// If we are in an action, a table model change event will
@@ -1626,7 +1626,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
 
 			xParentAccImpl->DisposeChild( aFrmOrObj, bRecursive );
 		}
-		else if( xShapeAccImpl.isValid() )
+		else if( xShapeAccImpl.is() )
 		{
 			RemoveContext( aFrmOrObj.GetSdrObject() );
 			xShapeAccImpl->dispose();
@@ -1644,8 +1644,8 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
 	SwFrmOrObj aFrmOrObj( pFrm, pObj );
 	if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
 	{
-		::vos::ORef< SwAccessibleContext > xAccImpl;
-		::vos::ORef< SwAccessibleContext > xParentAccImpl;
+		::rtl::Reference< SwAccessibleContext > xAccImpl;
+		::rtl::Reference< SwAccessibleContext > xParentAccImpl;
 		{
 			vos::OGuard aGuard( maMutex );
 
@@ -1664,7 +1664,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
 							static_cast< SwAccessibleContext *>( xAcc.get() );
 					}
 				}
-				if( !xAccImpl.isValid() )
+				if( !xAccImpl.is() )
 				{
 					// Otherwise we look if the parent is accessible.
 					// If not, there is nothing to do.
@@ -1687,12 +1687,12 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
 			}
 		}
 
-		if( xAccImpl.isValid() )
+		if( xAccImpl.is() )
 		{
 			if( GetShell()->ActionPend() )
 			{
 				SwAccessibleEvent_Impl aEvent(
-					SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.getBodyPtr(),
+					SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.get(),
 					aFrmOrObj, rOldBox );
 				AppendEvent( aEvent );
 			}
@@ -1702,13 +1702,13 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
 				xAccImpl->InvalidatePosOrSize( rOldBox );
 			}
 		}
-		else if( xParentAccImpl.isValid() )
+		else if( xParentAccImpl.is() )
 		{
 			if( GetShell()->ActionPend() )
 			{
 				SwAccessibleEvent_Impl aEvent(
 					SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
-					xParentAccImpl.getBodyPtr(), aFrmOrObj, rOldBox );
+					xParentAccImpl.get(), aFrmOrObj, rOldBox );
 				AppendEvent( aEvent );
 			}
 			else
@@ -1875,10 +1875,10 @@ void SwAccessibleMap::InvalidateFocus()
 }
 
 void SwAccessibleMap::SetCursorContext(
-		const ::vos::ORef < SwAccessibleContext >& rCursorContext )
+		const ::rtl::Reference < SwAccessibleContext >& rCursorContext )
 {
 	vos::OGuard aGuard( maMutex );
-	uno::Reference < XAccessible > xAcc( rCursorContext.getBodyPtr() );
+	uno::Reference < XAccessible > xAcc( rCursorContext.get() );
 	mxCursorContext = xAcc;
 }
 
@@ -2042,7 +2042,7 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages
     // accessibility tree; this will also send appropriate scroll
     // events
     SwAccessibleContext* pDoc =
-        GetContextImpl( GetShell()->GetLayout() ).getBodyPtr();
+        GetContextImpl( GetShell()->GetLayout() ).get();
     static_cast<SwAccessibleDocumentBase*>( pDoc )->SetVisArea();
 
 	uno::Reference < XAccessible > xOldAcc;
@@ -2578,9 +2578,9 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
                 uno::Reference < XAccessible > xAcc( (*aIter).first );
                 if ( xAcc.is() )
                 {
-                    ::vos::ORef < SwAccessibleContext > xAccImpl(
+                    ::rtl::Reference < SwAccessibleContext > xAccImpl(
                                 static_cast<SwAccessibleContext*>( xAcc.get() ) );
-                    if ( xAccImpl.isValid() && xAccImpl->GetFrm() )
+                    if ( xAccImpl.is() && xAccImpl->GetFrm() )
                     {
                         const SwTxtFrm* pTxtFrm(
                             dynamic_cast<const SwTxtFrm*>(xAccImpl->GetFrm()) );
@@ -2606,9 +2606,9 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
             uno::Reference < XAccessible > xAcc( (*aIter).first );
             if ( xAcc.is() )
             {
-                ::vos::ORef < SwAccessibleContext > xAccImpl(
+                ::rtl::Reference < SwAccessibleContext > xAccImpl(
                             static_cast<SwAccessibleContext*>( xAcc.get() ) );
-                if ( xAccImpl.isValid() && xAccImpl->GetFrm() )
+                if ( xAccImpl.is() && xAccImpl->GetFrm() )
                 {
                     const SwTxtFrm* pTxtFrm(
                             dynamic_cast<const SwTxtFrm*>(xAccImpl->GetFrm()) );
diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx
index ed1a1d4..638a7bd 100644
--- sw/source/core/access/accpage.cxx
+++ sw/source/core/access/accpage.cxx
@@ -94,7 +94,7 @@ void SwAccessiblePage::GetStates(
 	if( IsSelected() )
 	{
 		ASSERT( bIsSelected, "bSelected out of sync" );
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 
 		Window *pWin = GetWindow();
@@ -118,7 +118,7 @@ void SwAccessiblePage::_InvalidateCursorPos()
 	{
 		// remember that object as the one that has the caret. This is
 		// neccessary to notify that object if the cursor leaves it.
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 0ef417f..7dbe78d 100644
--- sw/source/core/access/accpara.cxx
+++ sw/source/core/access/accpara.cxx
@@ -192,7 +192,6 @@ using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::accessibility;
-using namespace ::rtl;
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::beans::PropertyValue;
@@ -202,6 +201,7 @@ using ::com::sun::star::beans::PropertyState_DIRECT_VALUE;
 using std::max;
 using std::min;
 using std::sort;
+using rtl::OUString;
 
 namespace com { namespace sun { namespace star {
     namespace text {
@@ -474,7 +474,7 @@ void SwAccessibleParagraph::GetStates(
 		Window *pWin = GetWindow();
 		if( pWin && pWin->HasFocus() )
 			rStateSet.AddState( AccessibleStateType::FOCUSED );
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 }
@@ -553,7 +553,7 @@ void SwAccessibleParagraph::_InvalidateCursorPos()
 	{
 		// remember that object as the one that has the caret. This is
 		// neccessary to notify that object if the cursor leaves it.
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 
@@ -1272,7 +1272,7 @@ sal_Int32 SwAccessibleParagraph::getCaretPosition()
 	}
 	if( -1 != nRet )
 	{
-		::vos::ORef < SwAccessibleContext > xThis( this );
+		::rtl::Reference < SwAccessibleContext > xThis( this );
 		GetMap()->SetCursorContext( xThis );
 	}
 
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index 854cc3e..cf54721 100644
--- sw/source/core/access/accselectionhelper.cxx
+++ sw/source/core/access/accselectionhelper.cxx
@@ -327,22 +327,22 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
 	Reference< XAccessible > xChild;
 	if( aChild.GetSwFrm() )
 	{
-		::vos::ORef < SwAccessibleContext > xChildImpl(
+		::rtl::Reference < SwAccessibleContext > xChildImpl(
 				rContext.GetMap()->GetContextImpl( aChild.GetSwFrm(),
 				sal_True ) );
-		if( xChildImpl.isValid() )
+		if( xChildImpl.is() )
 		{
 			xChildImpl->SetParent( &rContext );
-			xChild = xChildImpl.getBodyPtr();
+			xChild = xChildImpl.get();
 		}
 	}
 	else
 	{
-		::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+		::rtl::Reference < ::accessibility::AccessibleShape > xChildImpl(
 				rContext.GetMap()->GetContextImpl( aChild.GetSdrObject(),
 										  &rContext, sal_True )  );
-		if( xChildImpl.isValid() )
-			xChild = xChildImpl.getBodyPtr();
+		if( xChildImpl.is() )
+			xChild = xChildImpl.get();
 	}
     return xChild;
 }
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index a15203f..e703e59 100644
--- sw/source/core/doc/doc.cxx
+++ sw/source/core/doc/doc.cxx
@@ -450,7 +450,7 @@ const com::sun::star::i18n::ForbiddenCharacters*
     SwDoc::getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const
 {
     const com::sun::star::i18n::ForbiddenCharacters* pRet = 0;
-    if( xForbiddenCharsTable.isValid() )
+    if( xForbiddenCharsTable.is() )
         pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, FALSE );
     if( bLocaleData && !pRet && pBreakIt )
         pRet = &pBreakIt->GetForbidden( (LanguageType)nLang );
@@ -460,7 +460,7 @@ const com::sun::star::i18n::ForbiddenCharacters*
 void SwDoc::setForbiddenCharacters(/*[in]*/ USHORT nLang,
                                    /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rFChars )
 {
-    if( !xForbiddenCharsTable.isValid() )
+    if( !xForbiddenCharsTable.is() )
     {
         ::com::sun::star::uno::Reference<
             ::com::sun::star::lang::XMultiServiceFactory > xMSF =
@@ -484,9 +484,9 @@ void SwDoc::setForbiddenCharacters(/*[in]*/ USHORT nLang,
     SetModified();
 }
 
-vos::ORef<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
+rtl::Reference<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
 {
-    if( !xForbiddenCharsTable.isValid() )
+    if( !xForbiddenCharsTable.is() )
     {
         ::com::sun::star::uno::Reference<
             ::com::sun::star::lang::XMultiServiceFactory > xMSF =
@@ -496,7 +496,7 @@ vos::ORef<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
     return xForbiddenCharsTable;
 }
 
-const vos::ORef<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable() const
+const rtl::Reference<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable() const
 {
     return xForbiddenCharsTable;
 }
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 6b44737..ce0661d 100644
--- sw/source/core/doc/docnew.cxx
+++ sw/source/core/doc/docnew.cxx
@@ -910,7 +910,7 @@ void SwDoc::ClearDoc()
 	else
 		pFrmFmtTbl->DeleteAndDestroy( 1, pFrmFmtTbl->Count()-1 );
 
-	xForbiddenCharsTable.unbind();
+	xForbiddenCharsTable.clear();
 
 	pFldTypes->DeleteAndDestroy( INIT_FLDTYPES,
 								pFldTypes->Count() - INIT_FLDTYPES );
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 9bfd3d3..ec106f9 100644
--- sw/source/core/text/guess.cxx
+++ sw/source/core/text/guess.cxx
@@ -90,13 +90,14 @@
 #include <porfld.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::linguistic2;
 
+using rtl::OUString;
+
 #define CH_FULL_BLANK 0x3000
 
 /*************************************************************************
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 0bbbed9..0b05352 100644
--- sw/source/core/unocore/SwXTextDefaults.cxx
+++ sw/source/core/unocore/SwXTextDefaults.cxx
@@ -84,12 +84,13 @@
 #endif
 
 
-using namespace rtl;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::lang;
 
+using rtl::OUString;
+
 // declarations
 void lcl_setPageDesc(SwDoc*, const uno::Any&, SfxItemSet& ); // from unoobj.cxx
 
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index ea0c4c9..cb425e9 100644
--- sw/source/core/unocore/unocoll.cxx
+++ sw/source/core/unocore/unocoll.cxx
@@ -145,7 +145,6 @@
 
 #include "docsh.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::uno;
@@ -153,6 +152,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
+using rtl::OUString;
+
 /******************************************************************************
  *
  ******************************************************************************/
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 818041d..e4aefcf 100644
--- sw/source/core/unocore/unoportenum.cxx
+++ sw/source/core/unocore/unoportenum.cxx
@@ -98,8 +98,10 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
-using namespace ::rtl;
 using namespace ::std;
+
+using rtl::OUString;
+
 /******************************************************************
  *	SwXTextPortionEnumeration
  ******************************************************************/
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 4838f75..7945282 100644
--- sw/source/core/unocore/unosett.cxx
+++ sw/source/core/unocore/unosett.cxx
@@ -155,7 +155,6 @@
 #include <SwStyleNameMapper.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -163,6 +162,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::style;
 
+using rtl::OUString;
+
 struct PropValData
 {
 	uno::Any 		aVal;
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index a490baf..b34909c 100644
--- sw/source/filter/xml/xmlbrsh.cxx
+++ sw/source/filter/xml/xmlbrsh.cxx
@@ -72,11 +72,12 @@
 #include "xmlimpit.hxx"
 #include "xmlexpit.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 enum SvXMLTokenMapAttrs
 {
 	XML_TOK_BGIMG_HREF,
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 95a28d6..5d8fc3e 100644
--- sw/source/filter/xml/xmlexp.cxx
+++ sw/source/filter/xml/xmlexp.cxx
@@ -160,7 +160,6 @@
 #endif
 // <--
 
-using namespace ::rtl;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::xml::sax;
@@ -173,6 +172,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::i18n;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 #ifdef XML_CORE_API
 void SwXMLExport::SetCurPaM( SwPaM& rPaM, sal_Bool bWhole, sal_Bool bTabOnly )
 {
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 61c20e4..12571fe 100644
--- sw/source/filter/xml/xmlfmte.cxx
+++ sw/source/filter/xml/xmlfmte.cxx
@@ -102,7 +102,6 @@
 #include <SwStyleNameMapper.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -110,6 +109,8 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::lang;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
 {
 	// <style:style ...>
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 85418e7..479841e 100644
--- sw/source/filter/xml/xmlimp.cxx
+++ sw/source/filter/xml/xmlimp.cxx
@@ -158,7 +158,6 @@
 #include <unotxdoc.hxx>    // for initXForms()
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -170,14 +169,7 @@ using namespace ::com::sun::star::drawing;
 using namespace ::xmloff::token;
 using namespace ::std;
 
-struct OUStringEquals
-{
-	sal_Bool operator()( const rtl::OUString &r1,
-				    	 const rtl::OUString &r2) const
-	{
-		return r1 == r2;
-	}
-};
+using rtl::OUString;
 
 //----------------------------------------------------------------------------
 
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 9dccf8c..46e7bf7 100644
--- sw/source/filter/xml/xmlitemi.cxx
+++ sw/source/filter/xml/xmlitemi.cxx
@@ -110,10 +110,11 @@
 #include "xmlimp.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+
 extern SvXMLItemMapEntry aXMLTableItemMap[];
 extern SvXMLItemMapEntry aXMLTableColItemMap[];
 extern SvXMLItemMapEntry aXMLTableRowItemMap[];
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 6fe24c2..464569d 100644
--- sw/source/filter/xml/xmlmeta.cxx
+++ sw/source/filter/xml/xmlmeta.cxx
@@ -90,14 +90,15 @@
 #include "xmlexp.hxx"
 #endif
 
-
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::text;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 // ---------------------------------------------------------------------
 
 SvXMLImportContext *SwXMLImport::CreateMetaContext(
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 8d6f26a..ab30329 100644
--- sw/source/filter/xml/xmltble.cxx
+++ sw/source/filter/xml/xmltble.cxx
@@ -140,7 +140,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
@@ -149,6 +148,8 @@ using namespace ::com::sun::star::container;
 using namespace ::xmloff::token;
 using ::com::sun::star::table::XCell;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 class SwXMLTableColumn_Impl : public SwWriteTableCol
 {
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 265d7a0..937cc28 100644
--- sw/source/filter/xml/xmltbli.cxx
+++ sw/source/filter/xml/xmltbli.cxx
@@ -148,7 +148,6 @@
 #include "ndtxt.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -158,6 +157,7 @@ using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 using ::std::hash_map;
+using rtl::OUString;
 
 enum SwXMLTableElemTokens
 {
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index cde940f..2f60162 100644
--- sw/source/filter/xml/xmltext.cxx
+++ sw/source/filter/xml/xmltext.cxx
@@ -45,11 +45,12 @@
 #include "xmlimp.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 
+using rtl::OUString;
+
 // ---------------------------------------------------------------------
 
 
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 22e4b51..2c7fd5c 100644
--- sw/source/filter/xml/xmltexte.cxx
+++ sw/source/filter/xml/xmltexte.cxx
@@ -122,7 +122,6 @@
 #include <SwStyleNameMapper.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -131,6 +130,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::io;
 using namespace ::xmloff::token;
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 enum SvEmbeddedObjectTypes
 {
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index a962315..6e61635 100644
--- sw/source/ui/app/swmodul1.cxx
+++ sw/source/ui/app/swmodul1.cxx
@@ -141,7 +141,6 @@
 #endif
 #include "helpid.h"
 
-using namespace ::rtl;
 using namespace ::svx;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 2dbce7a..77068f6 100644
--- sw/source/ui/fldui/fldmgr.cxx
+++ sw/source/ui/fldui/fldmgr.cxx
@@ -205,7 +205,6 @@
 #include <fldui.hrc>
 #endif
 
-using namespace rtl;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::container;
 using namespace com::sun::star::lang;
@@ -214,6 +213,8 @@ using namespace com::sun::star::text;
 using namespace com::sun::star::style;
 using namespace com::sun::star::sdbc;
 
+using rtl::OUString;
+
 /*--------------------------------------------------------------------
 	Beschreibung: Gruppen der Felder
  --------------------------------------------------------------------*/
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 6a34b62..f02f59d 100644
--- sw/source/ui/uno/SwXDocumentSettings.cxx
+++ sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -100,8 +100,6 @@
 #include <vcl/svapp.hxx>
 #endif
 
-
-using namespace rtl;
 using namespace comphelper;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
@@ -109,6 +107,8 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::i18n;
 
+using rtl::OUString;
+
 enum SwDocumentSettingsPropertyHandles
 {
 	HANDLE_FORBIDDEN_CHARS,
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index d0bdda1..9657a1b 100644
--- sw/source/ui/uno/unotxdoc.cxx
+++ sw/source/ui/uno/unotxdoc.cxx
@@ -3607,7 +3607,7 @@ void SwXDocumentPropertyHelper::Invalidate()
 	xMarkerTable = 0;
 	xDrawDefaults = 0;
 	m_pDoc = 0;
-	SvxUnoForbiddenCharsTable::mxForbiddenChars.unbind();
+	SvxUnoForbiddenCharsTable::mxForbiddenChars.clear();
 }
 /* -----------------13.08.2003 12:43-----------------
 
diff --git a/ucb/inc/pch/precompiled_ucb.hxx b/ucb/inc/pch/precompiled_ucb.hxx
index 64ee0aa..ad25188 100644
--- ucb/inc/pch/precompiled_ucb.hxx
+++ ucb/inc/pch/precompiled_ucb.hxx
@@ -184,8 +184,8 @@
 
 #include "osl/diagnose.h"
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
 //---MARKER---
 
 #endif
diff --git a/xmlhelp/inc/provider/content.hxx b/xmlhelp/inc/provider/content.hxx
index 6c6b7db..0c6d8c5 100644
--- xmlhelp/inc/provider/content.hxx
+++ xmlhelp/inc/provider/content.hxx
@@ -36,8 +36,8 @@
 #ifndef _CONTENT_HXX
 #define _CONTENT_HXX
 
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _UCBHELPER_CONTENTHELPER_HXX
 #include <ucbhelper/contenthelper.hxx>
diff --git a/xmlhelp/inc/provider/resultset.hxx b/xmlhelp/inc/provider/resultset.hxx
index 965a471..499a748 100644
--- xmlhelp/inc/provider/resultset.hxx
+++ xmlhelp/inc/provider/resultset.hxx
@@ -39,8 +39,8 @@
 #ifndef _UCBHELPER_RESULTSETHELPER_HXX
 #include <ucbhelper/resultsethelper.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CONTENT_HXX
 #include <provider/content.hxx>
@@ -52,7 +52,7 @@ namespace chelp {
 
 	class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
 	{
-		vos::ORef< Content > m_xContent;
+		rtl::Reference< Content > m_xContent;
 		com::sun::star::uno::Reference<
 		com::sun::star::ucb::XCommandEnvironment > m_xEnv;
 		ResultSetFactory*                    m_pFactory;
@@ -65,7 +65,7 @@ namespace chelp {
 		DynamicResultSet(
 			const com::sun::star::uno::Reference<
 			com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
-			const vos::ORef< Content >& rxContent,
+			const rtl::Reference< Content >& rxContent,
 			const com::sun::star::ucb::OpenCommandArgument2& rCommand,
 			const com::sun::star::uno::Reference<
 			com::sun::star::ucb::XCommandEnvironment >& rxEnv,
diff --git a/xmlhelp/source/cxxhelp/provider/resultset.cxx b/xmlhelp/source/cxxhelp/provider/resultset.cxx
index f2f6193..167303b 100644
--- xmlhelp/source/cxxhelp/provider/resultset.cxx
+++ xmlhelp/source/cxxhelp/provider/resultset.cxx
@@ -64,7 +64,7 @@ using namespace chelp;
 
 DynamicResultSet::DynamicResultSet(
 	const Reference< XMultiServiceFactory >& rxSMgr,
-	const vos::ORef< Content >& rxContent,
+	const rtl::Reference< Content >& rxContent,
 	const OpenCommandArgument2& rCommand,
 	const Reference< XCommandEnvironment >& rxEnv,
 	ResultSetFactory* pFactory )
diff --git a/xmloff/inc/pch/precompiled_xmloff.hxx b/xmloff/inc/pch/precompiled_xmloff.hxx
index 1f4d7d8..cb96924 100644
--- xmloff/inc/pch/precompiled_xmloff.hxx
+++ xmloff/inc/pch/precompiled_xmloff.hxx
@@ -478,8 +478,8 @@
 #include "vcl/mapunit.hxx"
 
 #include "vos/mutex.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
 
 #include "xmloff/dllapi.h"
 //---MARKER---
diff --git a/xmloff/inc/xmloff/ControlBorderHandler.hxx b/xmloff/inc/xmloff/ControlBorderHandler.hxx
index a5f38ae..b1e3ed5 100644
--- xmloff/inc/xmloff/ControlBorderHandler.hxx
+++ xmloff/inc/xmloff/ControlBorderHandler.hxx
@@ -39,8 +39,8 @@
 #ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
 #include <xmloff/prhdlfac.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _RTL_USTRING_HXX_
 #include <rtl/ustring.hxx>
diff --git a/xmloff/inc/xmloff/controlpropertyhdl.hxx b/xmloff/inc/xmloff/controlpropertyhdl.hxx
index 8061e0d..c904dd9 100644
--- xmloff/inc/xmloff/controlpropertyhdl.hxx
+++ xmloff/inc/xmloff/controlpropertyhdl.hxx
@@ -47,8 +47,8 @@
 #ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
 #include <xmloff/prhdlfac.hxx>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _RTL_USTRING_HXX_
 #include <rtl/ustring.hxx>
diff --git a/xmloff/inc/xmloff/formlayerexport.hxx b/xmloff/inc/xmloff/formlayerexport.hxx
index 70b50b1..98201c8 100644
--- xmloff/inc/xmloff/formlayerexport.hxx
+++ xmloff/inc/xmloff/formlayerexport.hxx
@@ -44,8 +44,8 @@
 #include "xmloff/dllapi.h"
 #endif
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
 #include <com/sun/star/drawing/XDrawPage.hpp>
@@ -59,8 +59,8 @@
 #ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
 #include <com/sun/star/frame/XModel.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _XMLOFF_XMLEXPPR_HXX
 #include <xmloff/xmlexppr.hxx>
@@ -85,7 +85,7 @@ namespace xmloff
 	/** provides functionallity for exporting a complete form layer.
 	*/
 	class XMLOFF_DLLPUBLIC OFormLayerXMLExport
-				:public ::vos::OReference
+				:public ::salhelper::SimpleReferenceObject
 	{
 	protected:
 		/// our export context
@@ -194,7 +194,7 @@ namespace xmloff
 		bool documentContainsXForms() const;
 
 		/// retrieves the property mapper for control styles
-		::vos::ORef< SvXMLExportPropertyMapper > getStylePropertyMapper();
+		::rtl::Reference< SvXMLExportPropertyMapper > getStylePropertyMapper();
 
 		/** exports the controls number styles
 		*/
diff --git a/xmloff/inc/xmloff/formlayerimport.hxx b/xmloff/inc/xmloff/formlayerimport.hxx
index d10f977..db3ffe4 100644
--- xmloff/inc/xmloff/formlayerimport.hxx
+++ xmloff/inc/xmloff/formlayerimport.hxx
@@ -44,8 +44,8 @@
 #include "xmloff/dllapi.h"
 #endif
 
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
 #include <com/sun/star/drawing/XDrawPage.hpp>
@@ -56,8 +56,8 @@
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _XMLOFF_XMLIMPPR_HXX
 #include <xmloff/xmlimppr.hxx>
@@ -80,7 +80,7 @@ namespace xmloff
 	/** allows you to import a &lt;form:form&gt; element
 	*/
 	class XMLOFF_DLLPUBLIC OFormLayerXMLImport
-				:public ::vos::OReference
+				:public ::salhelper::SimpleReferenceObject
 	{
 		OFormLayerXMLImport_Impl*	m_pImpl;
 
@@ -90,7 +90,7 @@ namespace xmloff
 
 		/** retrieves the property mapper form form related auto styles.
 		*/
-		::vos::ORef< SvXMLImportPropertyMapper >
+		::rtl::Reference< SvXMLImportPropertyMapper >
 				getStylePropertyMapper() const;
 
 		/** start importing the forms of the given page
diff --git a/xmloff/inc/xmloff/nmspmap.hxx b/xmloff/inc/xmloff/nmspmap.hxx
index ae0a46e..ac8e9a4 100644
--- xmloff/inc/xmloff/nmspmap.hxx
+++ xmloff/inc/xmloff/nmspmap.hxx
@@ -54,8 +54,8 @@
 #ifndef __SGI_STL_MAP
 #include <map>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _CPPUHELPER_WEAK_HXX_
 #include <cppuhelper/weak.hxx>
@@ -113,8 +113,8 @@ struct QNamePairEq
 };
 
 typedef ::std::hash_map < QNamePair, ::rtl::OUString, QNamePairHash, QNamePairEq > QNameCache;
-typedef ::std::hash_map < ::rtl::OUString, ::vos::ORef <NameSpaceEntry >, rtl::OUStringHash, OUStringEqFunc > NameSpaceHash;
-typedef ::std::map < sal_uInt16, ::vos::ORef < NameSpaceEntry >, uInt32lt > NameSpaceMap;
+typedef ::std::hash_map < ::rtl::OUString, ::rtl::Reference <NameSpaceEntry >, rtl::OUStringHash, OUStringEqFunc > NameSpaceHash;
+typedef ::std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry >, uInt32lt > NameSpaceMap;
 
 class XMLOFF_DLLPUBLIC SvXMLNamespaceMap
 {
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 9291816..f87cebf 100644
--- xmloff/source/chart/SchXMLExport.cxx
+++ xmloff/source/chart/SchXMLExport.cxx
@@ -209,7 +209,6 @@
 #include	"MultiPropertySetHandler.hxx"
 #include    "PropertyMap.hxx"
 
-using namespace rtl;
 using namespace com::sun::star;
 using namespace ::xmloff::token;
 
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index e92921e..c4bb4be 100644
--- xmloff/source/chart/SchXMLImport.cxx
+++ xmloff/source/chart/SchXMLImport.cxx
@@ -114,7 +114,6 @@
 
 #include <typeinfo>
 
-using namespace rtl;
 using namespace com::sun::star;
 using namespace ::xmloff::token;
 
diff --git a/xmloff/source/core/XMLBase64Export.cxx b/xmloff/source/core/XMLBase64Export.cxx
index 621c91b..d5954c0 100644
--- xmloff/source/core/XMLBase64Export.cxx
+++ xmloff/source/core/XMLBase64Export.cxx
@@ -60,7 +60,8 @@
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::io;
-using namespace ::rtl;
+
+using rtl::OUStringBuffer;
 
 #define INPUT_BUFFER_SIZE 54
 #define OUTPUT_BUFFER_SIZE 72
diff --git a/xmloff/source/core/XMLBase64ImportContext.cxx b/xmloff/source/core/XMLBase64ImportContext.cxx
index f06f0da..8fbbf87 100644
--- xmloff/source/core/XMLBase64ImportContext.cxx
+++ xmloff/source/core/XMLBase64ImportContext.cxx
@@ -51,11 +51,12 @@
 #include <xmloff/XMLBase64ImportContext.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::io;
 
+using rtl::OUString;
+
 //-----------------------------------------------------------------------------
 
 TYPEINIT1( XMLBase64ImportContext, SvXMLImportContext );
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index fa9bae2..3fe25dc 100644
--- xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -93,7 +93,6 @@
 #include "XMLEmbeddedObjectImportContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::beans;
@@ -103,6 +102,8 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 struct XMLServiceMapEntry_Impl
 {
 	enum XMLTokenEnum eClass;
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index b4f783e..1a60d42 100644
--- xmloff/source/core/nmspmap.cxx
+++ xmloff/source/core/nmspmap.cxx
@@ -124,7 +124,7 @@ sal_uInt16 SvXMLNamespaceMap::_Add( const OUString& rPrefix, const OUString &rNa
 		}
 		while ( sal_True );
 	}
-    ::vos::ORef<NameSpaceEntry> pEntry(new NameSpaceEntry);
+    ::rtl::Reference<NameSpaceEntry> pEntry(new NameSpaceEntry);
 	pEntry->sName   = rName;
 	pEntry->nKey    = nKey;
 	pEntry->sPrefix = rPrefix;
@@ -303,7 +303,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName,
         it = aNameCache.end();
     if ( it != aNameCache.end() )
 	{
-        const NameSpaceEntry &rEntry = (*it).second.getBody();
+        const NameSpaceEntry &rEntry = *((*it).second);
         if ( pPrefix )
             *pPrefix = rEntry.sPrefix;
         if ( pLocalName )
@@ -317,7 +317,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName,
     }
     else
     {
-	vos::ORef<NameSpaceEntry> xEntry(new NameSpaceEntry());
+	rtl::Reference<NameSpaceEntry> xEntry(new NameSpaceEntry());
 
         sal_Int32 nColonPos = rAttrName.indexOf( sal_Unicode(':') );
         if( -1L == nColonPos )
@@ -355,7 +355,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName,
 
         if (bCache)
 	{
-	    typedef std::pair< const rtl::OUString, vos::ORef<NameSpaceEntry> > value_type;
+	    typedef std::pair< const rtl::OUString, rtl::Reference<NameSpaceEntry> > value_type;
 	    (void) const_cast<NameSpaceHash*>(&aNameCache)->insert (value_type (rAttrName, xEntry));
 	}
     }
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 30bdce5..0a675d0 100644
--- xmloff/source/core/xmlexp.cxx
+++ xmloff/source/core/xmlexp.cxx
@@ -216,7 +216,6 @@
 #include "xformsexport.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::osl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -229,6 +228,8 @@ using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::io;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 sal_Char __READONLY_DATA sXML_1_0[] = "1.0";
 
 #define LOGFILE_AUTHOR "mb93740"
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 8268069..f598bc9 100644
--- xmloff/source/core/xmlimp.cxx
+++ xmloff/source/core/xmlimp.cxx
@@ -156,7 +156,6 @@
 
 using ::com::sun::star::beans::XPropertySetInfo;
 
-using namespace ::rtl;
 using namespace ::osl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -167,6 +166,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::document;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 sal_Char __READONLY_DATA sXML_np__office[] = "_office";
 sal_Char __READONLY_DATA sXML_np__ooo[] = "_ooo";
 sal_Char __READONLY_DATA sXML_np__ooow[] = "_ooow";
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index 756feb4..84f2289 100644
--- xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -72,7 +72,6 @@
 #include <xmloff/XMLGraphicsDefaultStyle.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -84,6 +83,8 @@ using ::xmloff::token::XML_TEXT_PROPERTIES;
 using ::xmloff::token::XML_GRAPHIC_PROPERTIES;
 using ::xmloff::token::XML_PARAGRAPH_PROPERTIES;
 
+using rtl::OUString;
+
 // ---------------------------------------------------------------------
 
 TYPEINIT1( XMLGraphicsDefaultStyle, XMLPropStyleContext );
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 16f52cb..0763757 100644
--- xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -54,10 +54,11 @@
 
 #include "sdpropls.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 TYPEINIT1( XMLShapePropertySetContext, SvXMLPropertySetContext );
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 0d4ec20..a8e3da5 100644
--- xmloff/source/draw/XMLShapeStyleContext.cxx
+++ xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -84,7 +84,6 @@
 
 #include "sdpropls.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -93,6 +92,8 @@ using ::xmloff::token::XML_TEXT_PROPERTIES;
 using ::xmloff::token::XML_GRAPHIC_PROPERTIES;
 using ::xmloff::token::XML_PARAGRAPH_PROPERTIES;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 TYPEINIT1( XMLShapeStyleContext, XMLPropStyleContext );
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 72b49c6..3bf91c4 100644
--- xmloff/source/draw/animationexport.cxx
+++ xmloff/source/draw/animationexport.cxx
@@ -180,7 +180,6 @@
 #include "animations.hxx"
 #include "animationexport.hxx"
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star::animations;
@@ -201,6 +200,9 @@ using ::com::sun::star::beans::NamedValue;
 using ::com::sun::star::container::XEnumerationAccess;
 using ::com::sun::star::container::XEnumeration;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 namespace xmloff
 {
 
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index e8231ef..8b896da 100644
--- xmloff/source/draw/animationimport.cxx
+++ xmloff/source/draw/animationimport.cxx
@@ -168,7 +168,6 @@
 #include "animationimport.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star::beans;
@@ -197,6 +196,8 @@ using ::com::sun::star::container::XEnumeration;
 using ::com::sun::star::lang::XMultiServiceFactory;
 using ::com::sun::star::lang::XInitialization;
 
+using rtl::OUString;
+
 namespace xmloff
 {
 
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index bf1945d..0633493 100644
--- xmloff/source/draw/animexp.cxx
+++ xmloff/source/draw/animexp.cxx
@@ -91,7 +91,6 @@
 #include "anim.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -102,6 +101,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::presentation;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 const struct Effect
 {
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index a872024..ea3c68f 100644
--- xmloff/source/draw/animimp.cxx
+++ xmloff/source/draw/animimp.cxx
@@ -100,7 +100,6 @@
 #include "animimp.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -113,6 +112,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::presentation;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[] =
 {
 	{ XML_NONE,		    EK_none },
diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx
index 05a518a..9a872da 100644
--- xmloff/source/draw/descriptionimp.cxx
+++ xmloff/source/draw/descriptionimp.cxx
@@ -63,7 +63,6 @@
 
 #include "descriptionimp.hxx"
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -74,6 +73,8 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 TYPEINIT1( SdXMLDescriptionContext, SvXMLImportContext );
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 3d51b5f..1f6491e 100644
--- xmloff/source/draw/eventimp.cxx
+++ xmloff/source/draw/eventimp.cxx
@@ -93,7 +93,6 @@
 #include "anim.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -108,6 +107,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 SvXMLEnumMapEntry __READONLY_DATA aXML_EventActions_EnumMap[] =
diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx
index 8d77551..ec6a0d2 100644
--- xmloff/source/draw/layerexp.cxx
+++ xmloff/source/draw/layerexp.cxx
@@ -74,7 +74,6 @@
 #include "layerexp.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::cppu;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -84,6 +83,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
 {
 	Reference< XLayerSupplier > xLayerSupplier( rExport.GetModel(), UNO_QUERY );
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx
index 6a4a9b3..b5e6941 100644
--- xmloff/source/draw/layerimp.cxx
+++ xmloff/source/draw/layerimp.cxx
@@ -82,7 +82,6 @@
 #include <xmloff/xmltoken.hxx>
 #include "XMLStringBufferImportContext.hxx"
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::xmloff::token;
@@ -96,6 +95,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using ::xmloff::token::IsXMLToken;
 
+using rtl::OUString;
+
 class SdXMLLayerContext : public SvXMLImportContext
 {
 public:
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 09cb9da..e618ffa 100644
--- xmloff/source/draw/sdxmlexp.cxx
+++ xmloff/source/draw/sdxmlexp.cxx
@@ -227,7 +227,6 @@
 
 #include "animationexport.hxx"
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -236,6 +235,8 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::presentation;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index f08b035..d623bf2 100644
--- xmloff/source/draw/ximppage.cxx
+++ xmloff/source/draw/ximppage.cxx
@@ -92,13 +92,14 @@
 #include "PropertySetMerger.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::makeAny;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 TYPEINIT1( SdXMLGenericPageContext, SvXMLImportContext );
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index c3f9eee..282b077 100644
--- xmloff/source/draw/ximpshow.cxx
+++ xmloff/source/draw/ximpshow.cxx
@@ -86,7 +86,6 @@
 #include "ximpshow.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -101,6 +100,8 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 ///////////////////////////////////////////////////////////////////////
 
 class ShowsImpImpl
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 75092c9..33a8cd9 100644
--- xmloff/source/draw/ximpstyl.cxx
+++ xmloff/source/draw/ximpstyl.cxx
@@ -143,12 +143,13 @@
 #include "xmlerror.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 //////////////////////////////////////////////////////////////////////////////
 
 class SdXMLDrawingPagePropertySetContext : public SvXMLPropertySetContext
diff --git a/xmloff/source/forms/callbacks.hxx b/xmloff/source/forms/callbacks.hxx
index a8b73d6..030c360 100644
--- xmloff/source/forms/callbacks.hxx
+++ xmloff/source/forms/callbacks.hxx
@@ -48,8 +48,8 @@
 #ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_
 #include <com/sun/star/script/ScriptEventDescriptor.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 class SvXMLImport;
@@ -71,7 +71,7 @@ namespace xmloff
 	{
 	public:
 		virtual SvXMLExport&								getGlobalContext() = 0;
-		virtual ::vos::ORef< SvXMLExportPropertyMapper >	getStylePropertyMapper() = 0;
+		virtual ::rtl::Reference< SvXMLExportPropertyMapper >	getStylePropertyMapper() = 0;
 
 		/** steps through a collection and exports all children of this collection
 		*/
diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx
index 9247c61..7ee056d 100644
--- xmloff/source/forms/formattributes.hxx
+++ xmloff/source/forms/formattributes.hxx
@@ -42,8 +42,8 @@
 #ifndef _SAL_TYPES_H_
 #include <sal/types.h>
 #endif
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
+#ifndef _SALHELPER_SIMPLEREFERENCEOBJECT_HXX_
+#include <salhelper/simplereferenceobject.hxx>
 #endif
 #ifndef _COMPHELPER_STLTYPES_HXX_
 #include <comphelper/stl_types.hxx>
diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx
index d122731..2ec767f 100644
--- xmloff/source/forms/formlayerexport.cxx
+++ xmloff/source/forms/formlayerexport.cxx
@@ -126,7 +126,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLExportPropertyMapper > OFormLayerXMLExport::getStylePropertyMapper()
+	::rtl::Reference< SvXMLExportPropertyMapper > OFormLayerXMLExport::getStylePropertyMapper()
 	{
 		return m_pImpl->getStylePropertyMapper();
 	}
diff --git a/xmloff/source/forms/formlayerimport.cxx b/xmloff/source/forms/formlayerimport.cxx
index 2ac9191..cbe2a35 100644
--- xmloff/source/forms/formlayerimport.cxx
+++ xmloff/source/forms/formlayerimport.cxx
@@ -73,7 +73,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLImportPropertyMapper > OFormLayerXMLImport::getStylePropertyMapper() const
+	::rtl::Reference< SvXMLImportPropertyMapper > OFormLayerXMLImport::getStylePropertyMapper() const
 	{
 		return m_pImpl->getStylePropertyMapper();
 	}
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 0933880..e0f20ad 100644
--- xmloff/source/forms/layerexport.cxx
+++ xmloff/source/forms/layerexport.cxx
@@ -163,13 +163,13 @@ namespace xmloff
 
 		// add our style family to the export context's style pool
 		m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
-		::vos::ORef< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.getBodyPtr() );
-		m_xExportMapper = new OFormExportPropertyMapper( xStylePropertiesMapper.getBodyPtr() );
+		::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get() );
+		m_xExportMapper = new OFormExportPropertyMapper( xStylePropertiesMapper.get() );
 
 		// our style family
 		m_rContext.GetAutoStylePool()->AddFamily(
 			XML_STYLE_FAMILY_CONTROL_ID, token::GetXMLToken(token::XML_PARAGRAPH),
-			m_xExportMapper.getBodyPtr(),
+			m_xExportMapper.get(),
 			::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_CONTROL_PREFIX) )
 		);
 
@@ -247,7 +247,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLExportPropertyMapper > OFormLayerXMLExport_Impl::getStylePropertyMapper()
+	::rtl::Reference< SvXMLExportPropertyMapper > OFormLayerXMLExport_Impl::getStylePropertyMapper()
 	{
 		return m_xExportMapper;
 	}
diff --git a/xmloff/source/forms/layerexport.hxx b/xmloff/source/forms/layerexport.hxx
index 9b36e0b..9f9f18e 100644
--- xmloff/source/forms/layerexport.hxx
+++ xmloff/source/forms/layerexport.hxx
@@ -54,8 +54,8 @@
 #ifndef _XMLOFF_FORMS_IFACECOMPARE_HXX_
 #include "ifacecompare.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 class SvXMLExport;
@@ -102,8 +102,8 @@ namespace xmloff
 		PropertySetBag		m_aIgnoreList;
 
 		// style handling
-		::vos::ORef< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
-		::vos::ORef< SvXMLExportPropertyMapper >	m_xExportMapper;
+		::rtl::Reference< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
+		::rtl::Reference< SvXMLExportPropertyMapper >	m_xExportMapper;
 
 		// we need our own number formats supplier:
 		// Controls which have a number formats do not work with the formats supplier of the document they reside
@@ -203,7 +203,7 @@ namespace xmloff
 		virtual SvXMLExport&								getGlobalContext();
 		virtual ::rtl::OUString								getObjectStyleName(
 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject );
-		virtual ::vos::ORef< SvXMLExportPropertyMapper >	getStylePropertyMapper();
+		virtual ::rtl::Reference< SvXMLExportPropertyMapper >	getStylePropertyMapper();
 
 		/** clear any structures which have been build in the recent <method>examine</method> calls.
 		*/
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index da17b88..d50b131 100644
--- xmloff/source/forms/layerimport.cxx
+++ xmloff/source/forms/layerimport.cxx
@@ -314,8 +314,8 @@ namespace xmloff
 
 		// initialize our style map
 		m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
-		::vos::ORef< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper(getControlStylePropertyMap(), m_xPropertyHandlerFactory.getBodyPtr());
-		m_xImportMapper = new SvXMLImportPropertyMapper(xStylePropertiesMapper.getBodyPtr(), _rImporter);
+		::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper(getControlStylePropertyMap(), m_xPropertyHandlerFactory.get());
+		m_xImportMapper = new SvXMLImportPropertyMapper(xStylePropertiesMapper.get(), _rImporter);
 
 		// 'initialize'
 		m_aCurrentPageIds = m_aControlIds.end();
@@ -518,7 +518,7 @@ namespace xmloff
 	}
 
 	//---------------------------------------------------------------------
-	::vos::ORef< SvXMLImportPropertyMapper > OFormLayerXMLImport_Impl::getStylePropertyMapper() const
+	::rtl::Reference< SvXMLImportPropertyMapper > OFormLayerXMLImport_Impl::getStylePropertyMapper() const
 	{
 		return m_xImportMapper;
 	}
diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx
index bf1410d..6119b28 100644
--- xmloff/source/forms/layerimport.hxx
+++ xmloff/source/forms/layerimport.hxx
@@ -42,8 +42,8 @@
 #ifndef _COM_SUN_STAR_FORM_XFORMSSUPPLIER2_HPP_
 #include <com/sun/star/form/XFormsSupplier2.hpp>
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 #ifndef _XMLOFF_FORMATTRIBUTES_HXX_
 #include "formattributes.hxx"
@@ -117,8 +117,8 @@ namespace xmloff
 
 	protected:
 		// style handling
-		::vos::ORef< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
-		::vos::ORef< SvXMLImportPropertyMapper >	m_xImportMapper;
+		::rtl::Reference< XMLPropertyHandlerFactory >	m_xPropertyHandlerFactory;
+		::rtl::Reference< SvXMLImportPropertyMapper >	m_xImportMapper;
 
 		DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >, MapString2PropertySet );
 		DECLARE_STL_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >, MapString2PropertySet, ODrawPageCompare, MapDrawPage2Map);
@@ -197,7 +197,7 @@ namespace xmloff
 
 		/** retrieves the property mapper form form related auto styles.
 		*/
-		::vos::ORef< SvXMLImportPropertyMapper > getStylePropertyMapper() const;
+		::rtl::Reference< SvXMLImportPropertyMapper > getStylePropertyMapper() const;
 
 		/** start importing the forms of the given page
 		*/
diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx
index e08a1ca..4f6d13a 100644
--- xmloff/source/forms/propertyimport.hxx
+++ xmloff/source/forms/propertyimport.hxx
@@ -42,8 +42,8 @@
 #ifndef _XMLOFF_FORMATTRIBUTES_HXX_
 #include "formattributes.hxx"
 #endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
 #endif
 
 #ifndef _COMPHELPER_STLTYPES_HXX_
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 1e398cf..2a80a37 100644
--- xmloff/source/meta/xmlversion.cxx
+++ xmloff/source/meta/xmlversion.cxx
@@ -86,7 +86,8 @@ class SvStringsDtor;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
-using namespace ::rtl;
+
+using rtl::OUString;
 
 // ------------------------------------------------------------------------
 
diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx
index 247f5a3..11efad8 100644
--- xmloff/source/script/xmlscripti.cxx
+++ xmloff/source/script/xmlscripti.cxx
@@ -46,7 +46,6 @@
 
 #include <com/sun/star/document/XEventsSupplier.hpp>
 
-using namespace rtl;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
@@ -55,6 +54,7 @@ using namespace com::sun::star::document;
 using namespace com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
 
 // =============================================================================
 // XMLScriptChildContext: context for <office:script> element
diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx
index e7abcbd..71bb69c 100644
--- xmloff/source/style/XMLBackgroundImageContext.cxx
+++ xmloff/source/style/XMLBackgroundImageContext.cxx
@@ -70,13 +70,14 @@
 #include "XMLBackgroundImageContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::io;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 enum SvXMLTokenMapAttrs
 {
 	XML_TOK_BGIMG_HREF,
diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx
index 7ca7ae4..fbaf4d9 100644
--- xmloff/source/style/XMLFontStylesContext.cxx
+++ xmloff/source/style/XMLFontStylesContext.cxx
@@ -66,7 +66,6 @@
 #include <xmloff/XMLFontStylesContext.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -76,6 +75,7 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::awt;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
 
 #define XML_STYLE_FAMILY_FONT 1
 
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index bf1b431..d765d35 100644
--- xmloff/source/style/XMLPageExport.cxx
+++ xmloff/source/style/XMLPageExport.cxx
@@ -91,7 +91,6 @@
 #include "PageMasterExportPropMapper.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -99,6 +98,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
 
 //______________________________________________________________________________
 
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index c6daaab..65d477e 100644
--- xmloff/source/style/prstylei.cxx
+++ xmloff/source/style/prstylei.cxx
@@ -85,7 +85,6 @@
 #include "xmlerror.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -95,6 +94,7 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
 
 void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
 										const OUString& rLocalName,
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index cd5cf0e..2f14521 100644
--- xmloff/source/style/styleexp.cxx
+++ xmloff/source/style/styleexp.cxx
@@ -114,7 +114,6 @@
 #include <xmloff/XMLEventExport.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -125,6 +124,8 @@ using namespace ::xmloff::token;
 
 using ::com::sun::star::document::XEventsSupplier;
 
+using rtl::OUString;
+
 XMLStyleExport::XMLStyleExport(
 		SvXMLExport& rExp,
 		const ::rtl::OUString& rPoolStyleName,
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index a443022..21ae215 100644
--- xmloff/source/style/xmlexppr.cxx
+++ xmloff/source/style/xmlexppr.cxx
@@ -108,7 +108,6 @@
 #include <svtools/svstdarr.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
@@ -116,6 +115,9 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 #define GET_PROP_TYPE( f ) static_cast<sal_uInt16>((f & XML_TYPE_PROP_MASK) >> XML_TYPE_PROP_SHIFT)
 
 struct XMLPropTokens_Impl
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 16f0842..59300dd 100644
--- xmloff/source/style/xmlimppr.cxx
+++ xmloff/source/style/xmlimppr.cxx
@@ -109,7 +109,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::xml;
 using namespace ::com::sun::star::xml::sax;
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::xmloff::token;
 using ::com::sun::star::lang::IllegalArgumentException;
@@ -117,6 +116,8 @@ using ::com::sun::star::lang::WrappedTargetException;
 using ::com::sun::star::beans::UnknownPropertyException;
 using ::com::sun::star::beans::PropertyVetoException;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 SvXMLImportPropertyMapper::SvXMLImportPropertyMapper(
         const UniReference< XMLPropertySetMapper >& rMapper,
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index da60dae..d2a7b44 100644
--- xmloff/source/style/xmlnume.cxx
+++ xmloff/source/style/xmlnume.cxx
@@ -115,7 +115,6 @@
 #include <vcl/vclenum.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -124,6 +123,9 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance";
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering";
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName";
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 77b3022..32eb5c1 100644
--- xmloff/source/style/xmlnumi.cxx
+++ xmloff/source/style/xmlnumi.cxx
@@ -112,7 +112,7 @@
 
 #define _SVSTDARR_USHORTS
 #include <svtools/svstdarr.hxx>
-using namespace ::rtl;
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -124,6 +124,9 @@ using namespace ::com::sun::star::frame;
 using namespace ::xmloff::token;
 using namespace ::com::sun::star::io;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] =
 		"SymbolTextDistance";
 static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] =
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 5a10bc2..d30c092 100644
--- xmloff/source/style/xmlstyle.cxx
+++ xmloff/source/style/xmlstyle.cxx
@@ -150,13 +150,14 @@
 #include "PageMasterImportPropMapper.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::style;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 // ---------------------------------------------------------------------
 
 static __FAR_DATA SvXMLTokenMapEntry aStyleStylesElemTokenMap[] =
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx
index ceaba0d..dbbb3ef 100644
--- xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -62,12 +62,13 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 XMLCalculationSettingsContext::XMLCalculationSettingsContext( SvXMLImport& rImport, 
 									sal_uInt16 p_nPrefix,
 									const ::rtl::OUString& rLocalName,
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index e6cfd53..3154d4b 100644
--- xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -108,7 +108,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
@@ -116,6 +115,9 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 //
 //  XMLFootnoteConfigHelper
 //
diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx
index d9d2e2d..23e18f1 100644
--- xmloff/source/text/XMLFootnoteImportContext.cxx
+++ xmloff/source/text/XMLFootnoteImportContext.cxx
@@ -101,8 +101,6 @@
 #endif
 
 
-
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::lang;
@@ -110,6 +108,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1(XMLFootnoteImportContext, SvXMLImportContext);
 
 const sal_Char sAPI_service_footnote[] = "com.sun.star.text.Footnote";
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index 257e375..b0e5e74 100644
--- xmloff/source/text/XMLTextColumnsContext.cxx
+++ xmloff/source/text/XMLTextColumnsContext.cxx
@@ -76,7 +76,6 @@
 #define _SVSTDARR_USHORTS
 #include <svtools/svstdarr.hxx>
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -85,6 +84,8 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 enum SvXMLTokenMapAttrs
 {
 	XML_TOK_COLUMN_WIDTH,
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index cdef0b9..919cb8b 100644
--- xmloff/source/text/XMLTextColumnsExport.cxx
+++ xmloff/source/text/XMLTextColumnsExport.cxx
@@ -80,9 +80,10 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
-using namespace ::rtl;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
 	rExport( rExp ),
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 54b2c33..bb44fc4 100644
--- xmloff/source/text/XMLTextFrameContext.cxx
+++ xmloff/source/text/XMLTextFrameContext.cxx
@@ -148,7 +148,6 @@
 #include <map>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -161,6 +160,8 @@ using namespace ::com::sun::star::document;
 using namespace ::xmloff::token;
 using ::com::sun::star::document::XEventsSupplier;
 
+using rtl::OUString;
+
 #define XML_TEXT_FRAME_TEXTBOX 1
 #define XML_TEXT_FRAME_GRAPHIC 2
 #define XML_TEXT_FRAME_OBJECT 3
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index dea13c7..0ad7909 100644
--- xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -63,13 +63,14 @@
 #include <txtparaimphint.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLTextFrameHyperlinkContext, SvXMLImportContext );
 
 XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext(
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 6bb4dc1..6b133d8 100644
--- xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -59,7 +59,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -70,6 +69,7 @@ using namespace ::com::sun::star::beans;
 //using namespace ::com::sun::star::lang;
 //using namespace ::com::sun::star::text;
 
+using rtl::OUString;
 
 TYPEINIT1( XMLTextHeaderFooterContext, SvXMLImportContext );
 
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index a86d1ae..c80c04a 100644
--- xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -69,13 +69,14 @@
 #include <xmloff/xmlexp.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::style;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 int XMLTextListAutoStylePoolNameCmp_Impl( const OUString& r1,
 									 	  const OUString& r2 )
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 0325720..65428f8 100644
--- xmloff/source/text/XMLTextListBlockContext.cxx
+++ xmloff/source/text/XMLTextListBlockContext.cxx
@@ -76,7 +76,6 @@
 #include "XMLTextListBlockContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
@@ -84,6 +83,8 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLTextListBlockContext, SvXMLImportContext );
 
 XMLTextListBlockContext::XMLTextListBlockContext(
diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx
index af91d90..4d8be03 100644
--- xmloff/source/text/XMLTextListItemContext.cxx
+++ xmloff/source/text/XMLTextListItemContext.cxx
@@ -67,11 +67,12 @@
 #include "XMLTextListItemContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLTextListItemContext, SvXMLImportContext );
 
 XMLTextListItemContext::XMLTextListItemContext(
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 8a7add5..b22461d 100644
--- xmloff/source/text/XMLTextMarkImportContext.cxx
+++ xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -89,7 +89,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -97,6 +96,8 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
+
+using rtl::OUString;
 	
 TYPEINIT1( XMLTextMarkImportContext, SvXMLImportContext);
 
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index fffb133..1b7ec48 100644
--- xmloff/source/text/XMLTextMasterPageContext.cxx
+++ xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -71,7 +71,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -83,6 +82,8 @@ using namespace ::com::sun::star::lang;
 //using namespace ::com::sun::star::text;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 Reference < XStyle > XMLTextMasterPageContext::Create()
 {
 	Reference < XStyle > xNewStyle;
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index 267a471..3793775 100644
--- xmloff/source/text/XMLTextMasterPageExport.cxx
+++ xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -64,7 +64,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
diff --git a/xmloff/source/text/XMLTextMasterStylesContext.cxx b/xmloff/source/text/XMLTextMasterStylesContext.cxx
index 3b8a38e..9358332 100644
--- xmloff/source/text/XMLTextMasterStylesContext.cxx
+++ xmloff/source/text/XMLTextMasterStylesContext.cxx
@@ -61,10 +61,11 @@
 #include <xmloff/XMLTextMasterStylesContext.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 using ::xmloff::token::IsXMLToken;
 using ::xmloff::token::XML_MASTER_PAGE;
 
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index e419c76..2693a5d 100644
--- xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -69,7 +69,6 @@
 #include "XMLTextShapeImportHelper.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::drawing;
@@ -78,6 +77,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 XMLTextShapeImportHelper::XMLTextShapeImportHelper(
 		SvXMLImport& rImp ) :
 	XMLShapeImportHelper( rImp, rImp.GetModel(),
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 3a50524..27cc309 100644
--- xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -74,7 +74,6 @@
 #include <xmloff/XMLTextShapeStyleContext.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
@@ -82,6 +81,8 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 class XMLTextShapePropertySetContext_Impl : public XMLShapePropertySetContext
 {
 public:
diff --git a/xmloff/source/text/txtdropi.cxx b/xmloff/source/text/txtdropi.cxx
index 5dd2cdf..7f9e3a9 100644
--- xmloff/source/text/txtdropi.cxx
+++ xmloff/source/text/txtdropi.cxx
@@ -61,12 +61,12 @@
 #include <xmloff/xmltoken.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
 
 enum SvXMLTokenMapDropAttrs
 {
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index d2a30af..d27ff50 100644
--- xmloff/source/text/txtexppr.cxx
+++ xmloff/source/text/txtexppr.cxx
@@ -78,7 +78,6 @@
 #include "XMLSectionFootnoteConfigExport.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -86,6 +85,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::awt;
 
+using rtl::OUString;
+
 void XMLTextExportPropertySetMapper::handleElementItem(
         SvXMLExport& rExp,
 		const XMLPropertyState& rProperty,
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index ea93dd9..6af4bdd 100644
--- xmloff/source/text/txtflde.cxx
+++ xmloff/source/text/txtflde.cxx
@@ -210,7 +210,6 @@
 
 #include <vector>
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -223,6 +222,8 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::container;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 static sal_Char __READONLY_DATA FIELD_SERVICE_SENDER[] = "ExtendedUser";
 static sal_Char __READONLY_DATA FIELD_SERVICE_AUTHOR[] = "Author";
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index f763072..5daef73 100644
--- xmloff/source/text/txtfldi.cxx
+++ xmloff/source/text/txtfldi.cxx
@@ -203,7 +203,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -214,6 +213,8 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 //
 // SO API string constants
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
index 1a98fb0..f19f216 100644
--- xmloff/source/text/txtftne.cxx
+++ xmloff/source/text/txtftne.cxx
@@ -130,7 +130,6 @@
 #include <xmloff/txtparae.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -139,6 +138,8 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::container;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
 void XMLTextParagraphExport::exportTextFootnote(
 	const Reference<XPropertySet> & rPropSet,
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 9039b4a..ad51154 100644
--- xmloff/source/text/txtimp.cxx
+++ xmloff/source/text/txtimp.cxx
@@ -198,7 +198,6 @@
 #endif
 // <--
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -213,6 +212,9 @@ using namespace ::xmloff::token;
 using ::com::sun::star::util::DateTime;
 using namespace ::com::sun::star::ucb;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 #if SUPD > 632 || DVO_TEST
 using ::comphelper::UStringLess;
 #endif
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 2b14998..6503189 100644
--- xmloff/source/text/txtparae.cxx
+++ xmloff/source/text/txtparae.cxx
@@ -267,7 +267,6 @@
 #endif
 
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -282,6 +281,9 @@ using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::frame;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 typedef OUString *OUStringPtr;
 SV_DECL_PTRARR_DEL( OUStrings_Impl, OUStringPtr, 20, 10 )
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index dafa2a8..6852acf 100644
--- xmloff/source/text/txtparai.cxx
+++ xmloff/source/text/txtparai.cxx
@@ -144,7 +144,6 @@ SV_IMPL_PTRARR( XMLHints_Impl, XMLHint_ImplPtr )
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
@@ -154,6 +153,9 @@ using namespace ::xmloff::token;
 using ::com::sun::star::container::XEnumerationAccess;
 using ::com::sun::star::container::XEnumeration;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 TYPEINIT1( XMLCharContext, SvXMLImportContext );
 
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index 6826c0a..446771f 100644
--- xmloff/source/text/txtparaimphint.hxx
+++ xmloff/source/text/txtparaimphint.hxx
@@ -60,12 +60,13 @@
 #include <xmloff/XMLEventsImportContext.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 // ---------------------------------------------------------------------
 
 #define XML_HINT_STYLE 1
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx
index cb103e6..282ff39 100644
--- xmloff/source/text/txtstyle.cxx
+++ xmloff/source/text/txtstyle.cxx
@@ -99,7 +99,6 @@
 //#include <xmloff/styleexp.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::style;
@@ -107,6 +106,9 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 void XMLTextParagraphExport::exportStyleAttributes(
 		const ::com::sun::star::uno::Reference<
 				::com::sun::star::style::XStyle > & rStyle )
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 2da08f1..d181cd5 100644
--- xmloff/source/text/txtstyli.cxx
+++ xmloff/source/text/txtstyli.cxx
@@ -104,7 +104,6 @@
 #include <utility>
 #include <vector>
 
-using namespace ::rtl;
 using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -114,6 +113,8 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::container;
+
+using rtl::OUString;
 //using namespace ::com::sun::star::text;
 using namespace ::xmloff::token;
 
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index ac2b9d3..99febc3 100644
--- xmloff/source/text/txtvfldi.cxx
+++ xmloff/source/text/txtvfldi.cxx
@@ -158,7 +158,6 @@ static const sal_Char sAPI_sequence_value[]		= "SequenceValue";
 static const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage";
 
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -166,6 +165,9 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::style;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
+
 
 
 //
diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx
index c2c265c..ad17970 100644
--- xmloff/source/transform/ChartOASISTContext.cxx
+++ xmloff/source/transform/ChartOASISTContext.cxx
@@ -58,11 +58,12 @@
 #include "TransformerBase.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 // -----------------------------------------------------------------------------
 
 TYPEINIT1( XMLChartOASISTransformerContext, XMLTransformerContext );
diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx
index 9d2d291..130d387 100644
--- xmloff/source/transform/ChartOOoTContext.cxx
+++ xmloff/source/transform/ChartOOoTContext.cxx
@@ -58,11 +58,12 @@
 #include "TransformerBase.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 // -----------------------------------------------------------------------------
 
 TYPEINIT1( XMLChartOOoTransformerContext, XMLTransformerContext );
diff --git a/xmloff/source/transform/ControlOOoTContext.cxx b/xmloff/source/transform/ControlOOoTContext.cxx
index 7d2df74..7df6df8 100644
--- xmloff/source/transform/ControlOOoTContext.cxx
+++ xmloff/source/transform/ControlOOoTContext.cxx
@@ -61,11 +61,12 @@
 #include "TransformerBase.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLControlOOoTransformerContext, XMLTransformerContext );
 
 XMLControlOOoTransformerContext::XMLControlOOoTransformerContext( 
diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx
index 2e491e3..cfcd202 100644
--- xmloff/source/transform/DlgOASISTContext.cxx
+++ xmloff/source/transform/DlgOASISTContext.cxx
@@ -58,11 +58,12 @@
 #include "TransformerBase.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 // -----------------------------------------------------------------------------
 
 TYPEINIT1( XMLDlgOASISTransformerContext, XMLTransformerContext);
diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx
index 6b1142b..aeffe8b 100644
--- xmloff/source/transform/DocumentTContext.cxx
+++ xmloff/source/transform/DocumentTContext.cxx
@@ -72,12 +72,13 @@
 #include "DocumentTContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::xmloff::token;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::beans;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLDocumentTransformerContext, XMLTransformerContext );
 
 XMLDocumentTransformerContext::XMLDocumentTransformerContext( XMLTransformerBase& rImp, 
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index c05cfa9..22f0022 100644
--- xmloff/source/transform/EventOASISTContext.cxx
+++ xmloff/source/transform/EventOASISTContext.cxx
@@ -74,11 +74,12 @@
 
 #include <hash_map>
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 class XMLTransformerOASISEventMap_Impl:
 	public ::std::hash_map< NameKey_Impl, ::rtl::OUString, 
 						    NameHash_Impl, NameHash_Impl >
diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx
index ca78281..10701f9 100644
--- xmloff/source/transform/FrameOASISTContext.cxx
+++ xmloff/source/transform/FrameOASISTContext.cxx
@@ -61,11 +61,12 @@
 #include "TransformerBase.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLFrameOASISTransformerContext, XMLTransformerContext );
 
 sal_Bool XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(
diff --git a/xmloff/source/transform/PersAttrListTContext.cxx b/xmloff/source/transform/PersAttrListTContext.cxx
index a7ad07d..c48d02c 100644
--- xmloff/source/transform/PersAttrListTContext.cxx
+++ xmloff/source/transform/PersAttrListTContext.cxx
@@ -56,11 +56,12 @@
 #include "PersAttrListTContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLPersAttrListTContext, XMLTransformerContext );
 
 void XMLPersAttrListTContext::AddAttribute(
diff --git a/xmloff/source/transform/ProcAddAttrTContext.cxx b/xmloff/source/transform/ProcAddAttrTContext.cxx
index de6eaf9..743640a 100644
--- xmloff/source/transform/ProcAddAttrTContext.cxx
+++ xmloff/source/transform/ProcAddAttrTContext.cxx
@@ -49,11 +49,12 @@
 #include <xmloff/nmspmap.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLProcAddAttrTransformerContext, XMLProcAttrTransformerContext);
 
 XMLProcAddAttrTransformerContext::XMLProcAddAttrTransformerContext( 
diff --git a/xmloff/source/transform/ProcAttrTContext.cxx b/xmloff/source/transform/ProcAttrTContext.cxx
index 1f63425..ad82a26 100644
--- xmloff/source/transform/ProcAttrTContext.cxx
+++ xmloff/source/transform/ProcAttrTContext.cxx
@@ -52,11 +52,12 @@
 #include <xmloff/nmspmap.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLProcAttrTransformerContext, XMLTransformerContext );
 
 XMLProcAttrTransformerContext::XMLProcAttrTransformerContext( 
diff --git a/xmloff/source/transform/RenameElemTContext.cxx b/xmloff/source/transform/RenameElemTContext.cxx
index 2a040f8..d66ad68 100644
--- xmloff/source/transform/RenameElemTContext.cxx
+++ xmloff/source/transform/RenameElemTContext.cxx
@@ -49,10 +49,11 @@
 #include <xmloff/nmspmap.hxx>
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 TYPEINIT1( XMLRenameElemTransformerContext, XMLTransformerContext );
 
 XMLRenameElemTransformerContext::XMLRenameElemTransformerContext( 
diff --git a/xmloff/source/transform/TransformerContext.cxx b/xmloff/source/transform/TransformerContext.cxx
index 500e8ef..1a0a912 100644
--- xmloff/source/transform/TransformerContext.cxx
+++ xmloff/source/transform/TransformerContext.cxx
@@ -60,10 +60,11 @@
 #include "TransformerContext.hxx"
 #endif
 
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
+using rtl::OUString;
+
 TYPEINIT0( XMLTransformerContext );
 
 sal_Bool XMLTransformerContext::HasQName( sal_uInt16 nPrefix, 
