editeng/source/misc/svxacorr.cxx | 5 +++++ sc/source/filter/inc/formulaparser.hxx | 2 +- sc/source/filter/oox/formulaparser.cxx | 15 ++++++++------- vcl/generic/fontmanager/fontmanager.cxx | 14 ++++---------- vcl/generic/print/genpspgraphics.cxx | 2 +- vcl/generic/print/glyphset.cxx | 12 +++++------- 6 files changed, 24 insertions(+), 26 deletions(-)
New commits: commit 1166c0f8f3b06f7676a77bfd4d9fe75108e52bcb Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net> Date: Tue Nov 19 19:55:55 2013 +0100 fdo#67742 Avoid autocorr of "--" before "-" LibO 4.1 now uses '-' as word separator for AutoCorrection Then the sequence "---" is detected as word "--" and autocorrect as "â". This avoids autocorrection of "---", as word or as border This commit detects the sequence "---" and report autocorrection. Modified for LibO 4.1 (OUString => String) Change-Id: I1342c2ff83dd42683e683b3bb27280d61179b9a2 Reviewed-on: https://gerrit.libreoffice.org/6747 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index cc61b5e..a5e2279 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1330,6 +1330,11 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, sal_Bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, *this, ppPara ); + // since LibO 4.1, '-' is a word separator + // fdo#67742 avoid "--" to be replaced by "â" if next is "-" + if( rTxt.Len() >= 3 && + rTxt.Equals( String("---"), rTxt.Len()-3, 3 ) ) + break; if( !bChgWord ) { xub_StrLen nCapLttrPos1 = nCapLttrPos, nInsPos1 = nInsPos; commit aca8dee99023af551a935d1b87befdfbdacac10f Author: Khaled Hosny <khaledho...@eglug.org> Date: Thu Nov 21 22:59:06 2013 +0200 fdo#67802: Fix PS printing of non-CTL text with ligatures The GlyphSet::AddGlyphID() was messing with glyphs of characters that can be converted to Windows-1252 encoding, discarding whatever glyph it was asked to use and using a random glyph that is supposed to belong to the converted character. For ligatures this means the ligature glyphs was discarded and the glyphs for its component was used, but this broken for just any glyph substitution. The code makes no sense at all, apart from the fact that it is verbatim copy of GlyphSet::AddCharID() since 9754ad8d979557ea03cbfe04708b62b698d1276c and just happened to work because we did not enable ligatures and other typographic features for non-CTL text before. Change-Id: I764f0b40f8acf61eae38a9038b0666d711c04a9d Reviewed-on: https://gerrit.libreoffice.org/6762 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx index d22d2c8..bb43ef5 100644 --- a/vcl/generic/print/glyphset.cxx +++ b/vcl/generic/print/glyphset.cxx @@ -275,16 +275,14 @@ GlyphSet::AddGlyphID ( sal_Int32* nOutGlyphSetID ) { - sal_uChar nMappedChar; + sal_uChar nMappedChar = 0; // XXX important: avoid to reencode type1 symbol fonts if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) nMappedChar = GetSymbolMapping (nUnicode); - else - nMappedChar = GetAnsiMapping (nUnicode); - // create an empty glyphmap that is reserved for iso1252 encoded glyphs - // (or -- unencoded -- symbol glyphs) and a second map that takes any other + // create an empty glyphmap that is reserved for unencoded symbol glyphs, + // and a second map that takes any other if (maGlyphList.empty()) { glyph_map_t aMap, aMapp; @@ -302,7 +300,7 @@ GlyphSet::AddGlyphID ( // insert a new glyph in the font subset if (nMappedChar) { - // always put iso1252 chars into the first map, map them on itself + // always put symbol glyphs into the first map, map them on itself glyph_map_t& aGlyphSet = maGlyphList.front(); AddNotdef (aGlyphSet); @@ -312,7 +310,7 @@ GlyphSet::AddGlyphID ( } else { - // other chars are just appended to the list + // other glyphs are just appended to the list glyph_map_t& aGlyphSet = maGlyphList.back(); AddNotdef (aGlyphSet); commit 8cabbc340397bd92f1c3bd34c4e35364715da30b Author: Khaled Hosny <khaledho...@eglug.org> Date: Sat Nov 23 13:40:50 2013 +0200 Correctly check getFileURLFromSystemPath() success Change-Id: Iadc34171235fec2d6aafd601f62a0bff8ed5b3ee Reviewed-on: https://gerrit.libreoffice.org/6770 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index 10af660..993d8d5 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -1390,7 +1390,7 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs #else // FIXME: test me ! ... OUString aURL; - if( !osl::File::getFileURLFromSystemPath( OStringToOUString( aSysPath, osl_getThreadTextEncoding() ), aURL ) ) + if( osl::File::getFileURLFromSystemPath( OStringToOUString( aSysPath, osl_getThreadTextEncoding() ), aURL ) != osl::File::E_None ) return NULL; osl::File aFile( aURL ); if( aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock ) != osl::File::E_None ) commit ce7881ed62c702f21b905258f9f05e337bbacc28 Author: Khaled Hosny <khaledho...@eglug.org> Date: Sat Nov 23 13:12:59 2013 +0200 Make TTC fonts work again osl::File::getFileURLFromSystemPath() does not return a boolean. I wonder how this worked before, if it worked at all. Change-Id: Iadc0e06236f43c24cbcd42e4fd79ac9116a58c13 Reviewed-on: https://gerrit.libreoffice.org/6769 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index 418f480..5e92170 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -1176,20 +1176,14 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, :: fprintf( stderr, "ttc: %s contains %d fonts\n", aFullPath.getStr(), nLength ); #endif - sal_uInt64 fileSize; + sal_uInt64 fileSize = 0; OUString aURL; - if (!osl::File::getFileURLFromSystemPath(OStringToOUString(aFullPath, osl_getThreadTextEncoding()), - aURL)) - { - fileSize = 0; - } - else + if (osl::File::getFileURLFromSystemPath(OStringToOUString(aFullPath, osl_getThreadTextEncoding()), + aURL) == osl::File::E_None) { osl::File aFile(aURL); - if (aFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock) != osl::File::E_None) - fileSize = 0; - else + if (aFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock) == osl::File::E_None) { osl::DirectoryItem aItem; osl::DirectoryItem::get( aURL, aItem ); commit 0f8accf4e7677e7b75c9bd4b11d046a1cab67a56 Author: Eike Rathke <er...@redhat.com> Date: Fri Nov 22 23:25:00 2013 +0100 resolved fdo#38592 do not insert extraneous parameter in import Importing already a Calc-only number of parameters do not insert extraneous parameters. (cherry picked from commit 4b9304ecdd067307e24e4388fe1addcab9e85bd0) Change-Id: I011e3df24573fce9f2788c9311089af984650220 Reviewed-on: https://gerrit.libreoffice.org/6764 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/filter/inc/formulaparser.hxx b/sc/source/filter/inc/formulaparser.hxx index 33135ab..cc61018 100644 --- a/sc/source/filter/inc/formulaparser.hxx +++ b/sc/source/filter/inc/formulaparser.hxx @@ -80,7 +80,7 @@ private: const ApiToken* skipParentheses( const ApiToken* pToken, const ApiToken* pTokenEnd ) const; const ApiToken* findParameters( ParameterPosVector& rParams, const ApiToken* pToken, const ApiToken* pTokenEnd ) const; void appendEmptyParameter( const FunctionInfo& rFuncInfo, size_t nParam ); - void appendCalcOnlyParameter( const FunctionInfo& rFuncInfo, size_t nParam ); + void appendCalcOnlyParameter( const FunctionInfo& rFuncInfo, size_t nParam, size_t nParamCount ); void appendRequiredParameters( const FunctionInfo& rFuncInfo, size_t nParamCount ); bool appendFinalToken( const ApiToken& rToken ); diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx index cf79c71..f6f2948 100644 --- a/sc/source/filter/oox/formulaparser.cxx +++ b/sc/source/filter/oox/formulaparser.cxx @@ -223,7 +223,7 @@ const ApiToken* FormulaFinalizer::processParameters( // add embedded Calc-only parameters if( aParamInfoIt.isCalcOnlyParam() ) { - appendCalcOnlyParameter( *pRealFuncInfo, nParam ); + appendCalcOnlyParameter( *pRealFuncInfo, nParam, nParamCount ); while( aParamInfoIt.isCalcOnlyParam() ) ++aParamInfoIt; } @@ -274,7 +274,7 @@ const ApiToken* FormulaFinalizer::processParameters( // add trailing Calc-only parameters if( aParamInfoIt.isCalcOnlyParam() ) - appendCalcOnlyParameter( *pRealFuncInfo, nLastValidCount ); + appendCalcOnlyParameter( *pRealFuncInfo, nLastValidCount, nParamCount ); // add optional parameters that are required in Calc appendRequiredParameters( *pRealFuncInfo, nLastValidCount ); @@ -381,16 +381,17 @@ void FormulaFinalizer::appendEmptyParameter( const FunctionInfo& rFuncInfo, size maTokens.append( OPCODE_MISSING ); } -void FormulaFinalizer::appendCalcOnlyParameter( const FunctionInfo& rFuncInfo, size_t nParam ) +void FormulaFinalizer::appendCalcOnlyParameter( const FunctionInfo& rFuncInfo, size_t nParam, size_t nParamCount ) { - (void)nParam; // prevent 'unused' warning switch( rFuncInfo.mnBiff12FuncId ) { case BIFF_FUNC_FLOOR: case BIFF_FUNC_CEILING: - OSL_ENSURE( nParam == 2, "FormulaFinalizer::appendCalcOnlyParameter - unexpected parameter index" ); - maTokens.append< double >( OPCODE_PUSH, 1.0 ); - maTokens.append( OPCODE_SEP ); + if (nParam == 2 && nParamCount < 3) + { + maTokens.append< double >( OPCODE_PUSH, 1.0 ); + maTokens.append( OPCODE_SEP ); + } break; } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits