summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Duerr <hdu@openoffice.org>2000-11-16 13:11:37 +0000
committerHerbert Duerr <hdu@openoffice.org>2000-11-16 13:11:37 +0000
commit6f9196b5d7ca2d5a1ad2b979ec5ed63912a39a7d (patch)
treec195393bf7c37c35327693564d9ef15d0cff9346 /vcl
parent78430781949cc359b5c980ebba29b616a9b9d2cd (diff)
add SetFontPath()/GetFontPath()
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svapp.cxx35
1 files changed, 32 insertions, 3 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 564ecad71462..f423655ebb30 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svapp.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: cd $ $Date: 2000-11-06 08:52:49 $
+ * last change: $Author: hdu $ $Date: 2000-11-16 14:11:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1359,7 +1359,7 @@ void Application::SetResourcePath( const XubString& rPath )
{
ImplSVData* pSVData = ImplGetSVData();
- // Falls er noch nicht existiert, dann anlegen
+ // if it doesn't exist create a new one
if ( !pSVData->maAppData.mpResPath )
pSVData->maAppData.mpResPath = new XubString( rPath );
else
@@ -1379,6 +1379,35 @@ const XubString& Application::GetResourcePath()
// -----------------------------------------------------------------------
+const String& Application::GetFontPath()
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ if( !pSVData->maAppData.mpFontPath )
+ {
+ if( const char* pFontPath = ::getenv( "SAL_FONTPATH_PRIVATE" ) )
+ pSVData->maAppData.mpFontPath = new String( String::CreateFromAscii( pFontPath ) );
+ }
+
+ if( pSVData->maAppData.mpFontPath )
+ return *(pSVData->maAppData.mpFontPath);
+ return ImplGetSVEmptyStr();
+}
+
+// -----------------------------------------------------------------------
+
+void Application::SetFontPath( const String& rPath )
+{
+ ImplSVData* pSVData = ImplGetSVData();
+
+ // if it doesn't exist create a new one
+ if( !pSVData->maAppData.mpFontPath )
+ pSVData->maAppData.mpFontPath = new String( rPath );
+ else
+ *(pSVData->maAppData.mpFontPath) = rPath;
+}
+
+// -----------------------------------------------------------------------
+
void Application::EnterMultiThread( BOOL bEnter )
{
ImplSVData* pSVData = ImplGetSVData();