summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18npool/source/breakiterator/data/dict_word.txt2
-rw-r--r--i18npool/source/breakiterator/data/dict_word_prepostdash.txt4
-rw-r--r--i18npool/source/isolang/isolang.cxx1
-rw-r--r--rsc/source/parser/erscerr.cxx2
-rw-r--r--sot/source/sdstor/sdintern.hdb22
-rw-r--r--svtools/source/misc/transfer.cxx47
-rw-r--r--tools/source/stream/strmunx.cxx6
-rw-r--r--vcl/inc/vcl/button.hxx2
-rw-r--r--vcl/source/control/button.cxx27
-rw-r--r--vcl/source/fontsubset/cff.cxx60
-rw-r--r--vcl/source/gdi/outdev3.cxx5
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx51
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx2
13 files changed, 157 insertions, 74 deletions
diff --git a/i18npool/source/breakiterator/data/dict_word.txt b/i18npool/source/breakiterator/data/dict_word.txt
index 367a82db9e..f69f038e7f 100644
--- a/i18npool/source/breakiterator/data/dict_word.txt
+++ b/i18npool/source/breakiterator/data/dict_word.txt
@@ -35,7 +35,7 @@ $ALetter = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCT
$MidLetter = [[:name = APOSTROPHE:] [:name = GRAVE ACCENT:] \u0084 [:name = SOFT HYPHEN:] [:name = MIDDLE DOT:] [:name = GREEK TONOS:] [:name= FULL STOP:]
[:name = HEBREW PUNCTUATION GERSHAYIM:] [:name = DOUBLE VERTICAL LINE:] [:name = LEFT SINGLE QUOTATION MARK:]
[:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:]
- [:name = HYPHEN-MINUS:] [:name = EN DASH:] [:name = EM DASH:] ];
+ [:name = HYPHEN-MINUS:] ];
$SufixLetter = [:name= FULL STOP:];
diff --git a/i18npool/source/breakiterator/data/dict_word_prepostdash.txt b/i18npool/source/breakiterator/data/dict_word_prepostdash.txt
index 1bf94451fa..0a60cc5d49 100644
--- a/i18npool/source/breakiterator/data/dict_word_prepostdash.txt
+++ b/i18npool/source/breakiterator/data/dict_word_prepostdash.txt
@@ -27,7 +27,7 @@ $Hangul = [:Script = HANGUL:];
# list of dashes or hyphens that should be accepted as part of the word if a single one of these
# pre- or postfixes a word. E.g. in German: "Arbeits-" or "-nehmer" where that hyphen needs to
# be part of the word in order to have it properly spell checked etc.
-$PrePostDashHyphen = [ [:name = HYPHEN-MINUS:] [:name = EN DASH:] [:name = EM DASH:] ];
+$PrePostDashHyphen = [ [:name = HYPHEN-MINUS:] ];
$ALetter = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCTUATION GERESH:]
@@ -41,7 +41,7 @@ $ALetter = [\u0002 [:Alphabetic:] [:name= COMMERCIAL AT:] [:name= HEBREW PUNCT
$MidLetter = [[:name = APOSTROPHE:] [:name = GRAVE ACCENT:] \u0084 [:name = SOFT HYPHEN:] [:name = MIDDLE DOT:] [:name = GREEK TONOS:] [:name= FULL STOP:]
[:name = HEBREW PUNCTUATION GERSHAYIM:] [:name = DOUBLE VERTICAL LINE:] [:name = LEFT SINGLE QUOTATION MARK:]
[:name = RIGHT SINGLE QUOTATION MARK:] [:name = HYPHENATION POINT:] [:name = PRIME:]
- [:name = HYPHEN-MINUS:] [:name = EN DASH:] [:name = EM DASH:] ];
+ [:name = HYPHEN-MINUS:] ];
$SufixLetter = [:name= FULL STOP:];
diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx
index 6ba1ad1b81..882313bea0 100644
--- a/i18npool/source/isolang/isolang.cxx
+++ b/i18npool/source/isolang/isolang.cxx
@@ -288,6 +288,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
{ LANGUAGE_CATALAN, "ca", "ES" }, // Spain (default)
{ LANGUAGE_CATALAN, "ca", "AD" }, // Andorra
{ LANGUAGE_USER_CATALAN_VALENCIAN, "ca", "XV" }, // XV: ISO 3166 user-assigned; workaround for UI localization only, do not use in document content!
+ { LANGUAGE_USER_CATALAN_VALENCIAN, "qcv", "ES" }, // qcv: ISO 639-3 reserved-for-local-use; for another UI localization, do not use in document content!
{ LANGUAGE_FRENCH_CAMEROON, "fr", "CM" },
{ LANGUAGE_FRENCH_COTE_D_IVOIRE, "fr", "CI" },
{ LANGUAGE_FRENCH_HAITI, "fr", "HT" },
diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx
index cd7d99439c..dfb7c7c1bd 100644
--- a/rsc/source/parser/erscerr.cxx
+++ b/rsc/source/parser/erscerr.cxx
@@ -199,7 +199,7 @@ void RscError::WriteError( const ERRTYPE& rError, const char * pMessage )
case ERR_NOINPUT:
StdLstErr( "Input file was not specified.\n");
case ERR_USAGE:
- StdLstOut( "Copyright (C) 1990-92 STAR DIVISION GmbH\n" );
+ StdLstOut( "Copyright (C) 2000, 2010 Oracle and/or its affiliates.\n" );
{
char buf[40];
diff --git a/sot/source/sdstor/sdintern.hdb b/sot/source/sdstor/sdintern.hdb
deleted file mode 100644
index 4dfbc69be0..0000000000
--- a/sot/source/sdstor/sdintern.hdb
+++ /dev/null
@@ -1,22 +0,0 @@
-write "/*************************************************************************"
-write "* SDINTERN.HXX"
-write "* __DATE__"
-write "* (c) 1992-1995 STAR DIVISION"
-write "*************************************************************************/"
-write "#ifndef _SDINTERN_HXX"
-write "#define _SDINTERN_HXX"
-write "#ifndef _SOLAR_H"
-write "#include <tools/solar.h>"
-write "#endif"
-write "#ifndef _STREAM_HXX"
-write "#include <tools/stream.hxx>"
-write "#endif"
-file stg.hxx
-file stgelem.hxx
-file stgcache.hxx
-file stgio.hxx
-file stgstrms.hxx
-file stgavl.hxx
-file stgdir.hxx
-write "#endif"
-
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 84c2bb6040..15670dcfbf 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -42,6 +42,7 @@
#include <vos/mutex.hxx>
#include <rtl/memory.h>
#include <rtl/uuid.h>
+#include <rtl/uri.hxx>
#ifndef DEBUG_HXX
#include <tools/debug.hxx>
#endif
@@ -60,7 +61,7 @@
#include <comphelper/processfactory.hxx>
#include <sot/filelist.hxx>
#include <cppuhelper/implbase1.hxx>
-
+#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
#include <comphelper/seqstream.hxx>
#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
@@ -83,7 +84,7 @@
// --------------
// - Namespaces -
// --------------
-
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
@@ -154,6 +155,10 @@ SvStream& operator<<( SvStream& rOStm, const TransferableObjectDescriptor& rObjD
}
// -----------------------------------------------------------------------------
+// the reading of the parameter is done using the special service ::com::sun::star::datatransfer::MimeContentType,
+// a similar approach should be implemented for creation of the mimetype string;
+// for now the set of acceptable characters has to be hardcoded, in future it should be part of the service that creates the mimetype
+const ::rtl::OUString aQuotedParamChars = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "()<>@,;:\\\"/[]?=!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~. " ) );
static ::rtl::OUString ImplGetParameterString( const TransferableObjectDescriptor& rObjDesc )
{
@@ -177,8 +182,21 @@ static ::rtl::OUString ImplGetParameterString( const TransferableObjectDescripto
if( rObjDesc.maDisplayName.Len() )
{
+ // the display name might contain unacceptable characters, encode all of them
+ // this seems to be the only parameter currently that might contain such characters
+ sal_Bool pToAccept[128];
+ for ( sal_Int32 nBInd = 0; nBInd < 128; nBInd++ )
+ pToAccept[nBInd] = sal_False;
+
+ for ( sal_Int32 nInd = 0; nInd < aQuotedParamChars.getLength(); nInd++ )
+ {
+ sal_Unicode nChar = aQuotedParamChars.getStr()[nInd];
+ if ( nChar < 128 )
+ pToAccept[nChar] = sal_True;
+ }
+
aParams += ::rtl::OUString::createFromAscii( ";displayname=\"" );
- aParams += rObjDesc.maDisplayName;
+ aParams += ::rtl::Uri::encode( rObjDesc.maDisplayName, pToAccept, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 );
aParams += aChar;
}
@@ -248,7 +266,9 @@ static void ImplSetParameterString( TransferableObjectDescriptor& rObjDesc, cons
if( xMimeType->hasParameter( aDisplayNameString ) )
{
- rObjDesc.maDisplayName = xMimeType->getParameterValue( aDisplayNameString );
+ // the display name might contain unacceptable characters, in this case they should be encoded
+ // this seems to be the only parameter currently that might contain such characters
+ rObjDesc.maDisplayName = ::rtl::Uri::decode( xMimeType->getParameterValue( aDisplayNameString ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
}
if( xMimeType->hasParameter( aViewAspectString ) )
@@ -2135,11 +2155,24 @@ sal_Bool TransferableDataHelper::GetFileList(
if( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( "text/uri-list" ) ) > -1 )
{
ByteString aByteString;
-
+ Reference<uri::XExternalUriReferenceTranslator> xTranslator(
+ comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"))), UNO_QUERY);
while( xStm->ReadLine( aByteString ) )
+ {
+
if( aByteString.Len() && aByteString.GetChar( 0 ) != '#' )
- rFileList.AppendFile( String( aByteString, RTL_TEXTENCODING_UTF8 ) );
-
+ {
+ String sURL( aByteString, RTL_TEXTENCODING_UTF8 );
+ if(xTranslator.is())
+ {
+ String sNew = xTranslator->translateToInternal(sURL);
+ if( sNew.Len() )
+ sURL = sNew;
+ }
+
+ rFileList.AppendFile( sURL );
+ }
+ }
bRet = sal_True;
}
else
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 9e27003d35..e38fa2ef3b 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -91,7 +91,7 @@ InternalStreamLock::InternalStreamLock(
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "locked %s", aFileName.GetBuffer() );
if( m_nStartPos || m_nEndPos )
- fprintf(stderr, " [ %d ... %d ]", m_nStartPos, m_nEndPos );
+ fprintf(stderr, " [ %ld ... %ld ]", m_nStartPos, m_nEndPos );
fprintf( stderr, "\n" );
#endif
}
@@ -103,7 +103,7 @@ InternalStreamLock::~InternalStreamLock()
ByteString aFileName(m_pStream->GetFileName(), osl_getThreadTextEncoding());
fprintf( stderr, "unlocked %s", aFileName.GetBuffer() );
if( m_nStartPos || m_nEndPos )
- fprintf(stderr, " [ %d ... %d ]", m_nStartPos, m_nEndPos );
+ fprintf(stderr, " [ %ld ... %ld ]", m_nStartPos, m_nEndPos );
fprintf( stderr, "\n" );
#endif
}
@@ -514,7 +514,7 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
if( ! InternalStreamLock::LockFile( nByteOffset, nByteOffset+nBytes, this ) )
{
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "InternalLock on %s [ %d ... %d ] failed\n",
+ fprintf( stderr, "InternalLock on %s [ %ld ... %ld ] failed\n",
ByteString(aFilename, osl_getThreadTextEncoding()).GetBuffer(), nByteOffset, nByteOffset+nBytes );
#endif
return sal_False;
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 448f127f43..114137edc7 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -60,7 +60,7 @@ public:
SAL_DLLPRIVATE USHORT ImplGetTextStyle( XubString& rText, WinBits nWinStyle, ULONG nDrawFlags );
SAL_DLLPRIVATE void ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, Size& rSize,
BOOL bLayout, ULONG nImageSep, ULONG nDrawFlags,
- USHORT nTextStyle, Rectangle *pSymbolRect=NULL );
+ USHORT nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false );
SAL_DLLPRIVATE void ImplSetFocusRect( const Rectangle &rFocusRect );
SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const;
SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 6b35e7c000..5c6cb822ab 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -367,7 +367,8 @@ USHORT Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
Size& rSize, BOOL bLayout,
ULONG nImageSep, ULONG nDrawFlags,
- USHORT nTextStyle, Rectangle *pSymbolRect )
+ USHORT nTextStyle, Rectangle *pSymbolRect,
+ bool bAddImageSep )
{
XubString aText( GetText() );
BOOL bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
@@ -394,7 +395,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
-
+
// Drawing text or symbol only is simple, use style and output rectangle
if ( bHasSymbol && !bDrawImage && !bDrawText )
{
@@ -503,6 +504,13 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
if ( aTSSize.Height() < aTextSize.Height() )
aTSSize.Height() = aTextSize.Height();
+
+ if( bAddImageSep && bDrawImage )
+ {
+ long nDiff = (aImageSize.Height() - aTextSize.Height()) / 3;
+ if( nDiff > 0 )
+ nImageSep += nDiff;
+ }
}
aMax.Width() = aTSSize.Width() > aImageSize.Width() ? aTSSize.Width() : aImageSize.Width();
@@ -887,7 +895,9 @@ void PushButton::ImplInitSettings( BOOL bFont,
EnableChildTransparentMode( TRUE );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
SetPaintTransparent( TRUE );
- mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
+ mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON)
+ ? false
+ : ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
@@ -1201,8 +1211,10 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
ULONG nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
if( nImageSep < 1 )
nImageSep = 1;
+ // FIXME: (GetStyle() & WB_FLATBUTTON) != 0 is preliminary
+ // in the next major this should be replaced by "true"
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
- nTextStyle, IsSymbol() ? &aSymbolRect : NULL );
+ nTextStyle, IsSymbol() ? &aSymbolRect : NULL, (GetStyle() & WB_FLATBUTTON) != 0 );
if ( IsSymbol() && ! bLayout )
{
@@ -1370,7 +1382,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
Size aInRectSize( LogicToPixel( Size( aInRect.GetWidth(), aInRect.GetHeight() ) ) );
aPBVal.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height() );
- if( ((nState & CTRL_STATE_ROLLOVER) || HasFocus()) || ! (GetStyle() & WB_FLATBUTTON) )
+ if( ((nState & CTRL_STATE_ROLLOVER)) || ! (GetStyle() & WB_FLATBUTTON) )
{
bNativeOK = DrawNativeControl( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
aControlValue, rtl::OUString()/*PushButton::GetText()*/ );
@@ -1395,7 +1407,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if( (GetStyle() & WB_FLATBUTTON) )
{
Rectangle aTempRect( aInRect );
- if( ! bLayout && (bRollOver || HasFocus()) )
+ if( ! bLayout && bRollOver )
ImplDrawPushButtonFrame( this, aTempRect, nButtonStyle );
aInRect.Left() += 2;
aInRect.Top() += 2;
@@ -1886,7 +1898,8 @@ long PushButton::PreNotify( NotifyEvent& rNEvt )
pBorder->Update();
}
}
- else if( IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) )
+ else if( (GetStyle() & WB_FLATBUTTON) ||
+ IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) )
{
Invalidate();
}
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 9b7267e83a..06a0394b00 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -33,6 +33,7 @@
#include <assert.h>
#include <vcl/fontsubset.hxx>
+#include <vcl/strhelper.hxx>
//#define IGNORE_HINTS
@@ -2155,6 +2156,17 @@ void Type1Emitter::emitAllCrypted( void)
// --------------------------------------------------------------------
+// #i110387# quick-and-dirty double->ascii conversion
+// needed because sprintf/ecvt/etc. alone are too localized (LC_NUMERIC)
+// also strip off trailing zeros in fraction while we are at it
+inline int dbl2str( char* pOut, double fVal, int nPrecision=6)
+{
+ const int nLen = psp::getValueOfDouble( pOut, fVal, nPrecision);
+ return nLen;
+}
+
+// --------------------------------------------------------------------
+
void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
const ValVector& rVector)
{
@@ -2170,10 +2182,11 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
aVal = *it;
if( ++it == rVector.end() )
break;
- mpPtr += sprintf( mpPtr, "%g ", aVal);
+ mpPtr += dbl2str( mpPtr, aVal);
+ *(mpPtr++) = ' ';
}
// emit the last value
- mpPtr += sprintf( mpPtr, "%g", aVal);
+ mpPtr += dbl2str( mpPtr, aVal);
// emit the line tail
mpPtr += sprintf( mpPtr, pLineTail);
}
@@ -2330,18 +2343,33 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
rEmitter.emitValVector( "/FamilyBlues [", "]ND\n", mpCffLocal->maFamilyBlues);
rEmitter.emitValVector( "/FamilyOtherBlues [", "]ND\n", mpCffLocal->maFamilyOtherBlues);
- if( mpCffLocal->mfBlueScale)
- pOut += sprintf( pOut, "/BlueScale %.6f def\n", mpCffLocal->mfBlueScale);
- if( mpCffLocal->mfBlueShift) // default BlueShift==7
- pOut += sprintf( pOut, "/BlueShift %.1f def\n", mpCffLocal->mfBlueShift);
- if( mpCffLocal->mfBlueFuzz) // default BlueFuzz==1
- pOut += sprintf( pOut, "/BlueFuzz %.1f def\n", mpCffLocal->mfBlueFuzz);
+ if( mpCffLocal->mfBlueScale) {
+ pOut += sprintf( pOut, "/BlueScale ");
+ pOut += dbl2str( pOut, mpCffLocal->mfBlueScale, 6);
+ pOut += sprintf( pOut, " def\n");
+ }
+ if( mpCffLocal->mfBlueShift) { // default BlueShift==7
+ pOut += sprintf( pOut, "/BlueShift ");
+ pOut += dbl2str( pOut, mpCffLocal->mfBlueShift);
+ pOut += sprintf( pOut, " def\n");
+ }
+ if( mpCffLocal->mfBlueFuzz) { // default BlueFuzz==1
+ pOut += sprintf( pOut, "/BlueFuzz ");
+ pOut += dbl2str( pOut, mpCffLocal->mfBlueFuzz);
+ pOut += sprintf( pOut, " def\n");
+ }
// emit stem hint related privdict entries
- if( mpCffLocal->maStemStdHW)
- pOut += sprintf( pOut, "/StdHW [%g] def\n", mpCffLocal->maStemStdHW);
- if( mpCffLocal->maStemStdVW)
- pOut += sprintf( pOut, "/StdVW [%g] def\n", mpCffLocal->maStemStdVW);
+ if( mpCffLocal->maStemStdHW) {
+ pOut += sprintf( pOut, "/StdHW [");
+ pOut += dbl2str( pOut, mpCffLocal->maStemStdHW);
+ pOut += sprintf( pOut, "] def\n");
+ }
+ if( mpCffLocal->maStemStdVW) {
+ pOut += sprintf( pOut, "/StdVW [");
+ pOut += dbl2str( pOut, mpCffLocal->maStemStdVW);
+ pOut += sprintf( pOut, "] def\n");
+ }
rEmitter.emitValVector( "/StemSnapH [", "]ND\n", mpCffLocal->maStemSnapH);
rEmitter.emitValVector( "/StemSnapV [", "]ND\n", mpCffLocal->maStemSnapV);
@@ -2352,8 +2380,11 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += sprintf( pOut, "/LanguageGroup %d def\n", mpCffLocal->mnLangGroup);
if( mpCffLocal->mnLangGroup == 1) // compatibility with ancient printers
pOut += sprintf( pOut, "/RndStemUp false def\n");
- if( mpCffLocal->mfExpFactor)
- pOut += sprintf( pOut, "/ExpansionFactor %.2f def\n", mpCffLocal->mfExpFactor);
+ if( mpCffLocal->mfExpFactor) {
+ pOut += sprintf( pOut, "/ExpansionFactor ");
+ pOut += dbl2str( pOut, mpCffLocal->mfExpFactor);
+ pOut += sprintf( pOut, " def\n");
+ }
#endif // IGNORE_HINTS
// emit remaining privdict entries
@@ -2376,6 +2407,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
// emit used GlobalSubr charstrings
// these are the just the default subrs
+ // TODO: do we need them as the flex hints are resolved differently?
static const char aSubrs[] =
"/Subrs 5 array\n"
"dup 0 15 RD \x5F\x3D\x6B\xAC\x3C\xBD\x74\x3D\x3E\x17\xA0\x86\x58\x08\x85 NP\n"
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 0fb5a3b932..608487489f 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2639,11 +2639,14 @@ ImplDevFontListData* ImplDevFontList::FindDefaultFont() const
ImplDevFontList* ImplDevFontList::Clone( bool bScalable, bool bEmbeddable ) const
{
ImplDevFontList* pClonedList = new ImplDevFontList;
- pClonedList->mbMatchData = mbMatchData;
+// pClonedList->mbMatchData = mbMatchData;
pClonedList->mbMapNames = mbMapNames;
pClonedList->mpPreMatchHook = mpPreMatchHook;
pClonedList->mpFallbackHook = mpFallbackHook;
+ // TODO: clone the config-font attributes too?
+ pClonedList->mbMatchData = false;
+
DevFontList::const_iterator it = maDevFontList.begin();
for(; it != maDevFontList.end(); ++it )
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c5022e4541..73962114f2 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1793,9 +1793,9 @@ inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OString& rInSt
appendLiteralStringEncrypt( aBufferString, nInObjectNumber, rOutBuffer);
}
-inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer )
+inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OUString& rInString, rtl_TextEncoding eEnc, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer )
{
- rtl::OString aBufferString( rtl::OUStringToOString( rInString, RTL_TEXTENCODING_ASCII_US ) );
+ rtl::OString aBufferString( rtl::OUStringToOString( rInString, eEnc ) );
appendLiteralStringEncrypt( aBufferString, nInObjectNumber, rOutBuffer);
}
@@ -2635,7 +2635,7 @@ sal_Int32 PDFWriterImpl::emitStructure( PDFStructureElement& rEle )
aLocBuf.append( rEle.m_aLocale.Country );
}
aLine.append( "/Lang" );
- appendLiteralStringEncrypt( aLocBuf.makeStringAndClear(), rEle.m_nObject, aLine );
+ appendLiteralStringEncrypt( aLocBuf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US, rEle.m_nObject, aLine );
aLine.append( "\n" );
}
if( ! rEle.m_aKids.empty() )
@@ -4262,7 +4262,7 @@ we check in the following sequence:
{
aLine.append( "/Launch/Win<</F" );
// INetURLObject is not good with UNC paths, use original path
- appendLiteralStringEncrypt( rLink.m_aURL, rLink.m_nObject, aLine );
+ appendLiteralStringEncrypt( rLink.m_aURL, osl_getThreadTextEncoding(), rLink.m_nObject, aLine );
aLine.append( ">>" );
}
else
@@ -4273,6 +4273,7 @@ we check in the following sequence:
nSetRelative++;
rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
+ bool bURI = false;
if( nSetGoToRMode == 0 )
switch( m_aContext.DefaultLinkAction )
{
@@ -4280,6 +4281,7 @@ we check in the following sequence:
case PDFWriter::URIAction :
case PDFWriter::URIActionDestination :
aLine.append( "/URI/URI" );
+ bURI = true;
break;
case PDFWriter::LaunchAction:
// now:
@@ -4291,7 +4293,10 @@ we check in the following sequence:
// and will force the use of URI when the protocol is not file://
if( (aFragment.getLength() > 0 && !bTargetHasPDFExtension) ||
eTargetProtocol != INET_PROT_FILE )
+ {
aLine.append( "/URI/URI" );
+ bURI = true;
+ }
else
aLine.append( "/Launch/F" );
break;
@@ -4302,10 +4307,19 @@ we check in the following sequence:
{//add the fragment
aLine.append("/GoToR");
aLine.append("/F");
- appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
- INetURLObject::WAS_ENCODED,
- INetURLObject::DECODE_WITH_CHARSET ) :
- aURLNoMark, rLink.m_nObject, aLine );
+ rtl::OUString aURI( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_WITH_CHARSET ) :
+ aURLNoMark );
+ rtl::OUString aSysPath;
+ if( nSetRelative )
+ aSysPath = aURI;
+ else
+ osl_getSystemPathFromFileURL( aURI.pData, &aSysPath.pData );
+ appendLiteralStringEncrypt( aSysPath,
+ osl_getThreadTextEncoding(),
+ rLink.m_nObject,
+ aLine );
if( aFragment.getLength() > 0 )
{
aLine.append("/D/");
@@ -4324,13 +4338,22 @@ we check in the following sequence:
//substitute the fragment
aTargetURL.SetMark( aLineLoc.getStr() );
}
- rtl::OUString aURL = aTargetURL.GetMainURL( (nSetRelative || eTargetProtocol == INET_PROT_FILE) ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
+ rtl::OUString aURL = aTargetURL.GetMainURL( (nSetRelative) ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
+ rtl::OUString aSysPath;
+ if( nSetRelative || bURI )
+ {
+ if( nSetRelative )
+ aSysPath = INetURLObject::GetRelURL( m_aContext.BaseURL, aURL );
+ else
+ aSysPath = aURL;
+ }
+ else
+ osl_getSystemPathFromFileURL( aURL.pData, &aSysPath.pData );
// check if we have a URL available, if the string is empty, set it as the original one
// if( aURL.getLength() == 0 )
// appendLiteralStringEncrypt( rLink.m_aURL , rLink.m_nObject, aLine );
// else
- appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL ) :
- aURL , rLink.m_nObject, aLine );
+ appendLiteralStringEncrypt( aSysPath, osl_getThreadTextEncoding(), rLink.m_nObject, aLine );
}
//<--- i56629
}
@@ -5205,7 +5228,7 @@ bool PDFWriterImpl::emitWidgetAnnotations()
{
// create a submit form action
aLine.append( "/AA<</D<</Type/Action/S/SubmitForm/F" );
- appendLiteralStringEncrypt( rWidget.m_aListEntries.front(), rWidget.m_nObject, aLine );
+ appendLiteralStringEncrypt( rWidget.m_aListEntries.front(), RTL_TEXTENCODING_ASCII_US, rWidget.m_nObject, aLine );
aLine.append( "/Flags " );
sal_Int32 nFlags = 0;
@@ -5553,7 +5576,7 @@ bool PDFWriterImpl::emitCatalog()
aLocBuf.append( m_aContext.DocumentLocale.Country );
}
aLine.append( "/Lang" );
- appendLiteralStringEncrypt( aLocBuf.makeStringAndClear(), m_nCatalogObject, aLine );
+ appendLiteralStringEncrypt( aLocBuf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US, m_nCatalogObject, aLine );
aLine.append( "\n" );
}
if( m_aContext.Tagged && m_aContext.Version > PDFWriter::PDF_1_3 )
@@ -5823,7 +5846,7 @@ sal_Int32 PDFWriterImpl::emitOutputIntent()
aLine.append( " 0 obj\n"
"<</Type/OutputIntent/S/GTS_PDFA1/OutputConditionIdentifier");
- rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "sRGB IEC61966-2.1" ) );
+ rtl::OString aComment( "sRGB IEC61966-2.1" );
appendLiteralStringEncrypt( aComment ,nOIObject, aLine );
aLine.append("/DestOutputProfile ");
aLine.append( nICCObject );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 0b5de1dfe9..4d67f507b1 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -851,7 +851,7 @@ i12626
// test if the encryption is active, if yes than encrypt the unicode string and add to the OStringBuffer parameter
void appendUnicodeTextStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
- void appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
+ void appendLiteralStringEncrypt( const rtl::OUString& rInString, rtl_TextEncoding, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
void appendLiteralStringEncrypt( const rtl::OString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
void appendLiteralStringEncrypt( rtl::OStringBuffer& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );