Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello, this patch addresses the EasyHack described at
https://bugs.freedesktop.org/show_bug.cgi?id=44988.
This and all my future contributions are licensed under the LGPLv3 / MPL
1.1 or later versions.
Cheers,
Thomas
From ad48bdadaa058ae8ca81f855002f88d5bf07bdb0 Mon Sep 17 00:00:00 2001
From: Thomas Collerton <tom.coll91@gmail.com>
Date: Sun, 22 Jan 2012 12:33:18 +0100
Subject: [PATCH] Remove obsolete BOOTSTRAP defines

---
 tools/inc/tools/fsys.hxx        |    4 ----
 tools/source/fsys/comdep.hxx    |    2 --
 tools/source/fsys/dirent.cxx    |   22 ----------------------
 tools/source/fsys/tdir.cxx      |    2 --
 tools/source/fsys/wntmsc.cxx    |    2 --
 tools/source/stream/strmunx.cxx |    8 --------
 tools/source/stream/strmwnt.cxx |    2 --
 7 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 3d2dfa8..3ec1799 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -425,9 +425,6 @@ public:
     DirEntry&       operator []( size_t nIndex ) const;
 };
 
-// we don't need this stuff for bootstraping
-#ifndef BOOTSTRAP
-
 //========================================================================
 
 /** FSysRedirector is an abstract base class for a hook to redirect
@@ -464,7 +461,6 @@ public:
     static void             DoRedirect( String &rPath );
 };
 
-#endif // BOOTSTRP
 
 #if defined(DBG_UTIL)
 void FSysTest();
diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx
index 1728116..193041b 100644
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -76,10 +76,8 @@ struct DirReader_Impl
                     bReady ( sal_False ),
                     bInUse( sal_False )
                 {
-#ifndef BOOTSTRAP
                     // Redirection
                     FSysRedirector::DoRedirect( aPath );
-#endif
 
                     // nur den String der Memer-Var nehmen!
 
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index a0d3d8e..38138f8 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -128,8 +128,6 @@ int Sys2SolarError_Impl( int nSysErr )
 
 //--------------------------------------------------------------------
 
-#ifndef BOOTSTRAP
-
 FSysRedirector* FSysRedirector::_pRedirector = 0;
 sal_Bool FSysRedirector::_bEnabled = sal_True;
 #ifdef UNX
@@ -184,8 +182,6 @@ void FSysRedirector::DoRedirect( String &rPath )
         return;
 }
 
-#endif // BOOTSTRAP
-
 //--------------------------------------------------------------------
 
 class DirEntryStack
@@ -738,11 +734,9 @@ DirEntry::DirEntry( const String& rInitName, FSysPathStyle eStyle )
     rtl::OString aTmpName(rtl::OUStringToOString(rInitName, osl_getThreadTextEncoding()));
     if (comphelper::string::matchIgnoreAsciiCaseL(aTmpName, RTL_CONSTASCII_STRINGPARAM("file:")))
     {
-#ifndef BOOTSTRAP
         DBG_WARNING( "File URLs are not permitted but accepted" );
         aTmpName = rtl::OUStringToOString(INetURLObject( rInitName ).PathToFileName(), 
osl_getThreadTextEncoding());
                 eStyle = FSYS_STYLE_HOST;
-#endif // BOOTSTRAP
     }
     else
     {
@@ -792,11 +786,9 @@ DirEntry::DirEntry( const rtl::OString& rInitName, FSysPathStyle eStyle )
     rtl::OString aTmpName( rInitName );
     if (comphelper::string::matchIgnoreAsciiCaseL(aTmpName, RTL_CONSTASCII_STRINGPARAM("file:")))
     {
-#ifndef BOOTSTRAP
         DBG_WARNING( "File URLs are not permitted but accepted" );
         aTmpName = rtl::OUStringToOString(INetURLObject( rInitName ).PathToFileName(), 
osl_getThreadTextEncoding());
         eStyle = FSYS_STYLE_HOST;
-#endif
     }
 #ifdef DBG_UTIL
     else
@@ -916,10 +908,8 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize 
)
 
 sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
 {
-#ifndef BOOTSTRAP
     static osl::Mutex aLocalMutex;
     osl::MutexGuard aGuard( aLocalMutex );
-#endif
         if ( !IsValid() )
                 return sal_False;
 
@@ -968,9 +958,7 @@ sal_Bool DirEntry::First()
     FSysFailOnErrorImpl();
 
         String    aUniPathName( GetPath().GetFull() );
-#ifndef BOOTSTRAP
         FSysRedirector::DoRedirect( aUniPathName );
-#endif
         rtl::OString aPathName(rtl::OUStringToOString(aUniPathName, osl_getThreadTextEncoding()));
 
         DIR *pDir = opendir(aPathName.getStr());
@@ -1724,9 +1712,7 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const
                                 // Redirect
                 String aRetVal(ret_val, osl_getThreadTextEncoding());
                                 String aRedirected (aRetVal);
-#ifndef BOOTSTRAP
                                 FSysRedirector::DoRedirect( aRedirected );
-#endif
                                 if ( FSYS_KIND_DIR == eKind )
                                 {
                                                 if (0 == 
_mkdir(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr()))
@@ -1823,9 +1809,7 @@ sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const
                         {
                                 FSysFailOnErrorImpl();
                                 String aDirName(pNewDir->GetFull());
-#ifndef BOOTSTRAP
                                 FSysRedirector::DoRedirect( aDirName );
-#endif
                                 rtl::OString bDirName(rtl::OUStringToOString(aDirName, 
osl_getThreadTextEncoding()));
 
 #ifdef WIN32
@@ -1911,15 +1895,11 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
         FSysFailOnErrorImpl();
         String aFrom( GetFull() );
 
-#ifndef BOOTSTRAP
         FSysRedirector::DoRedirect(aFrom);
-#endif
 
         String aTo( aDest.GetFull() );
 
-#ifndef BOOTSTRAP
         FSysRedirector::DoRedirect(aTo);
-#endif
 
         rtl::OString bFrom(rtl::OUStringToOString(aFrom, osl_getThreadTextEncoding()));
         rtl::OString bTo(rtl::OUStringToOString(aTo, osl_getThreadTextEncoding()));
@@ -2058,9 +2038,7 @@ FSysError DirEntry::Kill(  FSysAction nActions ) const
 
         // Name als doppelt 0-terminierter String
         String aTmpName( GetFull() );
-#ifndef BOOTSTRAP
         FSysRedirector::DoRedirect( aTmpName );
-#endif
         rtl::OString bTmpName(rtl::OUStringToOString(aTmpName, osl_getThreadTextEncoding()));
 
         char *pName = new char[bTmpName.getLength()+2];
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index 0747c70..c04e6a5 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -310,11 +310,9 @@ void Dir::Reset()
         }
     }
 
-#ifndef BOOTSTRAP
     // ggf. einen neuen Reader aufsetzen
     if ( !pReader )
         pReader = new DirReader_Impl( *this );
-#endif
 
     // gibt es das zu oeffnende Verzeichnis ueberhaupt?
 #if !defined(UNX)   //explanation: see DirReader_Impl::Read() in unx.cxx
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 361474d..962fae3 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -666,9 +666,7 @@ sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool bForceAccess )
 
         // Redirect
         String aPath( rDirEntry.GetFull() );
-#ifndef BOOTSTRAP
         FSysRedirector::DoRedirect( aPath );
-#endif
         DirEntry aDirEntry( aPath );
 
         // ist ein Medium im Laufwerk?
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 031aaa5..3709f00 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -58,9 +58,7 @@ using namespace osl;
 // - InternalLock -
 // ----------------
 
-#ifndef BOOTSTRAP
 namespace { struct LockMutex : public rtl::Static< osl::Mutex, LockMutex > {}; }
-#endif
 
 class InternalStreamLock
 {
@@ -122,9 +120,7 @@ InternalStreamLock::~InternalStreamLock()
 
 sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream )
 {
-#ifndef BOOTSTRAP
     osl::MutexGuard aGuard( LockMutex::get() );
-#endif
     osl::DirectoryItem aItem;
     if (osl::DirectoryItem::get( pStream->GetFileName(), aItem) != osl::FileBase::E_None )
     {
@@ -181,9 +177,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr
 
 void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream )
 {
-#ifndef BOOTSTRAP
     osl::MutexGuard aGuard( LockMutex::get() );
-#endif
     InternalStreamLock* pLock = NULL;
     InternalStreamLockList &rLockList = LockList::get();
     if( nStart == 0 && nEnd == 0 )
@@ -693,9 +687,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
 //    !!! DirEntry aDirEntry( rFilename );
 //    !!! aFilename = aDirEntry.GetFull();
     aFilename = rFilename;
-#ifndef BOOTSTRAP
     FSysRedirector::DoRedirect( aFilename );
-#endif
     rtl::OString aLocalFilename(rtl::OUStringToOString(aFilename, osl_getThreadTextEncoding()));
 
 #ifdef DBG_UTIL
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 4ca353d..c1c6f13 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -396,9 +396,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
     //    !!! aFilename = aDirEntry.GetFull();
     aFilename = aParsedFilename;
     rtl::OString aFileNameA(rtl::OUStringToOString(aFilename, osl_getThreadTextEncoding()));
-#ifndef BOOTSTRAP
     FSysRedirector::DoRedirect( aFilename );
-#endif
     SetLastError( ERROR_SUCCESS );  // ggf. durch Redirector geaendert!
 
     DWORD   nOpenAction;
-- 
1.7.8.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.