[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - svtools/source vcl/source vcl/unx vcl/win

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Nov 23 18:57:59 PST 2009


 svtools/source/passwordcontainer/passwordcontainer.cxx |   13 ++--------
 vcl/source/gdi/pdfwriter_impl.cxx                      |    1 
 vcl/unx/headless/svppspgraphics.cxx                    |   22 ++++++++++-------
 vcl/unx/source/gdi/pspgraphics.cxx                     |   22 ++++++++++-------
 vcl/unx/source/gdi/salgdi.cxx                          |   11 +++++++-
 vcl/unx/source/gdi/xrender_peer.cxx                    |    4 +++
 vcl/unx/source/gdi/xrender_peer.hxx                    |   14 ++++++++++
 vcl/win/source/gdi/salgdi3.cxx                         |    7 +++--
 8 files changed, 64 insertions(+), 30 deletions(-)

New commits:
commit e73e099f8c68351236a60c46970ee0dbfd271b46
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Mon Nov 23 16:48:39 2009 +0000

    CWS-TOOLING: integrate CWS ooo32gsl04
    2009-11-11 18:00:15 +0100 hdu  r277467 : #i106572# fix PDF-export with type1 fonts on win
    2009-11-10 12:17:06 +0100 hdu  r277426 : #i106572# fixed typo
    2009-11-09 10:30:56 +0100 hdu  r277404 : #i105880# reset clip region of recycled render pictures
    2009-11-06 15:45:07 +0100 hdu  r277390 : #i106572# explicitly distinguish between PFA/PFB result also in GetEmbedFontData()
    2009-11-06 15:38:53 +0100 hdu  r277389 : #i106572# explicitly distinguish between PFA/PFB in DoGetEmbedFontData() result
    2009-11-06 15:37:01 +0100 hdu  r277388 : #i106572# PDF-export: fix FontDescriptor for embedded Type1 fonts

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d2f01b9..a85ea2e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3612,6 +3612,7 @@ sal_Int32 PDFWriterImpl::emitFontDescriptor( const ImplFontData* pFont, FontSubs
             break;
         case FontSubsetInfo::TYPE1_PFA:
         case FontSubsetInfo::TYPE1_PFB:
+        case FontSubsetInfo::ANY_TYPE1:
             break;
         default:
             DBG_ERROR( "unknown fonttype in PDF font descriptor" );
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index 5989c72..539d18f 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -986,13 +986,6 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
         return NULL;
 
     // fill in font info
-    switch( aFontInfo.m_eType )
-    {
-        case psp::fonttype::TrueType: rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; break;
-        case psp::fonttype::Type1: rInfo.m_nFontType = FontSubsetInfo::ANY_TYPE1; break;
-        default:
-            return NULL;
-    }
     rInfo.m_nAscent		= aFontInfo.m_nAscend;
     rInfo.m_nDescent	= aFontInfo.m_nDescend;
     rInfo.m_aPSName		= rMgr.getPSName( aFont );
@@ -1029,9 +1022,22 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
     rInfo.m_nCapHeight	= yMax; // Well ...
 
     for( int i = 0; i < 256; i++ )
-
         pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0);
 
+    switch( aFontInfo.m_eType )
+    {
+        case psp::fonttype::TrueType:
+            rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF;
+            break;
+        case psp::fonttype::Type1: {
+            const bool bPFA = ((*(unsigned char*)pFile) < 0x80);
+            rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB;
+            }
+            break;
+        default:
+            return NULL;
+    }
+
     return pFile;
 }
 
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index a6a2e49..939286f 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -1094,13 +1094,6 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
         return NULL;
 
     // fill in font info
-    switch( aFontInfo.m_eType )
-    {
-        case psp::fonttype::TrueType: rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; break;
-        case psp::fonttype::Type1: rInfo.m_nFontType = FontSubsetInfo::ANY_TYPE1; break;
-        default:
-            return NULL;
-    }
     rInfo.m_nAscent		= aFontInfo.m_nAscend;
     rInfo.m_nDescent	= aFontInfo.m_nDescend;
     rInfo.m_aPSName		= rMgr.getPSName( aFont );
@@ -1137,9 +1130,22 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
     rInfo.m_nCapHeight	= yMax; // Well ...
 
     for( int i = 0; i < 256; i++ )
-
         pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0);
 
+    switch( aFontInfo.m_eType )
+    {
+        case psp::fonttype::TrueType:
+            rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF;
+            break;
+        case psp::fonttype::Type1: {
+            const bool bPFA = ((*(unsigned char*)pFile) < 0x80);
+            rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB;
+            }
+            break;
+        default:
+            return NULL;
+    }
+
     return pFile;
 }
 
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 15bd08b..029f681 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1028,11 +1028,12 @@ BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,ULONG )
 
 XID X11SalGraphics::GetXRenderPicture()
 {
+    XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
+
     if( !m_aRenderPicture )
     {
         // check xrender support for matching visual
         // find a XRenderPictFormat compatible with the Drawable
-        XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
         XRenderPictFormat* pVisualFormat = static_cast<XRenderPictFormat*>(GetXRenderFormat());
         if( !pVisualFormat )
         {
@@ -1053,7 +1054,15 @@ XID X11SalGraphics::GetXRenderPicture()
     // TODO: avoid clipping if already set correctly
     if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
         rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+    else
 #endif
+    {
+        // reset clip region
+        // TODO: avoid clip reset if already done
+        XRenderPictureAttributes aAttr;
+        aAttr.clip_mask = None;
+        rRenderPeer.ChangePicture( m_aRenderPicture, CPClipMask, &aAttr );
+    }
 
     return m_aRenderPicture;
 }
diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx
index b17d128..b4a9f12 100644
--- a/vcl/unx/source/gdi/xrender_peer.cxx
+++ b/vcl/unx/source/gdi/xrender_peer.cxx
@@ -142,6 +142,10 @@ void XRenderPeer::InitRenderLib()
     mpXRenderCreatePicture = (Picture(*)(Display*,Drawable,const XRenderPictFormat*,
         unsigned long,const XRenderPictureAttributes*))pFunc;
 
+    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderChangePicture" );
+    if( !pFunc ) return;
+    mpXRenderChangePicture = (void(*)(Display*,Picture,unsigned long,const XRenderPictureAttributes*))pFunc;
+
     pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderSetPictureClipRegion" );
     if( !pFunc ) return;
     mpXRenderSetPictureClipRegion = (void(*)(Display*,Picture,XLIB_Region))pFunc;
diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx
index 3a29aa6..8979ed5 100644
--- a/vcl/unx/source/gdi/xrender_peer.hxx
+++ b/vcl/unx/source/gdi/xrender_peer.hxx
@@ -66,6 +66,8 @@ public:
         const XRenderPictFormat& ) const;
     Picture     CreatePicture( Drawable, const XRenderPictFormat*,
                     unsigned long nDrawable, const XRenderPictureAttributes* ) const;
+    void        ChangePicture( Picture, unsigned long nValueMask,
+                    const XRenderPictureAttributes* ) const;
     void        SetPictureClipRegion( Picture, XLIB_Region ) const;
     void        CompositePicture( int nOp, Picture aSrc, Picture aMask, Picture aDst,
                     int nXSrc, int nYSrc, int nXMask, int nYMask,
@@ -103,6 +105,8 @@ private:
 
     Picture     (*mpXRenderCreatePicture)(Display*,Drawable, const XRenderPictFormat*,
                     unsigned long,const XRenderPictureAttributes*);
+    void        (*mpXRenderChangePicture)(Display*,Picture,
+                    unsigned long,const XRenderPictureAttributes*);
     void        (*mpXRenderSetPictureClipRegion)(Display*,Picture,XLIB_Region);
     void        (*mpXRenderFreePicture)(Display*,Picture);
     void        (*mpXRenderComposite)(Display*,int,Picture,Picture,Picture,
@@ -194,6 +198,16 @@ inline Picture XRenderPeer::CreatePicture( Drawable aDrawable,
 #endif
 }
 
+inline void XRenderPeer::ChangePicture( Picture aPicture,
+    unsigned long nValueMask, const XRenderPictureAttributes* pRenderAttr ) const
+{
+#ifdef XRENDER_LINK
+    XRenderChangePicture( mpDisplay, aPicture, nValueMask, pRenderAttr );
+#else
+    (*mpXRenderChangePicture)( mpDisplay, aPicture, nValueMask, pRenderAttr );
+#endif
+}
+
 inline void XRenderPeer::SetPictureClipRegion( Picture aPicture,
     XLIB_Region aXlibRegion ) const
 {
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index bdc4fab..7ff4527 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -557,7 +557,7 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXA& rE
     if( 0 != (rMetric.ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE))
      || 0 != (rMetric.tmPitchAndFamily & TMPF_TRUETYPE))
         aDFA.mbSubsettable = true;
-    else if( 0 != (rMetric.tmPitchAndFamily & NTM_TYPE1) ) // TODO: implement subsetting for type1 too
+    else if( 0 != (rMetric.ntmFlags & NTM_TYPE1) ) // TODO: implement subsetting for type1 too
         aDFA.mbEmbeddable = true;
 
     // heuristics for font quality
@@ -636,7 +636,7 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rE
     if( 0 != (rMetric.ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE))
      || 0 != (rMetric.tmPitchAndFamily & TMPF_TRUETYPE))
         aDFA.mbSubsettable = true;
-    else if( 0 != (rMetric.tmPitchAndFamily & NTM_TYPE1) ) // TODO: implement subsetting for type1 too
+    else if( 0 != (rMetric.ntmFlags & NTM_TYPE1) ) // TODO: implement subsetting for type1 too
         aDFA.mbEmbeddable = true;
 
     // heuristics for font quality
@@ -2723,7 +2723,8 @@ const void* WinSalGraphics::GetEmbedFontData( const ImplFontData* pFont,
     TEXTMETRICA aTm;
     if( !::GetTextMetricsA( mhDC, &aTm ) )
         *pDataLen = 0;
-    rInfo.m_nFontType = FontSubsetInfo::ANY_TYPE1;
+    const bool bPFA = (*aRawFontData.get() < 0x80);
+    rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB;
     WCHAR aFaceName[64];
     int nFNLen = ::GetTextFaceW( mhDC, 64, aFaceName );
     // #i59854# strip eventual null byte
commit 9636c47aa0f2b65e7e0b9dbcdeb2f2ec53e40669
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Mon Nov 23 15:33:39 2009 +0000

    CWS-TOOLING: integrate CWS fwk125
    2009-11-19 08:11:20 +0100 jsk  r277554 : fwk125: #i105760# - removed warnlog, re-enabled autotest e_help.bas
    2009-11-16 16:21:49 +0100 tl  r277521 : #i106571# fixed locale list for dictionaries to get rid of duplicate entries
    2009-11-12 08:47:31 +0100 hde  r277469 : rework of hyphenation
    2009-11-11 15:25:16 +0100 hde  r277462 : rework of hyphenation
    2009-11-11 15:24:09 +0100 hde  r277461 : rework of hyphenation
    2009-11-11 13:52:02 +0100 hde  r277453 : new include for hyphenation tools
    2009-11-10 12:28:51 +0100 tl  r277427 : #i102304# fix for hyphenation dialog
    2009-11-10 12:00:10 +0100 mav  r277425 : #i10000# A workaround for pch and windows headers conflict
    2009-11-10 11:58:32 +0100 mav  r277424 : #i10000# A workaround for pch and windows headers conflict
    2009-11-09 15:47:59 +0100 kso  r277414 : #i16732# fixed url matching.
    2009-11-09 11:51:40 +0100 mav  r277406 : #i10000# use precompiled headers
    2009-11-08 23:53:03 +0100 mav  r277399 : #i10000# fix warning
    2009-11-08 23:50:23 +0100 mav  r277398 : #i10000# adapt for unix
    2009-11-08 23:49:52 +0100 mav  r277397 : #i10000# adapt for unix
    2009-11-08 21:26:06 +0100 mav  r277396 : CWS-TOOLING: rebase CWS fwk125 to branches/OOO320 at 277373 (milestone: OOO320:m4)
    2009-11-06 16:30:27 +0100 ab  r277394 : #i106100# Hold references to packages to speed up further calls to getDeployedPackages()
    2009-11-06 15:58:48 +0100 mav  r277392 : #i102464# check the Windows ACL
    2009-11-06 15:58:23 +0100 mav  r277391 : #i102464# check the Windows ACL
    2009-11-04 11:54:06 +0100 tl  r277342 : #i106497# incorrectly found 'supported languages' fixed
    2009-11-04 10:40:51 +0100 tl  r277335 : #i106571# dictionary updates for Polish and Swedish.
    2009-10-28 09:54:41 +0100 tl  r277236 : #i106100# context menu performance
    2009-10-27 15:47:05 +0100 tl  r277213 : #i106100# context menu performance
    2009-10-23 17:31:56 +0200 mav  r277170 : #i106075# use correct path to inprocserv.dll
    2009-10-23 16:07:27 +0200 mav  r277168 : #i105760# seek the temporary file to beginning also for URL case
    2009-10-23 11:03:58 +0200 mav  r277134 : CWS-TOOLING: rebase CWS fwk125 to branches/OOO320 at 276942 (milestone: OOO320:m2)

diff --git a/svtools/source/passwordcontainer/passwordcontainer.cxx b/svtools/source/passwordcontainer/passwordcontainer.cxx
index ebf68c9..1315c9a 100644
--- a/svtools/source/passwordcontainer/passwordcontainer.cxx
+++ b/svtools/source/passwordcontainer/passwordcontainer.cxx
@@ -152,17 +152,10 @@ static vector< ::rtl::OUString > getInfoFromInd( ::rtl::OUString aInd )
 static sal_Bool shorterUrl( ::rtl::OUString& aURL )
 {
     sal_Int32 aInd = aURL.lastIndexOf( sal_Unicode( '/' ) );
-    
-    if( aInd > 0  )
+    if( aInd > 0  && aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) ) != aInd-2 )
     {
-        sal_Int32 aPrevInd = aURL.lastIndexOf( sal_Unicode( '/' ), aInd );
-        if ( aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) ) 
-                != aPrevInd - 2 ||
-             aInd != aURL.getLength() - 1 )
-        {
-            aURL = aURL.copy( 0, aInd );
-            return sal_True;
-        }
+        aURL = aURL.copy( 0, aInd );
+        return sal_True;
     }
 
     return sal_False;


More information about the ooo-build-commit mailing list