[Libreoffice-commits] .: 6 commits - canvas/prj canvas/source l10ntools/inc l10ntools/source tools/inc tools/source vcl/aqua vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/prj vcl/source vcl/unx vcl/util
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Jun 30 03:36:57 PDT 2011
canvas/prj/build.lst | 2
canvas/source/cairo/makefile.mk | 6
l10ntools/inc/export.hxx | 9
l10ntools/source/cfgmerge.cxx | 7
l10ntools/source/export.cxx | 25 --
l10ntools/source/export2.cxx | 113 ---------
l10ntools/source/helpmerge.cxx | 2
l10ntools/source/xrmmerge.cxx | 1
tools/inc/tools/string.hxx | 1
tools/source/string/tstring.cxx | 13 -
vcl/Library_vcl.mk | 6
vcl/Library_vclplug_gen.mk | 22 +
vcl/aqua/source/gdi/salbmp.cxx | 2
vcl/prj/build.lst | 2
vcl/source/components/makefile.mk | 55 ----
vcl/source/gdi/makefile.mk | 127 ----------
vcl/unx/generic/gdi/salgdi3.cxx | 262 +++------------------
vcl/util/makefile.mk | 465 --------------------------------------
18 files changed, 66 insertions(+), 1054 deletions(-)
New commits:
commit b1b525962b671673deebda78c4b1f5d6300f2905
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 30 10:50:21 2011 +0100
callcatcher: unused code
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 9724138..7be7aaa 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -345,23 +345,17 @@ public:
static void QuotHTML( ByteString &rString );
static bool CopyFile( const ByteString& source , const ByteString& dest );
- static void QuotHTMLXRM( ByteString &rString );
static void UnquotHTML( ByteString &rString );
static const char* GetEnv( const char *pVar );
- static int getCurrentDirectory( rtl::OUString& base_fqurl , rtl::OUString& base );
static bool isSourceLanguage( const ByteString &sLanguage );
static bool isAllowed( const ByteString &sLanguage );
- static bool LanguageAllowed( const ByteString &nLanguage );
static void Languages( std::vector<ByteString>::const_iterator& begin , std::vector<ByteString>::const_iterator& end );
static void getRandomName( const ByteString& sPrefix , ByteString& sRandStr , const ByteString& sPostfix );
- static void getRandomName( ByteString& sRandStr );
static void getCurrentDir( std::string& dir );
- static void replaceEncoding( ByteString& rString );
-
static ByteString GetFallbackLanguage( const ByteString nLanguage );
static void FillInFallbacks( ResData *pResData );
static void FillInListFallbacks( ExportList *pList, const ByteString &nSource, const ByteString &nFallback );
@@ -377,8 +371,6 @@ private:
static std::vector<ByteString> aLanguages;
static std::vector<ByteString> aForcedLanguages;
- sal_Bool ListExists( ResData *pResData, sal_uInt16 nLst );
-
sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False );// called befor dest. cur ResData
sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList,
const ByteString &rTyp, sal_Bool bCreateNew = sal_False );
@@ -393,7 +385,6 @@ private:
ByteString GetPairedListString ( const ByteString& sText );
ByteString StripList ( const ByteString& sText );
- void UnmergeUTF8( ByteString& sOrig );
void InsertListEntry( const ByteString &rText, const ByteString &rLine );
void CleanValue( ByteString &rValue );
ByteString GetText( const ByteString &rSource, int nToken );
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 92ec9dd..9633705 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1155,31 +1155,6 @@ void Export::CutComment( ByteString &rText )
}
}
-void Export::UnmergeUTF8( ByteString& sOrig ){
- sal_uInt16 nPos1 = sOrig.Search('\"');
- sal_uInt16 nPos2 = sOrig.SearchBackward('\"');
- if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){
- ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1);
- ByteString sPartUTF8 = sPart;
- sPartUTF8.Convert( RTL_TEXTENCODING_MS_1252 , RTL_TEXTENCODING_UTF8 );
- sOrig.SearchAndReplace( sPart , sPartUTF8 );
- }
-}
-
-/*****************************************************************************/
-sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst )
-/*****************************************************************************/
-{
- switch ( nLst ) {
- case LIST_STRING: return pResData->pStringList != NULL;
- case LIST_FILTER: return pResData->pFilterList != NULL;
- case LIST_ITEM: return pResData->pItemList != NULL;
- case LIST_PAIRED: return pResData->pPairedList != NULL;
- case LIST_UIENTRIES: return pResData->pUIEntries != NULL;
- }
- return sal_False;
-}
-
/*****************************************************************************/
sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
/*****************************************************************************/
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 809bd5d..a56516b 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -140,75 +140,6 @@ std::vector<ByteString> Export::GetForcedLanguages(){
std::vector<ByteString> Export::aLanguages = std::vector<ByteString>();
std::vector<ByteString> Export::aForcedLanguages = std::vector<ByteString>();
-
-/*****************************************************************************/
-void Export::QuotHTMLXRM( ByteString &rString )
-/*****************************************************************************/
-{
- ByteString sReturn;
- for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) {
- ByteString sTemp = rString.Copy( i );
- if ( sTemp.Search( "<Arg n=" ) == 0 ) {
- while ( i < rString.Len() && rString.GetChar( i ) != '>' ) {
- sReturn += rString.GetChar( i );
- i++;
- }
- if ( rString.GetChar( i ) == '>' ) {
- sReturn += ">";
- i++;
- }
- }
-
- if ( i < rString.Len()) {
- switch ( rString.GetChar( i )) {
- case '<':
- if( i+2 < rString.Len() &&
- (rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B') &&
- rString.GetChar( i+2 ) == '>' )
- {
- sReturn +="<b>";
- i += 2;
- }
- else if( i+3 < rString.Len() &&
- rString.GetChar( i+1 ) == '/' &&
- (rString.GetChar( i+2 ) == 'b' || rString.GetChar( i+2 ) == 'B') &&
- rString.GetChar( i+3 ) == '>' )
- {
- sReturn +="</b>";
- i += 3;
- }
- else
- sReturn += "<";
- break;
-
- case '>':
- sReturn += ">";
- break;
-
- case '\"':
- sReturn += """;
- break;
-
- case '\'':
- sReturn += "'";
- break;
-
- case '&':
- if ((( i + 4 ) < rString.Len()) &&
- ( rString.Copy( i, 5 ) == "&" ))
- sReturn += rString.GetChar( i );
- else
- sReturn += "&";
- break;
-
- default:
- sReturn += rString.GetChar( i );
- break;
- }
- }
- }
- rString = sReturn;
-}
/*****************************************************************************/
void Export::QuotHTML( ByteString &rString )
/*****************************************************************************/
@@ -402,12 +333,6 @@ bool Export::isSourceLanguage( const ByteString &sLanguage )
bool Export::isAllowed( const ByteString &sLanguage ){
return ! ( sLanguage.EqualsIgnoreCaseAscii("en-US") );
}
-/*****************************************************************************/
-bool Export::LanguageAllowed( const ByteString &nLanguage )
-/*****************************************************************************/
-{
- return std::find( aLanguages.begin() , aLanguages.end() , nLanguage ) != aLanguages.end();
-}
bool Export::isInitialized = false;
@@ -452,29 +377,6 @@ ByteString Export::GetFallbackLanguage( const ByteString nLanguage )
return sFallback;
}
-void Export::replaceEncoding( ByteString& rString )
-{
-// ™ -> \u2122
-
- for( xub_StrLen idx = 0; idx <= rString.Len()-8 ; idx++ )
- {
- if( rString.GetChar( idx ) == '&' &&
- rString.GetChar( idx+1 ) == '#' &&
- rString.GetChar( idx+2 ) == 'x' &&
- rString.GetChar( idx+7 ) == ';' )
- {
- ByteString sTmp = rString.Copy( 0 , idx );
- sTmp.Append( "\\u" );
- sTmp.Append( rString.GetChar( idx+3 ) );
- sTmp.Append( rString.GetChar( idx+4 ) );
- sTmp.Append( rString.GetChar( idx+5 ) );
- sTmp.Append( rString.GetChar( idx+6 ) );
- sTmp.Append( rString.Copy( idx+8 , rString.Len() ) );
- rString = sTmp;
- }
- }
-}
-
/*****************************************************************************/
void Export::FillInFallbacks( ResData *pResData )
/*****************************************************************************/
@@ -611,15 +513,6 @@ const char* Export::GetEnv( const char *pVar )
return pRet;
}
-
-int Export::getCurrentDirectory( rtl::OUString& base_fqurl_out, rtl::OUString& base_out )
-{
- DirEntry aDir(".");
- aDir.ToAbs();
- base_out = rtl::OUString( aDir.GetFull() );
- return osl::File::getFileURLFromSystemPath( base_out , base_fqurl_out );
-}
-
void Export::getCurrentDir( string& dir )
{
char buffer[64000];
@@ -667,12 +560,6 @@ void Export::getRandomName( const ByteString& sPrefix , ByteString& sRandStr , c
sRandStr.Append( sPostfix );
}
-void Export::getRandomName( ByteString& sRandStr )
-{
- const ByteString sEmpty;
- getRandomName( sEmpty , sRandStr , sEmpty );
-}
-
/*****************************************************************************/
DirEntry Export::GetTempFile()
/*****************************************************************************/
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 7136502..9cf42c0 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -454,7 +454,7 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile
static const ByteString INPATH = Export::GetEnv( "INPATH" );
Export::getRandomName( sPath , sTempFile , INPATH );
- Export::getRandomName( sPath , sTempFileCopy , INPATH );
+ Export::getRandomName( sPath , sTempFileCopy , INPATH );
// Write in the temp file
bool hasNoError = file->Write ( sTempFile );
if( !hasNoError )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 75acee5..667772d 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -648,7 +648,6 @@ void XRMResMerge::WorkOnText(
{
rText = sContent;
ConvertStringToXMLFormat( rText );
- //Export::QuotHTMLXRM( rText );
}
}
}
commit 925a4efe802f867e1aa9d81a5f8727760b9dde3c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 30 10:44:56 2011 +0100
unused pure-virtual WorkOnRessourceEnd body
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index c4f24ed..f2a713c 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -394,13 +394,6 @@ void CfgParser::AddText(
pStackData->sText[ rIsoLang ] = rText;
}
-
-/*****************************************************************************/
-void CfgParser::WorkOnRessourceEnd()
-/*****************************************************************************/
-{
-}
-
/*****************************************************************************/
int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
/*****************************************************************************/
commit c593851d386452ce46c3ebb0e3988fc175dd8f78
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 30 09:59:59 2011 +0100
remove deprecated ByteString::CreateFromInt64
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index f57410b..2e745bd 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -204,7 +204,6 @@ public:
}
static ByteString CreateFromInt32( sal_Int32 n, sal_Int16 nRadix = 10 );
- static ByteString CreateFromInt64( sal_Int64 n, sal_Int16 nRadix = 10 );
static const ByteString& EmptyString();
sal_Int32 ToInt32() const;
sal_Int64 ToInt64() const;
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index 3902ca8..aceadc9 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -104,21 +104,14 @@ ByteString ByteString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
// -----------------------------------------------------------------------
-ByteString ByteString::CreateFromInt64( sal_Int64 n, sal_Int16 nRadix )
+namespace
{
- sal_Char aBuf[RTL_STR_MAX_VALUEOFINT64];
- BOOST_STATIC_ASSERT(RTL_STR_MAX_VALUEOFINT64 <= STRING_MAXLEN);
- return ByteString(
- aBuf,
- static_cast< xub_StrLen >(rtl_str_valueOfInt64( aBuf, n, nRadix )) );
+ struct theEmpty : public rtl::Static< const ByteString, theEmpty> {};
}
-// -----------------------------------------------------------------------
-
-namespace { struct Empty : public rtl::Static< const ByteString, Empty> {}; }
const ByteString& ByteString::EmptyString()
{
- return Empty::get();
+ return theEmpty::get();
}
// -----------------------------------------------------------------------
commit 67bc89b44018d7a162b55bd29db4030404afada9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 29 16:40:32 2011 +0100
tweak for internal cairo
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 783d56b..d195400 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -65,11 +65,21 @@ $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
))
ifeq ($(SYSTEM_CAIRO),YES)
+$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\
+ $$(CXXFLAGS) \
+ $$(CAIRO_CFLAGS) \
+ -DSYSTEM_CAIRO \
+))
$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
$$(LDFLAGS) \
$$(CAIRO_LIBS) \
))
else
+$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\
+ $$(CXXFLAGS) \
+ $$(FONTCONFIG_CFLAGS) \
+ $$(FREETYPE_CFLAGS) \
+))
$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
cairo \
))
@@ -130,12 +140,6 @@ $(eval $(call gb_Library_set_defs,vclplug_gen,\
-DVCLPLUG_GEN_IMPLEMENTATION \
))
-## unconditional cairo
-$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\
- $$(CXXFLAGS) \
- $$(CAIRO_CFLAGS) \
-))
-
## handle RandR
ifneq ($(ENABLE_RANDR),)
$(eval $(call gb_Library_set_defs,vclplug_gen,\
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 8fda964..de84b30 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -83,9 +83,15 @@
#include <graphite_serverfont.hxx>
#endif
+#ifdef SYSTEM_CAIRO
#include <cairo.h>
#include <cairo-ft.h>
#include <cairo-xlib-xrender.h>
+#else
+#include <cairo/cairo.h>
+#include <cairo/cairo-ft.h>
+#include <cairo/cairo-xlib-xrender.h>
+#endif
struct BOX
{
commit 05e6ea78576426f3edd34e40493127476aa97bea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 29 16:29:39 2011 +0100
dead pre-gbuild makefile.mks
diff --git a/vcl/source/components/makefile.mk b/vcl/source/components/makefile.mk
deleted file mode 100644
index 41f21bf..0000000
--- a/vcl/source/components/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=components
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/display.obj \
- $(SLO)$/dtranscomp.obj \
- $(SLO)$/fontident.obj \
- $(SLO)$/stringmirror.obj \
- $(SLO)$/rasterizer_rsvg.obj \
- $(SLO)$/factory.obj
-
-EXCEPTIONSFILES= $(SLO)$/rasterizer_rsvg.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk
deleted file mode 100755
index e124dc3..0000000
--- a/vcl/source/gdi/makefile.mk
+++ /dev/null
@@ -1,127 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=gdi
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-.IF "$(COM)"=="ICC"
-CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE
-.ENDIF
-.IF "$(ENABLE_GRAPHITE)" == "TRUE"
-CDEFS+=-DENABLE_GRAPHITE
-.IF "$(SYSTEM_GRAPHITE)" != "YES"
-CDEFS+=-DGR2_STATIC
-.ENDIF
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
- $(SLO)$/animate.obj \
- $(SLO)$/base14.obj \
- $(SLO)$/bitmap.obj \
- $(SLO)$/bitmap2.obj \
- $(SLO)$/bitmapex.obj \
- $(SLO)$/bmpconv.obj \
- $(SLO)$/configsettings.obj \
- $(SLO)$/cvtgrf.obj \
- $(SLO)$/cvtsvm.obj \
- $(SLO)$/gdimtf.obj \
- $(SLO)$/gfxlink.obj \
- $(SLO)$/graph.obj \
- $(SLO)$/graphictools.obj \
- $(SLO)$/image.obj \
- $(SLO)$/imagerepository.obj \
- $(SLO)$/impanmvw.obj \
- $(SLO)$/impgraph.obj \
- $(SLO)$/impimage.obj \
- $(SLO)$/impimagetree.obj \
- $(SLO)$/impvect.obj \
- $(SLO)$/jobset.obj \
- $(SLO)$/lineinfo.obj \
- $(SLO)$/metaact.obj \
- $(SLO)$/metric.obj \
- $(SLO)$/oldprintadaptor.obj \
- $(SLO)$/outdev.obj \
- $(SLO)$/outdev2.obj \
- $(SLO)$/outdev3.obj \
- $(SLO)$/outdev4.obj \
- $(SLO)$/outdev5.obj \
- $(SLO)$/outdev6.obj \
- $(SLO)$/outdevnative.obj \
- $(SLO)$/outmap.obj \
- $(SLO)$/pdfextoutdevdata.obj \
- $(SLO)$/pdffontcache.obj\
- $(SLO)$/pdfwriter.obj \
- $(SLO)$/pdfwriter_impl.obj \
- $(SLO)$/pdfwriter_impl2.obj \
- $(SLO)$/pngread.obj \
- $(SLO)$/pngwrite.obj \
- $(SLO)$/print.obj \
- $(SLO)$/print2.obj \
- $(SLO)$/print3.obj \
- $(SLO)$/rendergraphic.obj \
- $(SLO)$/rendergraphicrasterizer.obj \
- $(SLO)$/salgdilayout.obj \
- $(SLO)$/sallayout.obj \
- $(SLO)$/salnativewidgets-none.obj \
- $(SLO)$/svgread.obj \
- $(SLO)$/textlayout.obj \
- $(SLO)$/virdev.obj \
- $(SLO)$/wall.obj
-
-SLOFILES= $(EXCEPTIONSFILES) \
- $(SLO)$/bitmap3.obj \
- $(SLO)$/bitmap4.obj \
- $(SLO)$/alpha.obj \
- $(SLO)$/bmpacc.obj \
- $(SLO)$/bmpacc2.obj \
- $(SLO)$/bmpacc3.obj \
- $(SLO)$/bmpfast.obj \
- $(SLO)$/font.obj \
- $(SLO)$/gradient.obj \
- $(SLO)$/hatch.obj \
- $(SLO)$/impbmp.obj \
- $(SLO)$/mapmod.obj \
- $(SLO)$/octree.obj \
- $(SLO)$/regband.obj \
- $(SLO)$/region.obj \
- $(SLO)$/extoutdevdata.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
deleted file mode 100755
index c8dc101..0000000
--- a/vcl/util/makefile.mk
+++ /dev/null
@@ -1,465 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=vcl
-TARGET=vcl
-TARGETTYPE=GUI
-USE_DEFFILE=TRUE
-GEN_HID_OTHER=TRUE
-
-.IF "$(SNDFILE_LIBS)"!=""
-SNDFILELIB=$(SNDFILE_LIBS)
-.ENDIF
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : makefile.pmk
-.INCLUDE : makefile2.pmk
-
-.IF "$(OS)" == "SOLARIS"
-.IF "$(CPUNAME)" == "SPARC" && "$(CPU)" == "U"
-LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib/64 $(LINKFLAGSRUNPATH_OOO)
-.ELSE
-LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib $(LINKFLAGSRUNPATH_OOO)
-.ENDIF
-.ENDIF
-
-# --- Allgemein ----------------------------------------------------------
-
-HXXDEPNLST= $(INC)$/vcl$/accel.hxx \
- $(INC)$/vcl$/animate.hxx \
- $(INC)$/vcl$/apptypes.hxx \
- $(INC)$/vcl$/bitmap.hxx \
- $(INC)$/vcl$/bitmapex.hxx \
- $(INC)$/vcl$/bmpacc.hxx \
- $(INC)$/vcl$/btndlg.hxx \
- $(INC)$/vcl$/button.hxx \
- $(INC)$/vcl$/ctrl.hxx \
- $(INC)$/vcl$/cursor.hxx \
- $(INC)$/vcl$/cmdevt.hxx \
- $(INC)$/vcl$/decoview.hxx \
- $(INC)$/vcl$/dialog.hxx \
- $(INC)$/vcl$/dllapi.h \
- $(INC)$/vcl$/dockwin.hxx \
- $(INC)$/vcl$/edit.hxx \
- $(INC)$/vcl$/event.hxx \
- $(INC)$/vcl$/field.hxx \
- $(INC)$/vcl$/fixed.hxx \
- $(INC)$/vcl$/floatwin.hxx \
- $(INC)$/vcl$/font.hxx \
- $(INC)$/vcl$/floatwin.hxx \
- $(INC)$/vcl$/graph.hxx \
- $(INC)$/vcl$/group.hxx \
- $(INC)$/vcl$/help.hxx \
- $(INC)$/vcl$/jobset.hxx \
- $(INC)$/vcl$/keycodes.hxx \
- $(INC)$/vcl$/keycod.hxx \
- $(INC)$/vcl$/image.hxx \
- $(INC)$/vcl$/lstbox.h \
- $(INC)$/vcl$/lstbox.hxx \
- $(INC)$/vcl$/mapmod.hxx \
- $(INC)$/vcl$/metaact.hxx \
- $(INC)$/vcl$/menu.hxx \
- $(INC)$/vcl$/menubtn.hxx \
- $(INC)$/vcl$/metric.hxx \
- $(INC)$/vcl$/morebtn.hxx \
- $(INC)$/vcl$/msgbox.hxx \
- $(INC)$/vcl$/octree.hxx \
- $(INC)$/vcl$/outdev.hxx \
- $(INC)$/vcl$/pointr.hxx \
- $(INC)$/vcl$/ptrstyle.hxx \
- $(INC)$/vcl$/prntypes.hxx \
- $(INC)$/vcl$/print.hxx \
- $(INC)$/vcl$/prndlg.hxx \
- $(INC)$/vcl$/region.hxx \
- $(INC)$/vcl$/rendergraphic.hxx \
- $(INC)$/vcl$/rendergraphicrasterizer.hxx \
- $(INC)$/vcl$/salbtype.hxx \
- $(INC)$/vcl$/scrbar.hxx \
- $(INC)$/vcl$/slider.hxx \
- $(INC)$/vcl$/seleng.hxx \
- $(INC)$/vcl$/settings.hxx \
- $(INC)$/vcl$/sound.hxx \
- $(INC)$/vcl$/sndstyle.hxx \
- $(INC)$/vcl$/split.hxx \
- $(INC)$/vcl$/splitwin.hxx \
- $(INC)$/vcl$/spin.hxx \
- $(INC)$/vcl$/spinfld.hxx \
- $(INC)$/vcl$/status.hxx \
- $(INC)$/vcl$/stdtext.hxx \
- $(INC)$/vcl$/sv.h \
- $(INC)$/vcl$/svapp.hxx \
- $(INC)$/vcl$/syschild.hxx \
- $(INC)$/vcl$/sysdata.hxx \
- $(INC)$/vcl$/syswin.hxx \
- $(INC)$/vcl$/tabctrl.hxx \
- $(INC)$/vcl$/tabdlg.hxx \
- $(INC)$/vcl$/tabpage.hxx \
- $(INC)$/vcl$/toolbox.hxx \
- $(INC)$/vcl$/timer.hxx \
- $(INC)$/vcl$/virdev.hxx \
- $(INC)$/vcl$/wall.hxx \
- $(INC)$/vcl$/waitobj.hxx \
- $(INC)$/vcl$/window.hxx \
- $(INC)$/vcl$/wrkwin.hxx
-
-.IF "$(linkinc)" != ""
-SHL11FILE= $(MISC)$/app.slo
-SHL12FILE= $(MISC)$/gdi.slo
-SHL13FILE= $(MISC)$/win.slo
-SHL14FILE= $(MISC)$/ctrl.slo
-SHL16FILE= $(MISC)$/salapp.slo
-SHL17FILE= $(MISC)$/salwin.slo
-SHL18FILE= $(MISC)$/salgdi.slo
-.ENDIF
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1FILES= $(SLB)$/app.lib \
- $(SLB)$/gdi.lib \
- $(SLB)$/win.lib \
- $(SLB)$/ctrl.lib \
- $(SLB)$/helper.lib \
- $(SLB)$/fontsubset.lib \
- $(SLB)$/components.lib
-
-.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua"
-LIB1FILES+= $(SLB)$/salplug.lib \
- $(SLB)$/fontman.lib \
- $(SLB)$/printer.lib
-.ELSE
-LIB1FILES+= \
- $(SLB)$/salwin.lib \
- $(SLB)$/salgdi.lib \
- $(SLB)$/salapp.lib
-.IF "$(GUIBASE)" == "aqua"
-LIB1FILES+= $(SLB)$/dtransaqua.lib
-.ENDIF
-.ENDIF
-
-SHL1TARGET= vcl$(DLLPOSTFIX)
-SHL1IMPLIB= ivcl
-SHL1STDLIBS+=\
- $(SOTLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NPAPERLIB) \
- $(I18NISOLANGLIB) \
- $(I18NUTILLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(BASEGFXLIB) \
- $(ICUUCLIB) \
- $(ICUDATALIB) \
- $(ICULELIB) \
- $(JVMACCESSLIB)
-
-.IF "$(GUI)" == "UNX"
-.IF "$(ENABLE_GRAPHITE)" != ""
-.IF "$(SYSTEM_GRAPHITE)" == "YES"
-SHL1STDLIBS+= $(GRAPHITE_LIBS)
-.ELSE
-SHL1STDLIBS+= -lgraphite2_off
-.ENDIF
-.ENDIF
-.ENDIF
-SHL1USE_EXPORTS=name
-
-.IF "$(GUIBASE)"=="aqua"
-SHL1STDLIBS+= \
- $(BASEBMPLIB) \
- -lAppleRemote$(DLLPOSTFIX) \
- -framework QuickTime
-
-LIB1FILES+= \
- $(SLB)$/sala11y.lib
-.ENDIF
-
-.IF "$(USE_BUILTIN_RASTERIZER)"!=""
- LIB1FILES += $(SLB)$/glyphs.lib
- SHL1STDLIBS+= $(FREETYPELIB)
-.ELSE
-.IF "$(ENABLE_GRAPHITE)" == "TRUE"
- LIB1FILES += $(SLB)$/glyphs.lib
-.ENDIF
-.ENDIF # USE_BUILTIN_RASTERIZER
-
-SHL1LIBS= $(LIB1TARGET)
-
-.IF "$(GUI)" != "UNX"
-SHL1RES= $(RES)$/salsrc.res
-.ENDIF
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME =$(SHL1TARGET)
-DEF1DEPN = $(HXXDEPNLST) \
- $(LIB1TARGET)
-DEF1DES =VCL
-DEFLIB1NAME =vcl
-
-# --- W32 ----------------------------------------------------------------
-
-.IF "$(GUI)" == "WNT"
-
-.IF "$(ENABLE_GRAPHITE)" == "TRUE"
-.IF "$(COM)" == "GCC"
-SHL1STDLIBS += -Wl,-Bstatic -lgraphite2_off -Wl,-Bdynamic
-#SHL1STDLIBS += -lgraphite2_off
-.ELSE
-SHL1STDLIBS += graphite2_off.lib
-.ENDIF
-.ENDIF
-
-SHL1STDLIBS += $(UWINAPILIB) \
- $(GDI32LIB) \
- $(GDIPLUSLIB) \
- $(MSIMG32LIB) \
- $(WINSPOOLLIB) \
- $(OLE32LIB) \
- $(SHELL32LIB) \
- $(ADVAPI32LIB) \
- $(VERSIONLIB)
-
-SHL1STDLIBS += $(IMM32LIB)
-
-.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
-LINKFLAGSSHL += /ENTRY:LibMain at 12
-.ENDIF
-.ENDIF
-
-# --- UNX ----------------------------------------------------------------
-
-# UNX sal plugins
-.IF "$(GUI)" == "UNX" && "$(GUIBASE)" != "aqua"
-
-# desktop detector
-LIB7TARGET=$(SLB)$/idet
-LIB7FILES=$(SLB)$/dtdetect.lib
-SHL7TARGET=desktop_detector$(DLLPOSTFIX)
-SHL7STDLIBS=\
- $(SALLIB) \
- $(X11LINK_DYNAMIC)
-SHL7IMPLIB=idet
-SHL7LIBS=$(LIB7TARGET)
-
-# basic pure X11 plugin
-LIB2TARGET=$(SLB)$/ipure_x
-LIB2FILES= \
- $(SLB)$/dtransX11.lib \
- $(SLB)$/printergfx.lib \
- $(SLB)$/salwin.lib \
- $(SLB)$/salgdi.lib \
- $(SLB)$/salapp.lib
-SHL2TARGET=vclplug_gen$(DLLPOSTFIX)
-SHL2IMPLIB=ipure_x
-SHL2LIBS=$(LIB2TARGET)
-SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN)
-
-# libs for generic plugin
-SHL2STDLIBS=\
- $(VCLLIB)\
- $(I18NPAPERLIB) \
- $(I18NISOLANGLIB) \
- $(TOOLSLIB) \
- $(BASEGFXLIB) \
- $(UNOTOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-# prepare linking of Xinerama
-.IF "$(USE_XINERAMA)" != "NO"
-
-.IF "$(OS)"=="MACOSX" || "$(OS)$(CPU)" == "LINUXX"
-XINERAMALIBS=-lXinerama
-.ELSE
-.IF "$(OS)" != "SOLARIS" || "$(USE_XINERAMA_VERSION)" == "Xorg"
-.IF "$(XINERAMA_LINK)" == "dynamic"
-XINERAMALIBS= -lXinerama
-.ELSE
-XINERAMALIBS= -Wl,-Bstatic -lXinerama -Wl,-Bdynamic
-.ENDIF # XINERAMA_LINK == dynamic
-.ENDIF # OS == SOLARIS
-.ENDIF # OS == MACOSX
-
-SHL2STDLIBS += $(XINERAMALIBS)
-.ENDIF # USE_XINERAMA != NO
-
-.IF "$(XRENDER_LINK)" == "YES"
-SHL2STDLIBS+=`pkg-config --libs xrender`
-.ENDIF
-
-.IF "$(GUIBASE)"=="unx"
-
-SHL2STDLIBS += -lXext -lSM -lICE -lX11
-.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" && \
- && "$(OS)"!="OPENBSD" "$(OS)"!="DRAGONFLY"
-# needed by salprnpsp.cxx
-SHL2STDLIBS+= -ldl
-.ENDIF
-
-.IF "$(ENABLE_RANDR)" != ""
-.IF "$(XRANDR_DLOPEN)" == "FALSE"
-SHL2STDLIBS+= $(XRANDR_LIBS)
-.ENDIF
-.ENDIF
-
-.ENDIF # "$(GUIBASE)"=="unx"
-
-# gtk plugin
-.IF "$(ENABLE_GTK)" != ""
-PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0
-.IF "$(ENABLE_DBUS)" != ""
-PKGCONFIG_MODULES+= dbus-glib-1
-.ENDIF
-.INCLUDE: pkg_config.mk
-
-LIB4TARGET=$(SLB)$/igtk_plug_
-LIB4FILES=\
- $(SLB)$/gtkapp.lib\
- $(SLB)$/gtka11y.lib \
- $(SLB)$/gtkgdi.lib\
- $(SLB)$/gtkwin.lib
-
-SHL4TARGET=vclplug_gtk$(DLLPOSTFIX)
-SHL4IMPLIB=igtk_plug_
-SHL4LIBS=$(LIB4TARGET)
-SHL4DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN)
-# libs for gtk plugin
-SHL4STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//)
-# hack for faked SO environment
-.IF "$(PKGCONFIG_ROOT)"!=""
-SHL4SONAME+=-z nodefs
-SHL4NOCHECK=TRUE
-.ENDIF # "$(PKGCONFIG_ROOT)"!=""
-
-
-SHL4STDLIBS+=-l$(SHL2TARGET)
-SHL4STDLIBS+=\
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(X11LINK_DYNAMIC)
-
-.IF "$(ENABLE_RANDR)" != ""
-.IF "$(XRANDR_DLOPEN)" == "FALSE"
-SHL4STDLIBS+= $(XRANDR_LIBS)
-.ENDIF
-.ENDIF
-
-.ENDIF # "$(ENABLE_GTK)" != ""
-
-# KDE plugin
-.IF "$(ENABLE_KDE)" != ""
-.IF "$(KDE_ROOT)"!=""
-EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib
-.IF "$(OS)$(CPU)" == "LINUXX"
-EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib64
-.ENDIF
-.ENDIF
-LIB5TARGET=$(SLB)$/ikde_plug_
-LIB5FILES=$(SLB)$/kdeplug.lib
-SHL5TARGET=vclplug_kde$(DLLPOSTFIX)
-SHL5IMPLIB=ikde_plug_
-SHL5LIBS=$(LIB5TARGET)
-SHL5DEPN=$(SHL2TARGETN)
-# libs for KDE plugin
-SHL5STDLIBS+=-l$(SHL2TARGET)
-SHL5STDLIBS+=\
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(SALLIB) \
- $(X11LINK_DYNAMIC)
-
-.IF "$(ENABLE_RANDR)" != ""
-.IF "$(XRANDR_DLOPEN)" == "FALSE"
-SHL5STDLIBS+= $(XRANDR_LIBS)
-.ENDIF
-.ENDIF
-
-SHL5LINKFLAGS+=$(KDE_LIBS)
-
-.ENDIF # "$(ENABLE_KDE)" != ""
-
-# KDE4 plugin
-.IF "$(ENABLE_KDE4)" != ""
-.IF "$(KDE4_ROOT)"!=""
-EXTRALIBPATHS+=-L$(KDE4_ROOT)$/lib
-.ENDIF
-LIB6TARGET=$(SLB)$/ikde4_plug_
-LIB6FILES=$(SLB)$/kde4plug.lib
-SHL6TARGET=vclplug_kde4$(DLLPOSTFIX)
-SHL6IMPLIB=ikde4_plug_
-SHL6LIBS=$(LIB6TARGET)
-SHL6DEPN=$(SHL2TARGETN)
-# libs for KDE4 plugin
-SHL6STDLIBS+=-l$(SHL2TARGET)
-SHL6STDLIBS+=\
- $(VCLLIB) \
- $(PSPLIB) \
- $(TOOLSLIB) \
- $(SALLIB) \
- $(X11LINK_DYNAMIC)
-
-.IF "$(ENABLE_RANDR)" != ""
-.IF "$(XRANDR_DLOPEN)" == "FALSE"
-SHL6STDLIBS+= $(XRANDR_LIBS)
-.ENDIF
-.ENDIF
-
-SHL6STDLIBS+=$(KDE4_LIBS) $(KDE_GLIB_LIBS)
-
-.ENDIF # "$(ENABLE_KDE4)" != ""
-
-.ENDIF # UNX
-
-# --- Allgemein ----------------------------------------------------------
-
-.INCLUDE : target.mk
-
-ALLTAR : $(MISC)/vcl.component
-
-.IF "$(OS)" == "MACOSX"
-my_platform = .macosx
-.ELIF "$(OS)" == "WNT"
-my_platform = .windows
-.END
-
-$(MISC)/vcl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- vcl.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt vcl$(my_platform).component
commit 812695263f153f59a8d8160b1a64b29d486ef97e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 29 16:22:09 2011 +0100
make cairo an unconditional requirement for text rendering
diff --git a/canvas/prj/build.lst b/canvas/prj/build.lst
index dad6e28..4719f15 100644
--- a/canvas/prj/build.lst
+++ b/canvas/prj/build.lst
@@ -4,7 +4,7 @@ cv canvas\inc nmake - all cv_inc NULL
cv canvas\source\tools nmake - all cv_tools cv_inc NULL
cv canvas\source\vcl nmake - all cv_vcl cv_tools cv_inc NULL
cv canvas\source\simplecanvas nmake - all cv_simplecanvas cv_tools cv_inc NULL
-cv canvas\source\cairo nmake - all cv_cairo cv_tools cv_inc NULL
+cv canvas\source\cairo nmake - u cv_cairo cv_tools cv_inc NULL
cv canvas\source\directx nmake - w cv_directx cv_tools cv_inc NULL
cv canvas\source\null nmake - all cv_null cv_tools cv_inc NULL
cv canvas\source\factory nmake - all cv_factory cv_inc NULL
diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk
index bde5fac..3be1d52 100644
--- a/canvas/source/cairo/makefile.mk
+++ b/canvas/source/cairo/makefile.mk
@@ -37,17 +37,11 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
DLLPRE =
-# --- Nothing to do if we're compiling with --disable-cairo -----------
-.IF "$(ENABLE_CAIRO)" != "TRUE"
- at all:
- @echo "Building without cairo support..."
-.ELSE
# --- X11 Mac build currently doesn't work with cairo -----------
.IF "$(OS)" == "MACOSX" && "$(GUIBASE)" == "unx"
@all:
@echo "Cannot build cairocanvas with X11..."
.ENDIF
-.ENDIF
# --- Common ----------------------------------------------------------
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 8811bda..e012d71 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -90,12 +90,6 @@ $(eval $(call gb_Library_set_cxxflags,vcl,\
$$(CXXFLAGS) \
$$(OBJCXXFLAGS) \
))
-ifeq ($(ENABLE_CAIRO),TRUE)
-$(eval $(call gb_Library_set_defs,vclplug_gen,\
- $$(DEFS) \
- -DCAIRO \
-))
-endif
$(eval $(call gb_Library_add_objcxxobjects,vcl,\
vcl/aqua/source/a11y/aqua11yactionwrapper \
vcl/aqua/source/a11y/aqua11ycomponentwrapper \
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index b5cca31..783d56b 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -64,6 +64,17 @@ $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
$(gb_STDLIBS) \
))
+ifeq ($(SYSTEM_CAIRO),YES)
+$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
+ $$(LDFLAGS) \
+ $$(CAIRO_LIBS) \
+))
+else
+$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
+ cairo \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
vcl/unx/generic/app/i18n_cb \
vcl/unx/generic/app/i18n_ic \
@@ -119,6 +130,11 @@ $(eval $(call gb_Library_set_defs,vclplug_gen,\
-DVCLPLUG_GEN_IMPLEMENTATION \
))
+## unconditional cairo
+$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\
+ $$(CXXFLAGS) \
+ $$(CAIRO_CFLAGS) \
+))
## handle RandR
ifneq ($(ENABLE_RANDR),)
diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx
index 501f583..fb36d8b 100644
--- a/vcl/aqua/source/gdi/salbmp.cxx
+++ b/vcl/aqua/source/gdi/salbmp.cxx
@@ -871,7 +871,6 @@ bool AquaSalBitmap::GetSystemData( BitmapSystemData& rData )
{
bRet = true;
-#ifdef CAIRO
if ((CGBitmapContextGetBitsPerPixel(mxGraphicContext) == 32) &&
(CGBitmapContextGetBitmapInfo(mxGraphicContext) & kCGBitmapByteOrderMask) != kCGBitmapByteOrder32Host) {
/**
@@ -904,7 +903,6 @@ bool AquaSalBitmap::GetSystemData( BitmapSystemData& rData )
CGImageRelease( xImage );
mxGraphicContext = mxGraphicContextNew;
}
-#endif
rData.rImageContext = (void *) mxGraphicContext;
rData.mnWidth = mnWidth;
diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst
index 646a455..4b0ece6 100644
--- a/vcl/prj/build.lst
+++ b/vcl/prj/build.lst
@@ -1,4 +1,4 @@
-vc vcl : TRANSLATIONS:translations apple_remote BOOST:boost DESKTOP:rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offapi basegfx basebmp tools DESKTOP:l10ntools icc cpputools svl LIBXSLT:libxslt NULL
+vc vcl : TRANSLATIONS:translations apple_remote BOOST:boost DESKTOP:rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offapi basegfx basebmp tools DESKTOP:l10ntools icc cpputools svl LIBXSLT:libxslt CAIRO:cairo NULL
vc vcl usr1 - all vc_mkout NULL
vc vcl\prj nmake - all vc_prj NULL
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index a90fd1c..8fda964 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -78,28 +78,15 @@
#include "salframe.hxx"
#include "outdev.h"
-
-
#ifdef ENABLE_GRAPHITE
#include <graphite_layout.hxx>
#include <graphite_serverfont.hxx>
#endif
-struct cairo_surface_t;
-struct cairo_t;
-struct cairo_font_face_t;
-typedef void* FT_Face;
-struct cairo_matrix_t {
- double xx; double yx;
- double xy; double yy;
- double x0; double y0;
-};
-struct cairo_glyph_t
-{
- unsigned long index;
- double x;
- double y;
-};
+#include <cairo.h>
+#include <cairo-ft.h>
+#include <cairo-xlib-xrender.h>
+
struct BOX
{
short x1, x2, y1, y2;
@@ -249,183 +236,12 @@ void ImplServerFontEntry::HandleFontOptions( void )
//--------------------------------------------------------------------------
-namespace {
-
-class CairoWrapper
+namespace
{
-private:
- osl::Module mpCairoLib;
-
- cairo_surface_t* (*mp_xlib_surface_create_with_xrender_format)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int );
- void (*mp_surface_destroy)(cairo_surface_t *);
- cairo_t* (*mp_create)(cairo_surface_t *);
- void (*mp_destroy)(cairo_t*);
- void (*mp_clip)(cairo_t*);
- void (*mp_rectangle)(cairo_t*, double, double, double, double);
- cairo_font_face_t * (*mp_ft_font_face_create_for_ft_face)(FT_Face, int);
- cairo_font_face_t * (*mp_ft_font_face_create_for_pattern)(void*);
- void (*mp_set_font_face)(cairo_t *, cairo_font_face_t *);
- void (*mp_font_face_destroy)(cairo_font_face_t *);
- void (*mp_matrix_init_identity)(cairo_matrix_t *);
- void (*mp_matrix_scale)(cairo_matrix_t *, double, double);
- void (*mp_matrix_rotate)(cairo_matrix_t *, double);
- void (*mp_set_font_matrix)(cairo_t *, const cairo_matrix_t *);
- void (*mp_show_glyphs)(cairo_t *, const cairo_glyph_t *, int );
- void (*mp_set_source_rgb)(cairo_t *, double , double , double );
- void (*mp_set_font_options)(cairo_t *, const void *);
- void (*mp_ft_font_options_substitute)(const void*, void*);
-
- bool canEmbolden() const { return mp_ft_font_face_create_for_pattern != NULL; }
-
- CairoWrapper();
-public:
- static CairoWrapper& get();
- bool isValid() const { return (mpCairoLib != NULL); }
- bool isCairoRenderable(const ServerFont& rFont);
-
- cairo_surface_t* xlib_surface_create_with_xrender_format(Display *pDisplay, Drawable drawable, Screen *pScreen, XRenderPictFormat *pFormat, int width, int height)
- { return (*mp_xlib_surface_create_with_xrender_format)(pDisplay, drawable, pScreen, pFormat, width, height); }
- void surface_destroy(cairo_surface_t *surface) { (*mp_surface_destroy)(surface); }
- cairo_t* create(cairo_surface_t *surface) { return (*mp_create)(surface); }
- void destroy(cairo_t *cr) { (*mp_destroy)(cr); }
- void clip(cairo_t *cr) { (*mp_clip)(cr); }
- void rectangle(cairo_t *cr, double x, double y, double width, double height)
- { (*mp_rectangle)(cr, x, y, width, height); }
- cairo_font_face_t* ft_font_face_create_for_ft_face(FT_Face face, int load_flags)
- { return (*mp_ft_font_face_create_for_ft_face)(face, load_flags); }
- cairo_font_face_t* ft_font_face_create_for_pattern(void *pattern)
+ bool isCairoRenderable(const ServerFont& rFont)
{
- return mp_ft_font_face_create_for_pattern
- ? (*mp_ft_font_face_create_for_pattern)(pattern)
- : NULL;
+ return rFont.GetFtFace() && rFont.GetAntialiasAdvice();
}
- void set_font_face(cairo_t *cr, cairo_font_face_t *font_face)
- { (*mp_set_font_face)(cr, font_face); }
- void font_face_destroy(cairo_font_face_t *font_face)
- { (*mp_font_face_destroy)(font_face); }
- void matrix_init_identity(cairo_matrix_t *matrix)
- { (*mp_matrix_init_identity)(matrix); }
- void matrix_scale(cairo_matrix_t *matrix, double sx, double sy)
- { (*mp_matrix_scale)(matrix, sx, sy); }
- void matrix_rotate(cairo_matrix_t *matrix, double radians)
- { (*mp_matrix_rotate)(matrix, radians); }
- void set_font_matrix(cairo_t *cr, const cairo_matrix_t *matrix)
- { (*mp_set_font_matrix)(cr, matrix); }
- void show_glyphs(cairo_t *cr, const cairo_glyph_t *glyphs, int no_glyphs)
- { (*mp_show_glyphs)(cr, glyphs, no_glyphs); }
- void set_source_rgb(cairo_t *cr, double red, double green, double blue)
- { (*mp_set_source_rgb)(cr, red, green, blue); }
- void set_font_options(cairo_t *cr, const void *options)
- { (*mp_set_font_options)(cr, options); }
- void ft_font_options_substitute(const void *options, void *pattern)
- { (*mp_ft_font_options_substitute)(options, pattern); }
-};
-
-static CairoWrapper* pCairoInstance = NULL;
-
-CairoWrapper& CairoWrapper::get()
-{
- if( ! pCairoInstance )
- pCairoInstance = new CairoWrapper();
- return *pCairoInstance;
-}
-
-CairoWrapper::CairoWrapper()
-{
- static const char* pDisableCairoText = getenv( "SAL_DISABLE_CAIROTEXT" );
- if( pDisableCairoText && (pDisableCairoText[0] != '0') )
- return;
-
- int nDummy;
- if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) )
- return;
-
-#ifdef MACOSX
- OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.2.dylib" ));
-#else
- OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" ));
-#endif
- if ( !mpCairoLib.load( aLibName, SAL_LOADMODULE_DEFAULT ) )
- return;
-
-#ifdef DEBUG
- // check cairo version
- int (*p_version)();
- p_version = (int(*)()) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_version" );
- const int nVersion = p_version ? (*p_version)() : 0;
- fprintf( stderr, "CAIRO version=%d\n", nVersion );
-#endif
-
- mp_xlib_surface_create_with_xrender_format = (cairo_surface_t* (*)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int ))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_xlib_surface_create_with_xrender_format" );
- mp_surface_destroy = (void(*)(cairo_surface_t*))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" );
- mp_create = (cairo_t*(*)(cairo_surface_t*))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_create" );
- mp_destroy = (void(*)(cairo_t*))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_destroy" );
- mp_clip = (void(*)(cairo_t*))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_clip" );
- mp_rectangle = (void(*)(cairo_t*, double, double, double, double))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_rectangle" );
- mp_ft_font_face_create_for_ft_face = (cairo_font_face_t * (*)(FT_Face, int))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_face_create_for_ft_face" );
- mp_ft_font_face_create_for_pattern = (cairo_font_face_t * (*)(void*))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_face_create_for_pattern" );
- mp_set_font_face = (void (*)(cairo_t *, cairo_font_face_t *))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_face" );
- mp_font_face_destroy = (void (*)(cairo_font_face_t *))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_font_face_destroy" );
- mp_matrix_init_identity = (void (*)(cairo_matrix_t *))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_init_identity" );
- mp_matrix_scale = (void (*)(cairo_matrix_t *, double, double))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_scale" );
- mp_matrix_rotate = (void (*)(cairo_matrix_t *, double))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_rotate" );
- mp_set_font_matrix = (void (*)(cairo_t *, const cairo_matrix_t *))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_matrix" );
- mp_show_glyphs = (void (*)(cairo_t *, const cairo_glyph_t *, int ))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_show_glyphs" );
- mp_set_source_rgb = (void (*)(cairo_t *, double , double , double ))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_source_rgb" );
- mp_set_font_options = (void (*)(cairo_t *, const void *options ))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_options" );
- mp_ft_font_options_substitute = (void (*)(const void *, void *))
- osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_options_substitute" );
-
- if( !(
- mp_xlib_surface_create_with_xrender_format &&
- mp_surface_destroy &&
- mp_create &&
- mp_destroy &&
- mp_clip &&
- mp_rectangle &&
- mp_ft_font_face_create_for_ft_face &&
- mp_set_font_face &&
- mp_font_face_destroy &&
- mp_matrix_init_identity &&
- mp_matrix_scale &&
- mp_matrix_rotate &&
- mp_set_font_matrix &&
- mp_show_glyphs &&
- mp_set_source_rgb &&
- mp_set_font_options &&
- mp_ft_font_options_substitute
- ) )
- {
- mpCairoLib.unload();
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "not all needed symbols were found\n" );
-#endif
- }
-}
-
-bool CairoWrapper::isCairoRenderable(const ServerFont& rFont)
-{
- return rFont.GetFtFace() && isValid() && rFont.GetAntialiasAdvice() &&
- (rFont.NeedsArtificialBold() ? canEmbolden() : true);
-}
-
} //namespace
CairoFontsCache::LRUFonts CairoFontsCache::maLRUFonts;
@@ -441,10 +257,9 @@ CairoFontsCache::~CairoFontsCache()
--mnRefCount;
if (!mnRefCount && !maLRUFonts.empty())
{
- CairoWrapper &rCairo = CairoWrapper::get();
LRUFonts::iterator aEnd = maLRUFonts.end();
for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI)
- rCairo.font_face_destroy((cairo_font_face_t*)aI->first);
+ cairo_font_face_destroy((cairo_font_face_t*)aI->first);
}
}
@@ -453,8 +268,7 @@ void CairoFontsCache::CacheFont(void *pFont, const CairoFontsCache::CacheId &rId
maLRUFonts.push_front( std::pair<void*, CairoFontsCache::CacheId>(pFont, rId) );
if (maLRUFonts.size() > 8)
{
- CairoWrapper &rCairo = CairoWrapper::get();
- rCairo.font_face_destroy((cairo_font_face_t*)maLRUFonts.back().first);
+ cairo_font_face_destroy((cairo_font_face_t*)maLRUFonts.back().first);
maLRUFonts.pop_back();
}
}
@@ -493,11 +307,9 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
if( !pVisualFormat )
return;
- CairoWrapper &rCairo = CairoWrapper::get();
-
Display* pDisplay = GetXDisplay();
- cairo_surface_t *surface = rCairo.xlib_surface_create_with_xrender_format (pDisplay,
+ cairo_surface_t *surface = cairo_xlib_surface_create_with_xrender_format (pDisplay,
hDrawable_, ScreenOfDisplay(pDisplay, m_nScreen), pVisualFormat, SAL_MAX_INT16, SAL_MAX_INT16);
/*
@@ -506,26 +318,26 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
* least change the SalFrame etc impls to dtor the SalGraphics *before* the
* destruction of the windows they reference
*/
- cairo_t *cr = rCairo.create(surface);
- rCairo.surface_destroy(surface);
+ cairo_t *cr = cairo_create(surface);
+ cairo_surface_destroy(surface);
if (const void *pOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions())
- rCairo.set_font_options( cr, pOptions);
+ cairo_set_font_options(cr, static_cast<const cairo_font_options_t*>(pOptions));
if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
{
for (long i = 0; i < mpClipRegion->numRects; ++i)
{
- rCairo.rectangle(cr,
- mpClipRegion->rects[i].x1,
- mpClipRegion->rects[i].y1,
- mpClipRegion->rects[i].x2 - mpClipRegion->rects[i].x1,
- mpClipRegion->rects[i].y2 - mpClipRegion->rects[i].y1);
+ cairo_rectangle(cr,
+ mpClipRegion->rects[i].x1,
+ mpClipRegion->rects[i].y1,
+ mpClipRegion->rects[i].x2 - mpClipRegion->rects[i].x1,
+ mpClipRegion->rects[i].y2 - mpClipRegion->rects[i].y1);
}
- rCairo.clip(cr);
+ cairo_clip(cr);
}
- rCairo.set_source_rgb(cr,
+ cairo_set_source_rgb(cr,
SALCOLOR_RED(nTextColor_)/255.0,
SALCOLOR_GREEN(nTextColor_)/255.0,
SALCOLOR_BLUE(nTextColor_)/255.0);
@@ -545,30 +357,30 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
const ImplFontOptions *pOptions = rFont.GetFontOptions().get();
void *pPattern = pOptions ? pOptions->GetPattern(pFace, aId.mbEmbolden) : NULL;
if (pPattern)
- font_face = rCairo.ft_font_face_create_for_pattern(pPattern);
+ font_face = cairo_ft_font_face_create_for_pattern(reinterpret_cast<FcPattern*>(pPattern));
if (!font_face)
- font_face = rCairo.ft_font_face_create_for_ft_face(pFace, rFont.GetLoadFlags());
+ font_face = cairo_ft_font_face_create_for_ft_face(reinterpret_cast<FT_Face>(pFace), rFont.GetLoadFlags());
m_aCairoFontsCache.CacheFont(font_face, aId);
}
- rCairo.set_font_face(cr, font_face);
+ cairo_set_font_face(cr, font_face);
cairo_matrix_t m;
const ImplFontSelectData& rFSD = rFont.GetFontSelData();
int nWidth = rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight;
- rCairo.matrix_init_identity(&m);
+ cairo_matrix_init_identity(&m);
if (rLayout.GetOrientation())
- rCairo.matrix_rotate(&m, (3600 - rLayout.GetOrientation()) * M_PI / 1800.0);
+ cairo_matrix_rotate(&m, (3600 - rLayout.GetOrientation()) * M_PI / 1800.0);
- rCairo.matrix_scale(&m, nWidth, rFSD.mnHeight);
+ cairo_matrix_scale(&m, nWidth, rFSD.mnHeight);
if (rFont.NeedsArtificialItalic())
m.xy = -m.xx * 0x6000L / 0x10000L;
- rCairo.set_font_matrix(cr, &m);
- rCairo.show_glyphs(cr, &cairo_glyphs[0], cairo_glyphs.size());
- rCairo.destroy(cr);
+ cairo_set_font_matrix(cr, &m);
+ cairo_show_glyphs(cr, &cairo_glyphs[0], cairo_glyphs.size());
+ cairo_destroy(cr);
}
//--------------------------------------------------------------------------
@@ -928,7 +740,7 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
ServerFont& rFont = rLayout.GetServerFont();
const bool bVertical = rFont.GetFontSelData().mbVertical;
- if( !bVertical && CairoWrapper::get().isCairoRenderable(rFont) )
+ if( !bVertical && isCairoRenderable(rFont) )
DrawCairoAAFontString( rLayout );
else
{
@@ -1087,16 +899,14 @@ void X11SalGraphics::GetDevFontSubstList( OutputDevice* )
// ----------------------------------------------------------------------------
-void cairosubcallback( void* pPattern )
+void cairosubcallback(void* pPattern)
{
- CairoWrapper& rCairo = CairoWrapper::get();
- if( !rCairo.isValid() )
- return;
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const void* pFontOptions = rStyleSettings.GetCairoFontOptions();
if( !pFontOptions )
return;
- rCairo.ft_font_options_substitute( pFontOptions, pPattern );
+ cairo_ft_font_options_substitute(static_cast<const cairo_font_options_t*>(pFontOptions),
+ static_cast<FcPattern*>(pPattern));
}
ImplFontOptions* GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize)
More information about the Libreoffice-commits
mailing list