This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 245cfa3273 Fixed typos, removed whitespace
245cfa3273 is described below

commit 245cfa3273a796efe837af30e8f9170e3ad3ab98
Author: mseidel <msei...@apache.org>
AuthorDate: Tue Aug 15 13:37:26 2023 +0200

    Fixed typos, removed whitespace
---
 main/vcl/source/fontsubset/cff.cxx  |  29 ++++-----
 main/vcl/source/fontsubset/gsub.cxx |  12 ++--
 main/vcl/source/fontsubset/gsub.h   |  10 ++--
 main/vcl/source/fontsubset/list.cxx |  12 ++--
 main/vcl/source/fontsubset/sft.cxx  |  68 ++++++++++-----------
 main/vcl/source/fontsubset/ttcr.cxx | 114 ++++++++++++++++++------------------
 main/vcl/source/fontsubset/ttcr.hxx |  24 ++++----
 main/vcl/source/fontsubset/xlat.cxx |  29 ++++-----
 main/vcl/source/fontsubset/xlat.hxx |  31 +++++-----
 9 files changed, 166 insertions(+), 163 deletions(-)

diff --git a/main/vcl/source/fontsubset/cff.cxx 
b/main/vcl/source/fontsubset/cff.cxx
index 56b695a96b..2c33cf3e6a 100644
--- a/main/vcl/source/fontsubset/cff.cxx
+++ b/main/vcl/source/fontsubset/cff.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -82,7 +82,7 @@ static const char* pStringIds[] = {
        "grave",                        "acute",                        
"circumflex",           "tilde",
 /*128*/        "macron",               "breve",                        
"dotaccent",            "dieresis",
        "ring",                         "cedilla",                      
"hungarumlaut",         "ogonek",
-       "caron",                        "endash",                       "AE",   
                        "ordfeminine",
+       "caron",                        "emdash",                       "AE",   
                        "ordfeminine",
        "Lslash",                       "Oslash",                       "OE",   
                        "ordmasculine",
 /*144*/        "ae",                   "dotlessi",                     
"lslash",                       "oslash",
        "oe",                           "germandbls",           "onesuperior",  
        "logicalnot",
@@ -497,7 +497,7 @@ public: // TODO: is public really needed?
 private:
        // typeop exceution context
 
-       // Count of mnValStack elements 
+       // Count of mnValStack elements
        int     mnStackIdx;
        // Stack for holding CFF DICT operands
        ValType mnValStack[ NMAXSTACK+4];
@@ -752,7 +752,7 @@ void CffSubsetterContext::readDictOp( void)
                        break;
                }
 
-               return; 
+               return;
        } else if( (c >= 32) || (c == 28) ) {
 //             --mpReadPtr;
                read2push();
@@ -838,10 +838,10 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
        } else if( nOutCharstrType == 1) {
                // numtype==255 means int32 for Type1, but 16.16 for Type2 
charstrings!!!
                *(pOut++) = 255;
-        *(pOut++) = static_cast<U8>(nInt >> 24);
-        *(pOut++) = static_cast<U8>(nInt >> 16);
-        *(pOut++) = static_cast<U8>(nInt >> 8);
-        *(pOut++) = static_cast<U8>(nInt);
+               *(pOut++) = static_cast<U8>(nInt >> 24);
+               *(pOut++) = static_cast<U8>(nInt >> 16);
+               *(pOut++) = static_cast<U8>(nInt >> 8);
+               *(pOut++) = static_cast<U8>(nInt);
        }
 
        mpWritePtr = pOut;
@@ -1441,7 +1441,7 @@ if( mbSawError) {
        // encrypt the Type1 charstring
        int nRDCryptR = 4330; // TODO: mnRDCryptSeed;
        for( U8* p = pT1Ops; p < mpWritePtr; ++p) {
-               *p ^= (nRDCryptR >> 8); 
+               *p ^= (nRDCryptR >> 8);
                nRDCryptR = (*(U8*)p + nRDCryptR) * 52845 + 22719;
        }
 
@@ -2214,7 +2214,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& 
rEmitter,
                // update PFB header segment
                const int nPfbHeaderLen = rEmitter.tellPos() - 6;
                rEmitter.updateLen( 2, nPfbHeaderLen);
-       
+
                // prepare start of eexec segment
                rEmitter.emitRawData( "\x80\x02\x00\x00\x00\x00", 6);   // 
segment start
        }
@@ -2387,7 +2387,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& 
rEmitter,
                const int nEExecLen = rEmitter.tellPos() - nEExecSegTell;
                rEmitter.updateLen( nEExecSegTell-4, nEExecLen);
        }
- 
+
        // create PFB footer
        static const char aPfxFooter[] = "\x80\x01\x14\x02\x00\x00\n" // TODO: 
check segment len
                
"0000000000000000000000000000000000000000000000000000000000000000\n"
@@ -2450,3 +2450,4 @@ bool FontSubsetInfo::CreateFontSubsetFromCff( GlyphWidth* 
pOutGlyphWidths )
 
 // ====================================================================
 
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/gsub.cxx 
b/main/vcl/source/fontsubset/gsub.cxx
index 796116ff0d..d2ec4a6fbd 100644
--- a/main/vcl/source/fontsubset/gsub.cxx
+++ b/main/vcl/source/fontsubset/gsub.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -318,7 +318,7 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
                 GlyphSubstitution* pGSubstitution = new GlyphSubstitution;
                 pTTFile->pGSubstitution = (void*)pGSubstitution;
                 for( subst_it = aSubstVector.begin(); subst_it != 
aSubstVector.end(); ++subst_it )
-                    (*pGSubstitution)[ (*subst_it).first ] =  
(*subst_it).second;
+                    (*pGSubstitution)[ (*subst_it).first ] = 
(*subst_it).second;
             }
         }
     }
@@ -352,3 +352,5 @@ int HasVerticalGSUB( struct _TrueTypeFont* pTTFile )
 }
 
 }
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/gsub.h 
b/main/vcl/source/fontsubset/gsub.h
index 96a38b646d..d6bf3b15af 100644
--- a/main/vcl/source/fontsubset/gsub.h
+++ b/main/vcl/source/fontsubset/gsub.h
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -26,7 +26,7 @@
 
 namespace vcl
 {
-    
+
 int HasVerticalGSUB( struct vcl::_TrueTypeFont* pTTFile );
 
 int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, int wmode );
diff --git a/main/vcl/source/fontsubset/list.cxx 
b/main/vcl/source/fontsubset/list.cxx
index 00231aaf41..a7889a1d80 100644
--- a/main/vcl/source/fontsubset/list.cxx
+++ b/main/vcl/source/fontsubset/list.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -118,7 +118,7 @@ static lnode *prependPrim(list pThis, void *el)
 }
 #endif
 
-/*- public methods  */
+/*- public methods */
 list listNewEmpty(void)                           /*- default ctor */
 {
     list pThis = (list)rtl_allocateMemory(sizeof(struct _list));
@@ -521,4 +521,4 @@ int main()
 }
 #endif
 
-
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/sft.cxx 
b/main/vcl/source/fontsubset/sft.cxx
index e9407388af..0203a6c203 100644
--- a/main/vcl/source/fontsubset/sft.cxx
+++ b/main/vcl/source/fontsubset/sft.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -89,7 +89,7 @@ struct PSPathElement
     int x1, y1;
     int x2, y2;
     int x3, y3;
-    
+
     PSPathElement( PathSegmentType i_eType ) : type( i_eType ),
                                    x1( 0 ), y1( 0 ),
                                    x2( 0 ), y2( 0 ),
@@ -98,17 +98,17 @@ struct PSPathElement
     }
 };
 
-/*- In horisontal writing mode right sidebearing is calculated using this 
formula
+/*- In horizontal writing mode right sidebearing is calculated using this 
formula
  *- rsb = aw - (lsb + xMax - xMin) -*/
 typedef struct {
     sal_Int16  xMin;
     sal_Int16  yMin;
     sal_Int16  xMax;
     sal_Int16  yMax;
-    sal_uInt16 aw;                /*- Advance Width (horisontal writing mode)  
  */
-    sal_Int16  lsb;               /*- Left sidebearing (horisontal writing 
mode) */
-    sal_uInt16 ah;                /*- advance height (vertical writing mode)   
  */
-    sal_Int16  tsb;               /*- top sidebearing (vertical writing mode)  
  */
+    sal_uInt16 aw;                /*- Advance width (horizontal writing mode)  
  */
+    sal_Int16  lsb;               /*- Left sidebearing (horizontal writing 
mode) */
+    sal_uInt16 ah;                /*- Advance height (vertical writing mode)   
  */
+    sal_Int16  tsb;               /*- Top sidebearing (vertical writing mode)  
  */
 } TTGlyphMetrics;
 
 #define HFORMAT_LINELEN 64
@@ -799,7 +799,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, 
sal_uInt32 glyphID, ControlPo
 
     } while (flags & MORE_COMPONENTS);
 
-    // #i123417# some fonts like IFAOGrec have no outline points in some 
compound glyphs 
+    // #i123417# some fonts like IFAOGrec have no outline points in some 
compound glyphs
     // so this unlikely but possible scenario should be handled gracefully
     if( myPoints.empty() )
         return 0;
@@ -808,7 +808,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, 
sal_uInt32 glyphID, ControlPo
 
     pa = (ControlPoint*)calloc(np, sizeof(ControlPoint));
     assert(pa != 0);
-    
+
     memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
 
     *pointArray = pa;
@@ -1176,9 +1176,9 @@ static void GetNames(TrueTypeFont *t)
     {
         t->subfamily = strdup("");
     }
-    
+
     /* #i60349# sanity check psname
-     * psname parctically has to be 7bit ascii and should not contains spaces
+     * psname practically has to be 7bit ascii and should not contains spaces
      * there is a class of broken fonts which do not fulfill that at all, so 
let's try
      * if the family name is 7bit ascii and take it instead if so
      */
@@ -1218,7 +1218,7 @@ enum cmapType {
 #define MISSING_GLYPH_INDEX 0
 
 /*
- * getGlyph[0246]() functions and freinds are implemented by:
+ * getGlyph[0246]() functions and friends are implemented by:
  * @author Manpreet Singh
  * getGlyph12() function and friends by:
  * @author HDU
@@ -1408,7 +1408,7 @@ static void FindCmap(TrueTypeFont *ttf)
     for (i = 0; i < ncmaps; i++) {
         sal_uInt32 offset;
         sal_uInt16 pID, eID;
-        
+
         /* sanity check, cmap entry must lie within table */
         if( i*8+4 > table_size )
             break;
@@ -1416,14 +1416,14 @@ static void FindCmap(TrueTypeFont *ttf)
         pID = GetUInt16(table, 4 + i * 8, 1);
         eID = GetUInt16(table, 6 + i * 8, 1);
         offset = GetUInt32(table, 8 + i * 8, 1);
-        
+
          /* sanity check, cmap must lie within file */
         if( (table - ttf->ptr) + offset > (sal_uInt32)ttf->fsize )
             continue;
 
         /* Unicode tables in Apple fonts */
         if (pID == 0) {
-            AppleUni = offset; 
+            AppleUni = offset;
         }
 
         if (pID == 3) {
@@ -1552,10 +1552,10 @@ static void KernGlyphsPrim1(TrueTypeFont *ttf, 
sal_uInt16 *glyphs, int nglyphs,
 {
     (void)ttf; /* avoid warning */
     (void)glyphs; /* avoid warning */
-    (void)nglyphs; /* avoid warning */    
-    (void)wmode; /* avoid warning */    
-    (void)nglyphs; /* avoid warning */    
-    (void)kern; /* avoid warning */    
+    (void)nglyphs; /* avoid warning */
+    (void)wmode; /* avoid warning */
+    (void)nglyphs; /* avoid warning */
+    (void)kern; /* avoid warning */
     fprintf(stderr, "MacOS kerning tables have not been implemented yet!\n");
 }
 
@@ -1648,7 +1648,7 @@ static void allocTrueTypeFont( TrueTypeFont** ttf )
     }
 }
 
-/* forward declariotn for the two entry points to use*/
+/* forward declaration for the two entry points to use*/
 static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t );
 
 #if !defined(WIN32) && !defined(OS2)
@@ -1658,7 +1658,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 
facenum, TrueTypeFont** ttf )
     struct stat st;
 
     if (!fname || !*fname) return SF_BADFILE;
-    
+
     allocTrueTypeFont( ttf );
     if( ! *ttf )
         return SF_MEMORY;
@@ -1698,7 +1698,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 
facenum, TrueTypeFont** ttf )
         goto cleanup;
     }
     close(fd);
-    
+
     return doOpenTTFont( facenum, *ttf );
 
 cleanup:
@@ -1716,12 +1716,12 @@ int OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, 
sal_uInt32 facenum, TrueTyp
     allocTrueTypeFont( ttf );
     if( *ttf == NULL )
         return SF_MEMORY;
-    
+
     (*ttf)->fname = NULL;
     (*ttf)->fsize = nLen;
     (*ttf)->ptr   = (sal_uInt8*)pBuffer;
-    
-    return doOpenTTFont( facenum, *ttf ); 
+
+    return doOpenTTFont( facenum, *ttf );
 }
 
 static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
@@ -1810,8 +1810,8 @@ static int doOpenTTFont( sal_uInt32 facenum, 
TrueTypeFont* t )
         if( !pHead )
             return SF_TTFORMAT;
         /* limit Head candidate to TTC extract's limits */
-        if( pHead > t->ptr + (t->fsize - 54) ) 
-            pHead = t->ptr + (t->fsize - 54); 
+        if( pHead > t->ptr + (t->fsize - 54) )
+            pHead = t->ptr + (t->fsize - 54);
         /* TODO: find better method than searching head table's magic */
         sal_uInt8* p = NULL;
         for( p = pHead + 12; p > t->ptr; --p ) {
@@ -1835,7 +1835,7 @@ static int doOpenTTFont( sal_uInt32 facenum, 
TrueTypeFont* t )
          * tables, but this would be quite time intensive.
          * Try to fix tables, so we can cope with minor problems.
          */
-        
+
         if( (sal_uInt8*)t->tables[i] < t->ptr )
         {
 #if OSL_DEBUG_LEVEL > 1
@@ -2232,7 +2232,7 @@ int  CreateTTFromTTGlyphs(TrueTypeFont  *ttf,
     for (i = 0; i < nGlyphs; i++) {
         gID[i] = glyfAdd(glyf, GetTTRawGlyphData(ttf, glyphArray[i]), ttf);
     }
-        
+
     /**                       cmap                          **/
     cmap = TrueTypeTableNew_cmap();
 
@@ -2905,7 +2905,7 @@ int main(int ac, char **av)
      * of the glyph in the output file */
     sal_uInt8 encoding[2];
 
-    /* This array is for glyph IDs that  source characters map to */
+    /* This array is for glyph IDs that source characters map to */
     sal_uInt16 g[2];
 
 
@@ -3355,4 +3355,4 @@ int main(int ac, char **av)
 }
 #endif
 
-
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/ttcr.cxx 
b/main/vcl/source/fontsubset/ttcr.cxx
index 3118d229d3..0b6f0d8775 100644
--- a/main/vcl/source/fontsubset/ttcr.cxx
+++ b/main/vcl/source/fontsubset/ttcr.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -49,10 +49,10 @@ namespace vcl
  */
 
     struct _TrueTypeCreator {
-        sal_uInt32 tag;                         /**< TrueType file tag */
+        sal_uInt32 tag;                     /**< TrueType file tag */
         list   tables;                      /**< List of table tags and 
pointers */
     };
-    
+
 /* These must be #defined so that they can be used in initializers */
 #define T_maxp  0x6D617870
 #define T_glyf  0x676C7966
@@ -163,7 +163,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, 
sal_uInt32 offset, int bige
         ptr[offset] = (sal_uInt8)(val & 0xFF);
     }
 }
- 
+
 _inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int 
bigendian)
 {
     assert(ptr != 0);
@@ -235,7 +235,7 @@ static int NameRecordCompareF(const void *l, const void *r)
     }
     return 0;
 }
-    
+
 
 static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
 {
@@ -288,7 +288,7 @@ int AddTable(TrueTypeCreator *_this, TrueTypeTable *table)
 void RemoveTable(TrueTypeCreator *_this, sal_uInt32 tag)
 {
     int done = 0;
-    
+
     if (listCount(_this->tables)) {
         listToFirst(_this->tables);
         do {
@@ -312,16 +312,16 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 
**ptr, sal_uInt32 *length)
     sal_uInt32 *p;
     int i=0, n;
     sal_uInt8 *head = NULL;     /* saved pointer to the head table data for 
checkSumAdjustment calculation */
-    
+
     if ((n = listCount(_this->tables)) == 0) return SF_TTFORMAT;
 
     ProcessTables(_this);
 
     /* ProcessTables() adds 'loca' and 'hmtx' */
-    
+
     n = listCount(_this->tables);
     numTables = (sal_uInt16) n;
-    
+
 
     TableEntry* te = (TableEntry*)scalloc(n, sizeof(TableEntry));
 
@@ -332,7 +332,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, 
sal_uInt32 *length)
     }
 
     qsort(te, n, sizeof(TableEntry), TableEntryCompareF);
-    
+
     do {
         searchRange *= 2;
         entrySelector++;
@@ -382,7 +382,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, 
sal_uInt32 *length)
 
     *ptr = ttf;
     *length = s;
-    
+
     return SF_OK;
 }
 
@@ -451,7 +451,7 @@ typedef struct {
 typedef struct {
     sal_uInt32 n;                           /* number of used CMAP sub-tables  
     */
     sal_uInt32 m;                           /* number of allocated CMAP 
sub-tables  */
-    CmapSubTable *s;                    /* sotred array of sub-tables          
 */
+    CmapSubTable *s;                        /* sorted array of sub-tables      
     */
 } table_cmap;
 
 typedef struct {
@@ -461,7 +461,7 @@ typedef struct {
 } tdata_generic;
 
 typedef struct {
-    sal_uInt32 nbytes;                      /* number of bytes in loca table */
+    sal_uInt32 nbytes;                       /* number of bytes in loca table 
*/
     sal_uInt8 *ptr;                          /* pointer to the data */
 } tdata_loca;
 
@@ -471,14 +471,14 @@ typedef struct {
     sal_Int16  underlinePosition;
     sal_Int16  underlineThickness;
     sal_uInt32 isFixedPitch;
-    void   *ptr;                        /* format-specific pointer */
+    void   *ptr;                            /* format-specific pointer */
 } tdata_post;
-    
+
 
 /* allocate memory for a TT table */
 static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
 {
-    sal_uInt32 n; 
+    sal_uInt32 n;
 
     n = (nbytes + 3) & (sal_uInt32) ~3;
     sal_uInt8* res = (sal_uInt8*)malloc(n);
@@ -487,7 +487,7 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
 
     return res;
 }
-    
+
 static void FreeGlyphData(void *ptr)
 {
     GlyphData *p = (GlyphData *) ptr;
@@ -556,7 +556,7 @@ static void TrueTypeTableDispose_cmap(TrueTypeTable *_this)
     table_cmap *t;
     CmapSubTable *s;
     sal_uInt32 i;
-    
+
     if (_this) {
         t = (table_cmap *) _this->data;
         if (t) {
@@ -614,7 +614,7 @@ static struct {
     {T_cmap, TrueTypeTableDispose_cmap},
     {T_name, TrueTypeTableDispose_name},
     {T_post, TrueTypeTableDispose_post}
-    
+
 };
 
 static int GetRawData_generic(TrueTypeTable *_this, sal_uInt8 **ptr, 
sal_uInt32 *len, sal_uInt32 *tag)
@@ -635,7 +635,7 @@ static int GetRawData_head(TrueTypeTable *_this, sal_uInt8 
**ptr, sal_uInt32 *le
     *len = TABLESIZE_head;
     *ptr = (sal_uInt8 *) _this->data;
     *tag = T_head;
-    
+
     return TTCR_OK;
 }
 
@@ -644,7 +644,7 @@ static int GetRawData_hhea(TrueTypeTable *_this, sal_uInt8 
**ptr, sal_uInt32 *le
     *len = TABLESIZE_hhea;
     *ptr = (sal_uInt8 *) _this->data;
     *tag = T_hhea;
-    
+
     return TTCR_OK;
 }
 
@@ -670,7 +670,7 @@ static int GetRawData_maxp(TrueTypeTable *_this, sal_uInt8 
**ptr, sal_uInt32 *le
     *len = TABLESIZE_maxp;
     *ptr = (sal_uInt8 *) _this->data;
     *tag = T_maxp;
-    
+
     return TTCR_OK;
 }
 
@@ -762,7 +762,7 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 
*length)
     return ptr;
 }
 
-            
+
 
 /* XXX it only handles Format 0 encoding tables */
 static sal_uInt8 *PackCmap(CmapSubTable *s, sal_uInt32 *length)
@@ -859,7 +859,7 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 
**ptr, sal_uInt32 *le
     qsort(nr, n, sizeof(NameRecord), NameRecordCompareF);
 
     int nameLen = stringLen + 12 * n + 6;
-    sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen); 
+    sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen);
 
     PutUInt16(0, name, 0, 1);
     PutUInt16(n, name, 2, 1);
@@ -923,9 +923,9 @@ static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 
**ptr, sal_uInt32 *le
     return ret;
 }
 
-    
 
-    
+
+
 
 static struct {
     sal_uInt32 tag;
@@ -941,10 +941,10 @@ static struct {
     {T_cmap, GetRawData_cmap},
     {T_name, GetRawData_name},
     {T_post, GetRawData_post}
-    
-    
+
+
 };
- 
+
 /*
  * TrueTypeTable public methods
  */
@@ -965,11 +965,11 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
                                 const sal_uInt8* ptr)
 {
     TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
-    tdata_generic* pdata = (tdata_generic*)smalloc(sizeof(tdata_generic)); 
+    tdata_generic* pdata = (tdata_generic*)smalloc(sizeof(tdata_generic));
     pdata->nbytes = nbytes;
     pdata->tag = tag;
     if (nbytes) {
-        pdata->ptr = ttmalloc(nbytes); 
+        pdata->ptr = ttmalloc(nbytes);
         memcpy(pdata->ptr, ptr, nbytes);
     } else {
         pdata->ptr = 0;
@@ -981,7 +981,7 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
 
     return table;
 }
-    
+
 TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
                                      sal_uInt16 flags,
                                      sal_uInt16 unitsPerEm,
@@ -992,7 +992,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 
fontRevision,
 {
     assert(created != 0);
 
-    TrueTypeTable* table  = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));  
+    TrueTypeTable* table  = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
     sal_uInt8* ptr = (sal_uInt8*)ttmalloc(TABLESIZE_head);
 
 
@@ -1036,7 +1036,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16  ascender,
     PutUInt16(0, ptr, 28, 1);                     /* reserved 4 */
     PutUInt16(0, ptr, 30, 1);                     /* reserved 5 */
     PutUInt16(0, ptr, 32, 1);                     /* metricDataFormat */
-    
+
     table->data = (void *) ptr;
     table->tag = T_hhea;
     table->rawdata = 0;
@@ -1066,7 +1066,7 @@ TrueTypeTable *TrueTypeTableNew_maxp( const sal_uInt8* 
maxp, int size)
     if (maxp && size == TABLESIZE_maxp) {
         memcpy(table->data, maxp, TABLESIZE_maxp);
     }
-    
+
     table->tag = T_maxp;
     table->rawdata = 0;
 
@@ -1077,7 +1077,7 @@ TrueTypeTable *TrueTypeTableNew_glyf(void)
 {
     TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
     list l = listNewEmpty();
-    
+
     assert(l != 0);
 
     listSetElementDtor(l, (list_destructor)FreeGlyphData);
@@ -1093,12 +1093,12 @@ TrueTypeTable *TrueTypeTableNew_cmap(void)
 {
     TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
     table_cmap* cmap = (table_cmap*)smalloc(sizeof(table_cmap));
-    
+
     cmap->n = 0;
     cmap->m = CMAP_SUBTABLE_INIT;
     cmap->s = (CmapSubTable *) scalloc(CMAP_SUBTABLE_INIT, 
sizeof(CmapSubTable));
     memset(cmap->s, 0, sizeof(CmapSubTable) * CMAP_SUBTABLE_INIT);
-    
+
     table->data = (table_cmap *) cmap;
 
     table->rawdata = 0;
@@ -1134,7 +1134,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord 
*nr)
 {
     TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
     list l = listNewEmpty();
-    
+
     assert(l != 0);
 
     listSetElementDtor(l, (list_destructor)DisposeNameRecord);
@@ -1203,7 +1203,7 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, 
sal_uInt32 *len, sal_uInt3
     assert(!"Unknown TrueType table.\n");
     return TTCR_UNKNOWN;
 }
-    
+
 void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
 {
     sal_uInt32 i, found;
@@ -1226,7 +1226,7 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, 
sal_uInt32 c, sal_uInt32 g)
 
     if (!found) {
         if (t->n == t->m) {
-            CmapSubTable* tmp = (CmapSubTable*)scalloc(t->m + 
CMAP_SUBTABLE_INCR, sizeof(CmapSubTable)); 
+            CmapSubTable* tmp = (CmapSubTable*)scalloc(t->m + 
CMAP_SUBTABLE_INCR, sizeof(CmapSubTable));
             memset(tmp, 0, t->m + CMAP_SUBTABLE_INCR * sizeof(CmapSubTable));
             memcpy(tmp, s, sizeof(CmapSubTable) * t->m);
             t->m += CMAP_SUBTABLE_INCR;
@@ -1332,7 +1332,7 @@ sal_uInt32 glyfCount(const TrueTypeTable *table)
     assert(table->tag == T_glyf);
     return listCount((list) table->data);
 }
-    
+
 
 void nameAdd(TrueTypeTable *table, NameRecord *nr)
 {
@@ -1422,10 +1422,10 @@ static void ProcessTables(TrueTypeCreator *tt)
 
             z = GetInt16(gd->ptr, 4, 1);
             if (z < yMin) yMin = z;
-        
+
             z = GetInt16(gd->ptr, 6, 1);
             if (z > xMax) xMax = z;
-        
+
             z = GetInt16(gd->ptr, 8, 1);
             if (z > yMax) yMax = z;
         }
@@ -1437,14 +1437,14 @@ static void ProcessTables(TrueTypeCreator *tt)
             if (gd->npoints > maxCompositePoints) maxCompositePoints = 
gd->npoints;
             if (gd->ncontours > maxCompositeContours) maxCompositeContours = 
gd->ncontours;
         }
-        
+
     } while (listNext(glyphlist));
 
     indexToLocFormat = (glyfLen / 2 > 0xFFFF) ? 1 : 0;
     locaLen = indexToLocFormat ?  (nGlyphs + 1) << 2 : (nGlyphs + 1) << 1;
 
     sal_uInt8* glyfPtr = ttmalloc(glyfLen);
-    sal_uInt8* locaPtr = ttmalloc(locaLen); 
+    sal_uInt8* locaPtr = ttmalloc(locaLen);
     TTSimpleGlyphMetrics* met = (TTSimpleGlyphMetrics*)scalloc(nGlyphs, 
sizeof(TTSimpleGlyphMetrics));
     i = 0;
 
@@ -1453,7 +1453,7 @@ static void ProcessTables(TrueTypeCreator *tt)
     p2 = locaPtr;
     do {
         GlyphData *gd = (GlyphData *) listCurrent(glyphlist);
-        
+
         if (gd->compflag) {                       /* re-number all components 
*/
             sal_uInt16 flags, index;
             sal_uInt8 *ptr = gd->ptr + 10;
@@ -1522,7 +1522,7 @@ static void ProcessTables(TrueTypeCreator *tt)
     ((tdata_loca *) loca->data)->nbytes = locaLen;
 
     AddTable(tt, loca);
-    
+
     head = FindTable(tt, T_head);
     sal_uInt8* const pHeadData = (sal_uInt8*)head->data;
     PutInt16(xMin, pHeadData, 36, 1);
@@ -1586,7 +1586,7 @@ static void ProcessTables(TrueTypeCreator *tt)
 }
 
 } // namespace vcl
-               
+
 extern "C"
 {
     /**
@@ -1606,11 +1606,11 @@ extern "C"
     {
         /* XXX do a binary search */
         unsigned int i;
-    
+
         assert(_this != 0);
-    
+
         if (_this->rawdata) free(_this->rawdata);
-    
+
         for(i=0; i < sizeof(vcl::vtable1)/sizeof(*vcl::vtable1); i++) {
             if (_this->tag == vcl::vtable1[i].tag) {
                 vcl::vtable1[i].f(_this);
@@ -1620,7 +1620,7 @@ extern "C"
         assert(!"Unknown TrueType table.\n");
     }
 }
- 
+
 
 #ifdef TEST_TTCR
 int main(void)
@@ -1661,3 +1661,5 @@ int main(void)
     return 0;
 }
 #endif
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/ttcr.hxx 
b/main/vcl/source/fontsubset/ttcr.hxx
index 63a2567d17..4e08c6086e 100644
--- a/main/vcl/source/fontsubset/ttcr.hxx
+++ b/main/vcl/source/fontsubset/ttcr.hxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -51,7 +51,7 @@ namespace vcl
     };
 
 /** Error codes for most functions */
-    enum TTCRErrCodes {                     
+    enum TTCRErrCodes {
         TTCR_OK = 0,                        /**< no error                      
                         */
         TTCR_ZEROGLYPHS = 1,                /**< At least one glyph should be 
defined                   */
         TTCR_UNKNOWN = 2,                   /**< Unknown TrueType table        
                         */
@@ -62,9 +62,7 @@ namespace vcl
     };
 
 /* ============================================================================
- *
  * TrueTypeCreator methods
- *
  * 
============================================================================ */
 
 /**
@@ -100,16 +98,14 @@ namespace vcl
     int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 
*length);
 
 /**
- * Writes a TrueType font  generated by the TrueTypeCreator to a file
+ * Writes a TrueType font generated by the TrueTypeCreator to a file
  * @return value of SFErrCodes type
  */
     int StreamToFile(TrueTypeCreator *_this, const char* fname);
 
 
 /* ============================================================================
- *
  * TrueTypeTable methods
- *
  * 
============================================================================ */
 
 
@@ -204,11 +200,9 @@ namespace vcl
 
 
 
/*------------------------------------------------------------------------------
- *
  *  Table manipulation functions
- *
  
*------------------------------------------------------------------------------*/
- 
+
 
 /**
  * Add a character/glyph pair to a cmap table
@@ -238,7 +232,7 @@ namespace vcl
  */
     void nameAdd(TrueTypeTable *, NameRecord *nr);
 
-} // namespace                  
+} // namespace
 
 
 extern "C"
@@ -255,3 +249,5 @@ extern "C"
 }
 
 #endif /* __TTCR_H */
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/xlat.cxx 
b/main/vcl/source/fontsubset/xlat.cxx
index 21f08bb28d..f476c116c9 100644
--- a/main/vcl/source/fontsubset/xlat.cxx
+++ b/main/vcl/source/fontsubset/xlat.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -165,44 +165,44 @@ static ConverterCache aCC;
 
 sal_uInt16 TranslateChar12(sal_uInt16 src)
 {
-    return aCC.convertOne( 2, src);
+       return aCC.convertOne( 2, src);
 }
 
 sal_uInt16 TranslateChar13(sal_uInt16 src)
 {
-    return aCC.convertOne( 3, src);
+       return aCC.convertOne( 3, src);
 }
 
 sal_uInt16 TranslateChar14(sal_uInt16 src)
 {
-    return aCC.convertOne( 4, src);
+       return aCC.convertOne( 4, src);
 }
 
 sal_uInt16 TranslateChar15(sal_uInt16 src)
 {
-    return aCC.convertOne( 5, src);
+       return aCC.convertOne( 5, src);
 }
 
 sal_uInt16 TranslateChar16(sal_uInt16 src)
 {
-    return aCC.convertOne( 6, src);
+       return aCC.convertOne( 6, src);
 }
-    
+
 void TranslateString12(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
 {
        aCC.convertStr( 2, src, dst, n);
 }
-            
+
 void TranslateString13(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
 {
        aCC.convertStr( 3, src, dst, n);
 }
-        
+
 void TranslateString14(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
 {
        aCC.convertStr( 4, src, dst, n);
 }
-        
+
 void TranslateString15(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
 {
        aCC.convertStr( 5, src, dst, n);
@@ -212,6 +212,7 @@ void TranslateString16(sal_uInt16 *src, sal_uInt16 *dst, 
sal_uInt32 n)
 {
        aCC.convertStr( 6, src, dst, n);
 }
-        
+
 } // namespace vcl
 
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/xlat.hxx 
b/main/vcl/source/fontsubset/xlat.hxx
index 802df7c752..c09c01f851 100644
--- a/main/vcl/source/fontsubset/xlat.hxx
+++ b/main/vcl/source/fontsubset/xlat.hxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -33,18 +33,19 @@ namespace vcl
 {
 // TODO: sal_UCS4
 
-    sal_uInt16 TranslateChar12(sal_uInt16);
-    sal_uInt16 TranslateChar13(sal_uInt16);
-    sal_uInt16 TranslateChar14(sal_uInt16);
-    sal_uInt16 TranslateChar15(sal_uInt16);
-    sal_uInt16 TranslateChar16(sal_uInt16);
-
-    void TranslateString12(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
-    void TranslateString13(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
-    void TranslateString14(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
-    void TranslateString15(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
-    void TranslateString16(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
+       sal_uInt16 TranslateChar12(sal_uInt16);
+       sal_uInt16 TranslateChar13(sal_uInt16);
+       sal_uInt16 TranslateChar14(sal_uInt16);
+       sal_uInt16 TranslateChar15(sal_uInt16);
+       sal_uInt16 TranslateChar16(sal_uInt16);
+
+       void TranslateString12(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
+       void TranslateString13(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
+       void TranslateString14(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
+       void TranslateString15(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
+       void TranslateString16(sal_uInt16 *, sal_uInt16 *, sal_uInt32);
 }
 
 #endif /* __XLAT_H */
 
+/* vim: set noet sw=4 ts=4: */


Reply via email to