[Libreoffice-commits] .: 2 commits - vcl/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sat Feb 18 05:50:47 PST 2012


 vcl/source/gdi/outdev3.cxx |   65 ++-------------------------------------------
 1 file changed, 4 insertions(+), 61 deletions(-)

New commits:
commit 77946f3b9d03e814f7ada8af7f633c649975659e
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Feb 18 14:49:39 2012 +0100

    vcl: bring ImplFindByLocale back (windows build)
    
    Sorry for this.

diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 9acb296..75871da 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -228,6 +228,9 @@ public:
     ImplGetDevFontList*     GetDevFontList() const;
     ImplGetDevSizeList*     GetDevSizeList( const String& rFontName ) const;
 
+    //used by 2-level font fallback
+    ImplDevFontListData* ImplFindByLocale( com::sun::star::lang::Locale& ) const;
+
 protected:
     void                    InitMatchData() const;
     bool                    AreMapNamesAvailable() const { return mbMapNames; }
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 598823e..4c0123f 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1668,6 +1668,18 @@ void ImplDevFontList::InitMatchData() const
     }
 }
 
+//----------------------------------------------------------------------------
+ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Locale& rLocale ) const
+{
+    // get the default font for a specified locale
+    const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get();
+    const String aDefault = rDefaults.getUserInterfaceFont( rLocale );
+    ImplDevFontListData* pFontData = ImplFindByTokenNames( aDefault );
+    if( pFontData )
+        return pFontData;
+    return NULL;
+}
+
 // -----------------------------------------------------------------------
 
 ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchType,
commit afdcc3c093da5cadb244d2d069e63db3b56a41fe
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Feb 18 14:44:41 2012 +0100

    Revert "vcl: bring ImplFindByLocale back (windows build)"
    
    This reverts commit 04af52609aef5b4ccbbf82553ac190ef43700652.
    
    This was nothing...

diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 75871da..9acb296 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -228,9 +228,6 @@ public:
     ImplGetDevFontList*     GetDevFontList() const;
     ImplGetDevSizeList*     GetDevSizeList( const String& rFontName ) const;
 
-    //used by 2-level font fallback
-    ImplDevFontListData* ImplFindByLocale( com::sun::star::lang::Locale& ) const;
-
 protected:
     void                    InitMatchData() const;
     bool                    AreMapNamesAvailable() const { return mbMapNames; }
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 6cd8e34..598823e 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -26,8 +26,6 @@
  *
  ************************************************************************/
 
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
 
 #include "i18npool/mslangid.hxx"
 
@@ -418,35 +416,6 @@ sal_uInt16 OutputDevice::GetFontSubstituteCount()
 
 // -----------------------------------------------------------------------
 
-void OutputDevice::GetFontSubstitute( sal_uInt16 n,
-                                      XubString& rFontName,
-                                      XubString& rReplaceFontName,
-                                      sal_uInt16& rFlags )
-{
-    const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
-    if( pSubst )
-        pSubst->GetFontSubstitute( n, rFontName, rReplaceFontName, rFlags );
-}
-
-// -----------------------------------------------------------------------
-
-bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
-    String& rFontName, String& rSubstFontName, sal_uInt16& rFlags ) const
-{
-    FontSubstList::const_iterator it = maFontSubstList.begin();
-    for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
-    if( it == maFontSubstList.end() )
-        return false;
-
-    const ImplFontSubstEntry* pEntry = &(*it);
-    rFontName       = pEntry->maName;
-    rSubstFontName  = pEntry->maReplaceName;
-    rFlags          = pEntry->mnFlags;
-    return true;
-}
-
-// -----------------------------------------------------------------------
-
 bool ImplDirectFontSubstitution::FindFontSubstitute( String& rSubstName,
     const String& rSearchName, sal_uInt16 nFlags ) const
 {
@@ -1699,18 +1668,6 @@ void ImplDevFontList::InitMatchData() const
     }
 }
 
-//----------------------------------------------------------------------------
-ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Locale& rLocale ) const
-{
-    // get the default font for a specified locale
-    const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get();
-    const String aDefault = rDefaults.getUserInterfaceFont( rLocale );
-    ImplDevFontListData* pFontData = ImplFindByTokenNames( aDefault );
-    if( pFontData )
-        return pFontData;
-    return NULL;
-}
-
 // -----------------------------------------------------------------------
 
 ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchType,
@@ -3178,15 +3135,6 @@ bool OutputDevice::ImplNewFont() const
 
 // -----------------------------------------------------------------------
 
-long OutputDevice::ImplGetTextWidth( const SalLayout& rSalLayout ) const
-{
-    long nWidth = rSalLayout.GetTextWidth();
-    nWidth /= rSalLayout.GetUnitsPerPixel();
-    return nWidth;
-}
-
-// -----------------------------------------------------------------------
-
 void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
                                      long nDistX, long nDistY, long nWidth, long nHeight )
 {
@@ -5512,13 +5460,6 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
 
 // ------------------------------------------------------------------------
 
-sal_Bool OutputDevice::IsTextUnderlineAbove( const Font& rFont )
-{
-    return ImplIsUnderlineAbove( rFont );
-}
-
-// ------------------------------------------------------------------------
-
 void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos,
                                  sal_uInt16 nStyle )
 {
@@ -6026,7 +5967,9 @@ SalLayout* OutputDevice::ImplLayout( const String& rOrigStr,
     if( bFilter )
     {
         xub_StrLen nCutStart, nCutStop, nOrgLen = nLen;
-        bool bFiltered = mpGraphics->filterText( rOrigStr, aStr, nMinIndex, nLen, nCutStart, nCutStop );
+        rtl::OUString aTmpStr(aStr);
+        bool bFiltered = mpGraphics->filterText( rOrigStr, aTmpStr, nMinIndex, nLen, nCutStart, nCutStop );
+        aStr = aTmpStr;
         if( !nLen )
             return NULL;
 
@@ -6473,8 +6416,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
                     nFormatLines = nLines-1;
 
                     pLineInfo = aMultiLineInfo.GetLine( nFormatLines );
-                    aLastLine = aStr.Copy( pLineInfo->GetIndex() );
-                    aLastLine.ConvertLineEnd( LINEEND_LF );
+                    aLastLine = convertLineEnd(aStr.Copy(pLineInfo->GetIndex()), LINEEND_LF);
                     // Alle LineFeed's durch Spaces ersetzen
                     xub_StrLen nLastLineLen = aLastLine.Len();
                     for ( i = 0; i < nLastLineLen; i++ )
@@ -7496,17 +7438,6 @@ long OutputDevice::GetMinKashida() const
     ImplFontMetricData* pMetric = &(pEntry->maMetric);
     return ImplDevicePixelToLogicWidth( pMetric->mnMinKashida );
 }
-// -----------------------------------------------------------------------
-
-long OutputDevice::GetMinKashida( const Font& rFont ) const
-{
-    // select font, query Kashida, select original font again
-    Font aOldFont = GetFont();
-    const_cast<OutputDevice*>(this)->SetFont( rFont );
-    long aKashida = GetMinKashida();
-    const_cast<OutputDevice*>(this)->SetFont( aOldFont );
-    return aKashida;
-}
 
 // -----------------------------------------------------------------------
 xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,


More information about the Libreoffice-commits mailing list