summaryrefslogtreecommitdiff
path: root/vcl/unx/headless
diff options
context:
space:
mode:
authorDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-12-09 10:13:55 +0100
committerDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-12-09 10:13:55 +0100
commit9103c81b03961788743d6248099f6a7f35f735d9 (patch)
tree693b2ab70bacc925b9dbf01a2ed0db5e0911d7f8 /vcl/unx/headless
parent38440ad6b24f618923a48d722a861f78c1715be5 (diff)
parenta5509a421f2f3d43aad1ba5d32e6c7bf1c015b3b (diff)
mib19: rebase to DEV300m95
Diffstat (limited to 'vcl/unx/headless')
-rw-r--r--vcl/unx/headless/svpgdi.hxx4
-rw-r--r--vcl/unx/headless/svpinst.cxx39
-rw-r--r--vcl/unx/headless/svpinst.hxx13
-rw-r--r--vcl/unx/headless/svppspgraphics.cxx11
-rw-r--r--vcl/unx/headless/svppspgraphics.hxx4
-rw-r--r--vcl/unx/headless/svptext.cxx17
6 files changed, 38 insertions, 50 deletions
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index ca1af87f8862..93ec080d0136 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -86,9 +86,9 @@ public:
virtual void SetTextColor( SalColor nSalColor );
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
- virtual ImplFontCharMap* GetImplFontCharMap() const;
+ virtual const ImplFontCharMap* GetImplFontCharMap() const;
virtual void GetDevFontList( ImplDevFontList* );
virtual void GetDevFontSubstList( OutputDevice* );
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 466b56868900..fc788b2a0530 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -302,7 +302,7 @@ vos::IMutex* SvpSalInstance::GetYieldMutex()
ULONG SvpSalInstance::ReleaseYieldMutex()
{
if ( m_aYieldMutex.GetThreadId() ==
- NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ vos::OThread::getCurrentIdentifier() )
{
ULONG nCount = m_aYieldMutex.GetAcquireCount();
ULONG n = nCount;
@@ -327,6 +327,19 @@ void SvpSalInstance::AcquireYieldMutex( ULONG nCount )
}
}
+bool SvpSalInstance::CheckYieldMutex()
+{
+ bool bRet = true;
+
+ if ( m_aYieldMutex.GetThreadId() !=
+ vos::OThread::getCurrentIdentifier() )
+ {
+ bRet = false;
+ }
+
+ return bRet;
+}
+
void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// first, check for already queued events.
@@ -419,24 +432,6 @@ bool SvpSalInstance::AnyInput( USHORT nType )
return false;
}
-SalMenu* SvpSalInstance::CreateMenu( BOOL )
-{
- return NULL;
-}
-
-void SvpSalInstance::DestroyMenu( SalMenu* )
-{
-}
-
-SalMenuItem* SvpSalInstance::CreateMenuItem( const SalItemParams* )
-{
- return NULL;
-}
-
-void SvpSalInstance::DestroyMenuItem( SalMenuItem* )
-{
-}
-
SalSession* SvpSalInstance::CreateSalSession()
{
return NULL;
@@ -464,13 +459,13 @@ SvpSalYieldMutex::SvpSalYieldMutex()
void SvpSalYieldMutex::acquire()
{
OMutex::acquire();
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
}
void SvpSalYieldMutex::release()
{
- if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ if ( mnThreadId == vos::OThread::getCurrentIdentifier() )
{
if ( mnCount == 1 )
mnThreadId = 0;
@@ -483,7 +478,7 @@ sal_Bool SvpSalYieldMutex::tryToAcquire()
{
if ( OMutex::tryToAcquire() )
{
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
return sal_True;
}
diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
index 284a2d11cd82..02d5e3fa9494 100644
--- a/vcl/unx/headless/svpinst.hxx
+++ b/vcl/unx/headless/svpinst.hxx
@@ -46,11 +46,11 @@
// SalYieldMutex
// -------------------------------------------------------------------------
-class SvpSalYieldMutex : public NAMESPACE_VOS(OMutex)
+class SvpSalYieldMutex : public vos::OMutex
{
protected:
ULONG mnCount;
- NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
+ vos::OThread::TThreadIdentifier mnThreadId;
public:
SvpSalYieldMutex();
@@ -60,7 +60,7 @@ public:
virtual sal_Bool tryToAcquire();
ULONG GetAcquireCount() const { return mnCount; }
- NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
+ vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// ---------------
@@ -176,6 +176,7 @@ public:
virtual vos::IMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
+ virtual bool CheckYieldMutex();
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
@@ -183,12 +184,6 @@ public:
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual bool AnyInput( USHORT nType );
- // Menues
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* pMenu);
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* pItem );
-
// may return NULL to disable session management
virtual SalSession* CreateSalSession();
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index 6da09b38023c..c7b1f4f41fca 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -683,16 +683,13 @@ void PspGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
DrawPrinterLayout( rLayout, *m_pPrinterGfx, true );
}
-ImplFontCharMap* PspGraphics::GetImplFontCharMap() const
+const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const
{
- // TODO: get ImplFontCharMap directly from fonts
if( !m_pServerFont[0] )
return NULL;
- CmapResult aCmapResult;
- if( !m_pServerFont[0]->GetFontCodeRanges( aCmapResult ) )
- return NULL;
- return new ImplFontCharMap( aCmapResult );
+ const ImplFontCharMap* pIFCMap = m_pServerFont[0]->GetImplFontCharMap();
+ return pIFCMap;
}
USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
@@ -792,7 +789,7 @@ void PspGraphics::GetDevFontSubstList( OutputDevice* pOutDev )
}
}
-void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric )
+void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
{
const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
psp::PrintFontInfo aInfo;
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index 063dff34c3c2..138198239621 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -105,9 +105,9 @@ public:
virtual void SetTextColor( SalColor nSalColor );
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
- virtual ImplFontCharMap* GetImplFontCharMap() const;
+ virtual const ImplFontCharMap* GetImplFontCharMap() const;
virtual void GetDevFontList( ImplDevFontList* );
virtual void GetDevFontSubstList( OutputDevice* );
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx
index ecb8b11b7e04..dff1fd4d6ca7 100644
--- a/vcl/unx/headless/svptext.cxx
+++ b/vcl/unx/headless/svptext.cxx
@@ -240,12 +240,15 @@ USHORT SvpSalGraphics::SetFont( ImplFontSelectData* pIFSD, int nFallbackLevel )
// ---------------------------------------------------------------------------
-void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric )
+void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel )
{
- if( m_pServerFont[0] != NULL )
+ if( nFallbackLevel >= MAX_FALLBACK )
+ return;
+
+ if( m_pServerFont[nFallbackLevel] != NULL )
{
long rDummyFactor;
- m_pServerFont[0]->FetchFontMetric( *pMetric, rDummyFactor );
+ m_pServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor );
}
}
@@ -269,15 +272,13 @@ ULONG SvpSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs )
// ---------------------------------------------------------------------------
-ImplFontCharMap* SvpSalGraphics::GetImplFontCharMap() const
+const ImplFontCharMap* SvpSalGraphics::GetImplFontCharMap() const
{
if( !m_pServerFont[0] )
return NULL;
- CmapResult aCmapResult;
- if( !m_pServerFont[0]->GetFontCodeRanges( aCmapResult ) )
- return NULL;
- return new ImplFontCharMap( aCmapResult );
+ const ImplFontCharMap* pIFCMap = m_pServerFont[0]->GetImplFontCharMap();
+ return pIFCMap;
}
// ---------------------------------------------------------------------------