[ooo-build-commit] Branch 'ooo/master' - 5 commits - canvas/overview.txt canvas/source goodies/source svtools/qa svtools/source toolkit/source tools/inc tools/prj tools/source transex3/source vcl/aqua vcl/inc vcl/os2 vcl/source vcl/unx vcl/win
Jan Holesovsky
kendy at kemper.freedesktop.org
Thu May 28 18:20:48 PDT 2009
canvas/overview.txt | 11
canvas/source/cairo/cairo_canvashelper_text.cxx | 12
canvas/source/cairo/cairo_quartz_cairo.cxx | 3
canvas/source/cairo/cairo_quartz_cairo.hxx | 4
canvas/source/cairo/cairo_textlayout.cxx | 302 +++++++++++++--
canvas/source/cairo/cairo_textlayout.hxx | 7
canvas/source/cairo/cairo_win32_cairo.cxx | 37 +
canvas/source/cairo/cairo_win32_cairo.hxx | 2
canvas/source/cairo/cairo_xlib_cairo.cxx | 38 -
canvas/source/cairo/cairo_xlib_cairo.hxx | 4
canvas/source/cairo/makefile.mk | 10
canvas/source/cairo/postx.h | 81 ----
canvas/source/cairo/prex.h | 86 ----
goodies/source/filter.vcl/eps/eps.cxx | 3
goodies/source/filter.vcl/ieps/ieps.cxx | 3
goodies/source/graphic/grfmgr2.cxx | 4
svtools/qa/complex/ConfigItems/helper/HistoryOptTest.cxx | 2
svtools/qa/complex/ConfigItems/helper/UserOptTest.cxx | 118 ++---
svtools/qa/complex/ConfigItems/helper/UserOptTest.hxx | 90 ++--
svtools/source/config/historyoptions.cxx | 38 -
svtools/source/config/printoptions.cxx | 62 +--
svtools/source/edit/editsyntaxhighlighter.cxx | 14
svtools/source/filter.vcl/wmf/enhwmf.cxx | 12
svtools/source/filter.vcl/wmf/winwmf.cxx | 11
svtools/source/inc/configitems/useroptions_const.hxx | 62 +--
svtools/source/misc/acceleratorexecute.cxx | 8
toolkit/source/awt/vclxdialog.cxx | 4
toolkit/source/awt/vclxsystemdependentwindow.cxx | 4
toolkit/source/awt/vclxtoolkit.cxx | 18
toolkit/source/awt/vclxtopwindow.cxx | 6
toolkit/source/awt/vclxwindow1.cxx | 7
tools/inc/tools/postx.h | 76 +++
tools/inc/tools/prex.h | 81 ++++
tools/prj/d.lst | 3
tools/source/generic/poly.cxx | 4
transex3/source/localize.cxx | 18
vcl/aqua/inc/salgdi.h | 1
vcl/aqua/source/gdi/salgdi.cxx | 37 +
vcl/inc/vcl/outdev.hxx | 8
vcl/inc/vcl/salgdi.hxx | 2
vcl/inc/vcl/sysdata.hxx | 50 ++
vcl/os2/inc/salgdi.h | 1
vcl/os2/source/gdi/salgdi3.cxx | 18
vcl/source/gdi/outdev3.cxx | 92 ++++
vcl/unx/gtk/window/gtkframe.cxx | 4
vcl/unx/headless/svpgdi.cxx | 16
vcl/unx/headless/svpgdi.hxx | 1
vcl/unx/headless/svppspgraphics.cxx | 16
vcl/unx/headless/svppspgraphics.hxx | 2
vcl/unx/inc/Xproto.h | 4
vcl/unx/inc/plugins/gtk/gtkdata.hxx | 4
vcl/unx/inc/plugins/gtk/gtkframe.hxx | 4
vcl/unx/inc/plugins/gtk/gtkgdi.hxx | 4
vcl/unx/inc/postx.h | 76 ---
vcl/unx/inc/prex.h | 81 ----
vcl/unx/inc/pspgraphics.h | 1
vcl/unx/inc/salgdi.h | 1
vcl/unx/inc/svunx.h | 4
vcl/unx/inc/wmadaptor.hxx | 4
vcl/unx/inc/xfont.hxx | 4
vcl/unx/source/app/i18n_cb.cxx | 4
vcl/unx/source/app/i18n_ic.cxx | 4
vcl/unx/source/app/i18n_im.cxx | 4
vcl/unx/source/app/i18n_status.cxx | 4
vcl/unx/source/app/keysymnames.cxx | 4
vcl/unx/source/app/randrwrapper.cxx | 4
vcl/unx/source/app/saldisp.cxx | 4
vcl/unx/source/app/sm.cxx | 4
vcl/unx/source/app/wmadaptor.cxx | 4
vcl/unx/source/gdi/gcach_xpeer.hxx | 4
vcl/unx/source/gdi/pspgraphics.cxx | 16
vcl/unx/source/gdi/salbmp.cxx | 4
vcl/unx/source/gdi/salgdi3.cxx | 30 +
vcl/unx/source/gdi/salvd.cxx | 4
vcl/unx/source/gdi/xrender_peer.hxx | 4
vcl/unx/source/plugadapt/salplug.cxx | 4
vcl/unx/source/window/salframe.cxx | 4
vcl/unx/source/window/salobj.cxx | 4
vcl/win/inc/salgdi.h | 1
vcl/win/source/gdi/salgdi3.cxx | 27 +
80 files changed, 1138 insertions(+), 680 deletions(-)
New commits:
commit e89f035936470d96ee60f46e32ed11ddd8627923
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Tue May 19 16:16:33 2009 +0000
#i10000#: fix CRLF. Sigh
diff --git a/svtools/qa/complex/ConfigItems/helper/HistoryOptTest.cxx b/svtools/qa/complex/ConfigItems/helper/HistoryOptTest.cxx
index aef57bc..aed5194 100644
--- a/svtools/qa/complex/ConfigItems/helper/HistoryOptTest.cxx
+++ b/svtools/qa/complex/ConfigItems/helper/HistoryOptTest.cxx
@@ -803,4 +803,4 @@ void HistoryOptTest::impl_checkHelpBookmarks()
impl_checkGetList(s_sHelpBookmarks);
impl_checkAppendItem(s_sHelpBookmarks);
}
-*/
+*/
diff --git a/svtools/qa/complex/ConfigItems/helper/UserOptTest.cxx b/svtools/qa/complex/ConfigItems/helper/UserOptTest.cxx
index 3780eff..ff5e75c 100644
--- a/svtools/qa/complex/ConfigItems/helper/UserOptTest.cxx
+++ b/svtools/qa/complex/ConfigItems/helper/UserOptTest.cxx
@@ -31,12 +31,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- ************************************************************************/
-
-#include "UserOptTest.hxx"
-
-namespace css = ::com::sun::star;
-
+ ************************************************************************/
+
+#include "UserOptTest.hxx"
+
+namespace css = ::com::sun::star;
+
//=============================================================================
static const ::rtl::OUString MESSAGE_SETCOMPANY_FAILED = ::rtl::OUString::createFromAscii("set company failed") ;
static const ::rtl::OUString MESSAGE_SETFIRSTNAME_FAILED = ::rtl::OUString::createFromAscii("set firstname failed") ;
@@ -57,59 +57,59 @@ static const ::rtl::OUString MESSAGE_SETCUSTOMERNUMBER_FAILED = ::rtl::OUString:
static const ::rtl::OUString MESSAGE_SETFATHERSNAME_FAILED = ::rtl::OUString::createFromAscii("set fathersname failed") ;
static const ::rtl::OUString MESSAGE_SETAPARTMENT_FAILED = ::rtl::OUString::createFromAscii("set apartment failed") ;
-//=============================================================================
-
-
-UserOptTest::UserOptTest()
- :m_aConfigItem()
- ,m_xCfg()
-{
-}
-
-UserOptTest::~UserOptTest()
-{
-}
-
-void UserOptTest::impl_checkUserData()
-{
- impl_checkSetCompany( ::rtl::OUString() );
- impl_checkSetFirstName( ::rtl::OUString() );
- impl_checkSetLastName( ::rtl::OUString() );
- impl_checkSetID( ::rtl::OUString() );
- impl_checkSetStreet( ::rtl::OUString() );
- impl_checkSetCity( ::rtl::OUString() );
- impl_checkSetState( ::rtl::OUString() );
- impl_checkSetZip( ::rtl::OUString() );
- impl_checkSetCountry( ::rtl::OUString() );
- impl_checkSetPosition( ::rtl::OUString() );
- impl_checkSetTitle( ::rtl::OUString() );
- impl_checkSetTelephoneHome( ::rtl::OUString() );
- impl_checkSetTelephoneWork( ::rtl::OUString() );
- impl_checkSetFax( ::rtl::OUString() );
- impl_checkSetEmail( ::rtl::OUString() );
- //impl_checkSetCustomerNumber( ::rtl::OUString() );
- impl_checkSetFathersName( ::rtl::OUString() );
- impl_checkSetApartment( ::rtl::OUString() );
-
- impl_checkSetCompany( ::rtl::OUString::createFromAscii("RedFlag2000") );
- impl_checkSetFirstName( ::rtl::OUString::createFromAscii("Yan") );
- impl_checkSetLastName( ::rtl::OUString::createFromAscii("Wu") );
- impl_checkSetID( ::rtl::OUString::createFromAscii("wuy") );
- impl_checkSetStreet( ::rtl::OUString::createFromAscii("SouthFifthRing") );
- impl_checkSetCity( ::rtl::OUString::createFromAscii("Beijing") );
- impl_checkSetState( ::rtl::OUString::createFromAscii("Beijing") );
- impl_checkSetZip( ::rtl::OUString::createFromAscii("100176") );
- impl_checkSetCountry( ::rtl::OUString::createFromAscii("China") );
- impl_checkSetPosition( ::rtl::OUString::createFromAscii("Engineer") );
- impl_checkSetTitle( ::rtl::OUString::createFromAscii("Software Engineer") );
- impl_checkSetTelephoneHome( ::rtl::OUString::createFromAscii("010-51570010") );
- impl_checkSetTelephoneWork( ::rtl::OUString::createFromAscii("010-51570010") );
- impl_checkSetFax( ::rtl::OUString::createFromAscii("010-51570010") );
- impl_checkSetEmail( ::rtl::OUString::createFromAscii("wuy at redflag2000.cn") );
- //impl_checkSetCustomerNumber( ::rtl::OUString::createFromAscii("87654321") );
- impl_checkSetFathersName( ::rtl::OUString::createFromAscii("father") );
- impl_checkSetApartment( ::rtl::OUString::createFromAscii("apartment") );
-}
+//=============================================================================
+
+
+UserOptTest::UserOptTest()
+ :m_aConfigItem()
+ ,m_xCfg()
+{
+}
+
+UserOptTest::~UserOptTest()
+{
+}
+
+void UserOptTest::impl_checkUserData()
+{
+ impl_checkSetCompany( ::rtl::OUString() );
+ impl_checkSetFirstName( ::rtl::OUString() );
+ impl_checkSetLastName( ::rtl::OUString() );
+ impl_checkSetID( ::rtl::OUString() );
+ impl_checkSetStreet( ::rtl::OUString() );
+ impl_checkSetCity( ::rtl::OUString() );
+ impl_checkSetState( ::rtl::OUString() );
+ impl_checkSetZip( ::rtl::OUString() );
+ impl_checkSetCountry( ::rtl::OUString() );
+ impl_checkSetPosition( ::rtl::OUString() );
+ impl_checkSetTitle( ::rtl::OUString() );
+ impl_checkSetTelephoneHome( ::rtl::OUString() );
+ impl_checkSetTelephoneWork( ::rtl::OUString() );
+ impl_checkSetFax( ::rtl::OUString() );
+ impl_checkSetEmail( ::rtl::OUString() );
+ //impl_checkSetCustomerNumber( ::rtl::OUString() );
+ impl_checkSetFathersName( ::rtl::OUString() );
+ impl_checkSetApartment( ::rtl::OUString() );
+
+ impl_checkSetCompany( ::rtl::OUString::createFromAscii("RedFlag2000") );
+ impl_checkSetFirstName( ::rtl::OUString::createFromAscii("Yan") );
+ impl_checkSetLastName( ::rtl::OUString::createFromAscii("Wu") );
+ impl_checkSetID( ::rtl::OUString::createFromAscii("wuy") );
+ impl_checkSetStreet( ::rtl::OUString::createFromAscii("SouthFifthRing") );
+ impl_checkSetCity( ::rtl::OUString::createFromAscii("Beijing") );
+ impl_checkSetState( ::rtl::OUString::createFromAscii("Beijing") );
+ impl_checkSetZip( ::rtl::OUString::createFromAscii("100176") );
+ impl_checkSetCountry( ::rtl::OUString::createFromAscii("China") );
+ impl_checkSetPosition( ::rtl::OUString::createFromAscii("Engineer") );
+ impl_checkSetTitle( ::rtl::OUString::createFromAscii("Software Engineer") );
+ impl_checkSetTelephoneHome( ::rtl::OUString::createFromAscii("010-51570010") );
+ impl_checkSetTelephoneWork( ::rtl::OUString::createFromAscii("010-51570010") );
+ impl_checkSetFax( ::rtl::OUString::createFromAscii("010-51570010") );
+ impl_checkSetEmail( ::rtl::OUString::createFromAscii("wuy at redflag2000.cn") );
+ //impl_checkSetCustomerNumber( ::rtl::OUString::createFromAscii("87654321") );
+ impl_checkSetFathersName( ::rtl::OUString::createFromAscii("father") );
+ impl_checkSetApartment( ::rtl::OUString::createFromAscii("apartment") );
+}
void UserOptTest::impl_checkSetCompany( const ::rtl::OUString& sUserData )
{
diff --git a/svtools/qa/complex/ConfigItems/helper/UserOptTest.hxx b/svtools/qa/complex/ConfigItems/helper/UserOptTest.hxx
index f6f84d4..2c5071a 100644
--- a/svtools/qa/complex/ConfigItems/helper/UserOptTest.hxx
+++ b/svtools/qa/complex/ConfigItems/helper/UserOptTest.hxx
@@ -31,48 +31,48 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- ************************************************************************/
-
-#ifndef SVTOOLS_USEROPTTEST_HXX
-#define SVTOOLS_USEROPTTEST_HXX
-
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <svtools/useroptions.hxx>
-
-namespace css = ::com::sun::star;
-
-class UserOptTest
-{
-public:
- UserOptTest();
- ~UserOptTest();
-
- void impl_checkUserData();
-
-private:
- void impl_checkSetCompany( const ::rtl::OUString& sUserData );
- void impl_checkSetFirstName( const ::rtl::OUString& sUserData );
- void impl_checkSetLastName( const ::rtl::OUString& sUserData );
- void impl_checkSetID( const ::rtl::OUString& sUserData );
- void impl_checkSetStreet( const ::rtl::OUString& sUserData );
- void impl_checkSetCity( const ::rtl::OUString& sUserData );
- void impl_checkSetState( const ::rtl::OUString& sUserData );
- void impl_checkSetZip( const ::rtl::OUString& sUserData );
- void impl_checkSetCountry( const ::rtl::OUString& sUserData );
- void impl_checkSetPosition( const ::rtl::OUString& sUserData );
- void impl_checkSetTitle( const ::rtl::OUString& sUserData );
- void impl_checkSetTelephoneHome( const ::rtl::OUString& sUserData );
- void impl_checkSetTelephoneWork( const ::rtl::OUString& sUserData );
- void impl_checkSetFax( const ::rtl::OUString& sUserData );
- void impl_checkSetEmail( const ::rtl::OUString& sUserData );
- void impl_checkSetCustomerNumber( const ::rtl::OUString& sUserData );
- void impl_checkSetFathersName( const ::rtl::OUString& sUserData );
- void impl_checkSetApartment( const ::rtl::OUString& sUserData );
-
-private:
- SvtUserOptions m_aConfigItem;
-
- css::uno::Reference< css::container::XNameAccess > m_xCfg;
-};
-
-#endif // #ifndef SVTOOLS_USEROPTTEST_HXX
+ ************************************************************************/
+
+#ifndef SVTOOLS_USEROPTTEST_HXX
+#define SVTOOLS_USEROPTTEST_HXX
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <svtools/useroptions.hxx>
+
+namespace css = ::com::sun::star;
+
+class UserOptTest
+{
+public:
+ UserOptTest();
+ ~UserOptTest();
+
+ void impl_checkUserData();
+
+private:
+ void impl_checkSetCompany( const ::rtl::OUString& sUserData );
+ void impl_checkSetFirstName( const ::rtl::OUString& sUserData );
+ void impl_checkSetLastName( const ::rtl::OUString& sUserData );
+ void impl_checkSetID( const ::rtl::OUString& sUserData );
+ void impl_checkSetStreet( const ::rtl::OUString& sUserData );
+ void impl_checkSetCity( const ::rtl::OUString& sUserData );
+ void impl_checkSetState( const ::rtl::OUString& sUserData );
+ void impl_checkSetZip( const ::rtl::OUString& sUserData );
+ void impl_checkSetCountry( const ::rtl::OUString& sUserData );
+ void impl_checkSetPosition( const ::rtl::OUString& sUserData );
+ void impl_checkSetTitle( const ::rtl::OUString& sUserData );
+ void impl_checkSetTelephoneHome( const ::rtl::OUString& sUserData );
+ void impl_checkSetTelephoneWork( const ::rtl::OUString& sUserData );
+ void impl_checkSetFax( const ::rtl::OUString& sUserData );
+ void impl_checkSetEmail( const ::rtl::OUString& sUserData );
+ void impl_checkSetCustomerNumber( const ::rtl::OUString& sUserData );
+ void impl_checkSetFathersName( const ::rtl::OUString& sUserData );
+ void impl_checkSetApartment( const ::rtl::OUString& sUserData );
+
+private:
+ SvtUserOptions m_aConfigItem;
+
+ css::uno::Reference< css::container::XNameAccess > m_xCfg;
+};
+
+#endif // #ifndef SVTOOLS_USEROPTTEST_HXX
diff --git a/svtools/source/config/historyoptions.cxx b/svtools/source/config/historyoptions.cxx
index 0d27a7e..bd27291 100644
--- a/svtools/source/config/historyoptions.cxx
+++ b/svtools/source/config/historyoptions.cxx
@@ -160,8 +160,8 @@ public:
const OUString& sTitle ,
const OUString& sPassword );
-private:
- void impl_truncateList (EHistoryType eHistory, sal_uInt32 nSize);
+private:
+ void impl_truncateList (EHistoryType eHistory, sal_uInt32 nSize);
private:
css::uno::Reference< css::container::XNameAccess > m_xCfg;
@@ -248,12 +248,12 @@ sal_uInt32 SvtHistoryOptions_Impl::GetSize( EHistoryType eHistory )
//*****************************************************************************************************************
void SvtHistoryOptions_Impl::SetSize( EHistoryType eHistory, sal_uInt32 nSize )
{
- css::uno::Reference< css::beans::XPropertySet > xListAccess(m_xCommonXCU, css::uno::UNO_QUERY);
- if (! xListAccess.is ())
+ css::uno::Reference< css::beans::XPropertySet > xListAccess(m_xCommonXCU, css::uno::UNO_QUERY);
+ if (! xListAccess.is ())
return;
try
- {
+ {
switch( eHistory )
{
case ePICKLIST:
@@ -291,15 +291,15 @@ void SvtHistoryOptions_Impl::SetSize( EHistoryType eHistory, sal_uInt32 nSize )
LogHelper::logIt(ex);
}
}
-
+
//*****************************************************************************************************************
-void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt32 nSize )
+void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt32 nSize )
{
css::uno::Reference< css::container::XNameAccess > xList;
css::uno::Reference< css::container::XNameContainer > xItemList;
css::uno::Reference< css::container::XNameContainer > xOrderList;
css::uno::Reference< css::beans::XPropertySet > xSet;
-
+
try
{
switch( eHistory )
@@ -322,11 +322,11 @@ void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt
// If too much items in current list ...
// truncate the oldest items BEFORE you set the new one.
- if ( ! xList.is())
- return;
+ if ( ! xList.is())
+ return;
xList->getByName(s_sOrderList) >>= xOrderList;
- xList->getByName(s_sItemList) >>= xItemList;
+ xList->getByName(s_sItemList) >>= xItemList;
const sal_uInt32 nLength = xOrderList->getElementNames().getLength();
if (nSize < nLength)
@@ -348,7 +348,7 @@ void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt
{
LogHelper::logIt(ex);
}
-}
+}
//*****************************************************************************************************************
// public method
@@ -416,8 +416,8 @@ void SvtHistoryOptions_Impl::Clear( EHistoryType eHistory )
//*****************************************************************************************************************
Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryType eHistory )
{
- impl_truncateList (eHistory, GetSize (eHistory));
-
+ impl_truncateList (eHistory, GetSize (eHistory));
+
Sequence< Sequence< PropertyValue > > seqReturn; // Set default return value.
Sequence< PropertyValue > seqProperties( 4 );
Sequence< ::rtl::OUString > lOrders;
@@ -433,12 +433,12 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryT
seqProperties[s_nOffsetPassword ].Name = HISTORY_PROPERTYNAME_PASSWORD;
try
- {
+ {
switch( eHistory )
{
case ePICKLIST:
{
- m_xCfg->getByName(s_sPickList) >>= xListAccess;
+ m_xCfg->getByName(s_sPickList) >>= xListAccess;
break;
}
@@ -457,7 +457,7 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryT
default:
break;
}
-
+
if (xListAccess.is())
{
xListAccess->getByName(s_sItemList) >>= xItemList;
@@ -500,8 +500,8 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
const OUString& sTitle ,
const OUString& sPassword )
{
- impl_truncateList (eHistory, GetSize (eHistory));
-
+ impl_truncateList (eHistory, GetSize (eHistory));
+
css::uno::Reference< css::container::XNameAccess > xListAccess;
sal_Int32 nMaxSize = 0;
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index ee373ee..cb1375b 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -168,17 +168,17 @@ public:
void SetReducedBitmapResolution( sal_Int16 nResolution ) ;
void SetReducedBitmapIncludesTransparency( sal_Bool bState ) ;
void SetConvertToGreyscales( sal_Bool bState ) ;
-
+
//-------------------------------------------------------------------------------------------------------------
// private API
-//-------------------------------------------------------------------------------------------------------------
-
-private:
- void impl_setValue (const ::rtl::OUString& sProp,
- ::sal_Bool bNew );
- void impl_setValue (const ::rtl::OUString& sProp,
- ::sal_Int16 nNew );
-
+//-------------------------------------------------------------------------------------------------------------
+
+private:
+ void impl_setValue (const ::rtl::OUString& sProp,
+ ::sal_Bool bNew );
+ void impl_setValue (const ::rtl::OUString& sProp,
+ ::sal_Int16 nNew );
+
//-------------------------------------------------------------------------------------------------------------
// private member
//-------------------------------------------------------------------------------------------------------------
@@ -431,7 +431,7 @@ sal_Bool SvtPrintOptions_Impl::IsConvertToGreyscales() const
return bRet;
}
-
+
void SvtPrintOptions_Impl::SetReduceTransparency(sal_Bool bState)
{
impl_setValue(PROPERTYNAME_REDUCETRANSPARENCY, bState);
@@ -488,21 +488,21 @@ SvtPrintOptions_Impl::~SvtPrintOptions_Impl()
m_xCfg.clear();
}
-void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp,
- ::sal_Bool bNew )
-{
+void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp,
+ ::sal_Bool bNew )
+{
try
{
- if ( ! m_xNode.is())
- return;
+ if ( ! m_xNode.is())
+ return;
css::uno::Reference<css::beans::XPropertySet> xSet(m_xNode, css::uno::UNO_QUERY);
- if ( ! xSet.is())
- return;
+ if ( ! xSet.is())
+ return;
::sal_Bool bOld = ! bNew;
- if ( ! (xSet->getPropertyValue(sProp) >>= bOld))
- return;
+ if ( ! (xSet->getPropertyValue(sProp) >>= bOld))
+ return;
if (bOld != bNew)
{
@@ -514,23 +514,23 @@ void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp,
{
LogHelper::logIt(ex);
}
-}
+}
-void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp,
- ::sal_Int16 nNew )
-{
+void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp,
+ ::sal_Int16 nNew )
+{
try
{
- if ( ! m_xNode.is())
- return;
+ if ( ! m_xNode.is())
+ return;
css::uno::Reference<css::beans::XPropertySet> xSet(m_xNode, css::uno::UNO_QUERY);
- if ( ! xSet.is())
- return;
+ if ( ! xSet.is())
+ return;
::sal_Int16 nOld = nNew+1;
- if ( ! (xSet->getPropertyValue(sProp) >>= nOld))
- return;
+ if ( ! (xSet->getPropertyValue(sProp) >>= nOld))
+ return;
if (nOld != nNew)
{
@@ -542,8 +542,8 @@ void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp,
{
LogHelper::logIt(ex);
}
-}
-
+}
+
// -----------------------------------------------------------------------------
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index c7a8860..4319fd5 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -29,14 +29,14 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
+#include "precompiled_svtools.hxx"
+
#include <svtools/svmedit.hxx>
-#include <svtools/xtextedt.hxx>
-#include <svtools/editsyntaxhighlighter.hxx>
-#include "../../inc/txtattr.hxx"
-
-
+#include <svtools/xtextedt.hxx>
+#include <svtools/editsyntaxhighlighter.hxx>
+#include "../../inc/txtattr.hxx"
+
+
MultiLineEditSyntaxHighlight::MultiLineEditSyntaxHighlight( Window* pParent, WinBits nWinStyle,
HighlighterLanguage aLanguage): MultiLineEdit(pParent,nWinStyle), mbDoBracketHilight(true)
{
diff --git a/svtools/source/inc/configitems/useroptions_const.hxx b/svtools/source/inc/configitems/useroptions_const.hxx
index 05698c7..6a1aed4 100644
--- a/svtools/source/inc/configitems/useroptions_const.hxx
+++ b/svtools/source/inc/configitems/useroptions_const.hxx
@@ -31,34 +31,34 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- ************************************************************************/
-
-#ifndef INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
-#define INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
-
-#include <rtl/ustring.hxx>
-
-namespace
-{
- static const ::rtl::OUString s_sData = ::rtl::OUString::createFromAscii("org.openoffice.UserProfile/Data");
- static const ::rtl::OUString s_so = ::rtl::OUString::createFromAscii("o"); // USER_OPT_COMPANY
- static const ::rtl::OUString s_sgivenname = ::rtl::OUString::createFromAscii("givenname"); // USER_OPT_FIRSTNAME
- static const ::rtl::OUString s_ssn = ::rtl::OUString::createFromAscii("sn"); // USER_OPT_LASTNAME
- static const ::rtl::OUString s_sinitials = ::rtl::OUString::createFromAscii("initials"); // USER_OPT_ID
- static const ::rtl::OUString s_sstreet = ::rtl::OUString::createFromAscii("street"); // USER_OPT_STREET
- static const ::rtl::OUString s_sl = ::rtl::OUString::createFromAscii("l"); // USER_OPT_CITY
- static const ::rtl::OUString s_sst = ::rtl::OUString::createFromAscii("st"); // USER_OPT_STATE
- static const ::rtl::OUString s_spostalcode = ::rtl::OUString::createFromAscii("postalcode"); // USER_OPT_ZIP
- static const ::rtl::OUString s_sc = ::rtl::OUString::createFromAscii("c"); // USER_OPT_COUNTRY
- static const ::rtl::OUString s_stitle = ::rtl::OUString::createFromAscii("title"); // USER_OPT_TITLE
- static const ::rtl::OUString s_sposition = ::rtl::OUString::createFromAscii("position"); // USER_OPT_POSITION
- static const ::rtl::OUString s_shomephone = ::rtl::OUString::createFromAscii("homephone"); // USER_OPT_TELEPHONEHOME
- static const ::rtl::OUString s_stelephonenumber = ::rtl::OUString::createFromAscii("telephonenumber"); // USER_OPT_TELEPHONEWORK
- static const ::rtl::OUString s_sfacsimiletelephonenumber = ::rtl::OUString::createFromAscii("facsimiletelephonenumber"); // USER_OPT_FAX
- static const ::rtl::OUString s_smail = ::rtl::OUString::createFromAscii("mail"); // USER_OPT_EMAIL
- static const ::rtl::OUString s_scustomernumber = ::rtl::OUString::createFromAscii("customernumber"); // USER_OPT_CUSTOMERNUMBER
- static const ::rtl::OUString s_sfathersname = ::rtl::OUString::createFromAscii("fathersname"); // USER_OPT_FATHERSNAME
- static const ::rtl::OUString s_sapartment = ::rtl::OUString::createFromAscii("apartment"); // USER_OPT_APARTMENT
-}
-
-#endif // INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
+ ************************************************************************/
+
+#ifndef INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
+#define INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
+
+#include <rtl/ustring.hxx>
+
+namespace
+{
+ static const ::rtl::OUString s_sData = ::rtl::OUString::createFromAscii("org.openoffice.UserProfile/Data");
+ static const ::rtl::OUString s_so = ::rtl::OUString::createFromAscii("o"); // USER_OPT_COMPANY
+ static const ::rtl::OUString s_sgivenname = ::rtl::OUString::createFromAscii("givenname"); // USER_OPT_FIRSTNAME
+ static const ::rtl::OUString s_ssn = ::rtl::OUString::createFromAscii("sn"); // USER_OPT_LASTNAME
+ static const ::rtl::OUString s_sinitials = ::rtl::OUString::createFromAscii("initials"); // USER_OPT_ID
+ static const ::rtl::OUString s_sstreet = ::rtl::OUString::createFromAscii("street"); // USER_OPT_STREET
+ static const ::rtl::OUString s_sl = ::rtl::OUString::createFromAscii("l"); // USER_OPT_CITY
+ static const ::rtl::OUString s_sst = ::rtl::OUString::createFromAscii("st"); // USER_OPT_STATE
+ static const ::rtl::OUString s_spostalcode = ::rtl::OUString::createFromAscii("postalcode"); // USER_OPT_ZIP
+ static const ::rtl::OUString s_sc = ::rtl::OUString::createFromAscii("c"); // USER_OPT_COUNTRY
+ static const ::rtl::OUString s_stitle = ::rtl::OUString::createFromAscii("title"); // USER_OPT_TITLE
+ static const ::rtl::OUString s_sposition = ::rtl::OUString::createFromAscii("position"); // USER_OPT_POSITION
+ static const ::rtl::OUString s_shomephone = ::rtl::OUString::createFromAscii("homephone"); // USER_OPT_TELEPHONEHOME
+ static const ::rtl::OUString s_stelephonenumber = ::rtl::OUString::createFromAscii("telephonenumber"); // USER_OPT_TELEPHONEWORK
+ static const ::rtl::OUString s_sfacsimiletelephonenumber = ::rtl::OUString::createFromAscii("facsimiletelephonenumber"); // USER_OPT_FAX
+ static const ::rtl::OUString s_smail = ::rtl::OUString::createFromAscii("mail"); // USER_OPT_EMAIL
+ static const ::rtl::OUString s_scustomernumber = ::rtl::OUString::createFromAscii("customernumber"); // USER_OPT_CUSTOMERNUMBER
+ static const ::rtl::OUString s_sfathersname = ::rtl::OUString::createFromAscii("fathersname"); // USER_OPT_FATHERSNAME
+ static const ::rtl::OUString s_sapartment = ::rtl::OUString::createFromAscii("apartment"); // USER_OPT_APARTMENT
+}
+
+#endif // INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
commit add1dfb3a7b07dea518612690a0aa8b6323e8ead
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Tue May 19 09:32:45 2009 +0000
CWS-TOOLING: integrate CWS impress169
2009-05-13 17:37:21 +0200 sj r271865 : #i100942# applied patch, removed oversafe buffer check (now without warnings on 64 bit platform)
2009-05-13 12:27:18 +0200 sj r271855 : #i101769# fixed line/fill attributes for graphic objects
2009-05-12 10:25:17 +0200 cl r271799 : report correct minimum cell hight for empty cells
2009-04-28 17:29:46 +0200 cl r271334 : fixed merge error
2009-04-28 16:18:01 +0200 cl r271330 : fixed build error
2009-04-28 12:38:09 +0200 cl r271320 : #i100129# images for new layouts
2009-04-27 19:12:06 +0200 cl r271302 : CWS-TOOLING: rebase CWS impress169 to trunk at 270723 (milestone: DEV300:m46)
2009-04-20 19:13:28 +0200 sj r271012 : #i100942# applied patch, removed oversafe buffer check
2009-04-09 18:00:01 +0200 sj r270719 : #158488# added rectangular gradient support
2009-04-09 17:49:52 +0200 sj r270718 : #158488# added rectangular gradient support
2009-04-09 17:46:24 +0200 sj r270717 : #158488# added rectangular gradient support
2009-03-26 18:16:34 +0100 cl r270098 : #i99867# applied patch from jlcheng to correctly register table design pane
2009-03-26 18:12:11 +0100 cl r270097 : #i100220# leave some items default so they are not overridden if a new table style is set
2009-03-26 18:11:10 +0100 cl r270096 : #i100220# clear only those items that are also in the style when assigning a new table layout
2009-03-26 15:56:24 +0100 cl r270085 : #i99977# listen to outliner and dispose if outliner dies
2009-03-26 15:47:29 +0100 cl r270084 : #i99977# made the Outliner a SfxBroadcaster so others can listen for its death
2009-03-24 19:10:05 +0100 sj r269991 : #i100490# fixed text resize problem
2009-03-23 14:31:11 +0100 sj r269872 : #i96083# added patch, (dubious && and ||)
2009-03-19 17:55:11 +0100 sj r269764 : #i100275# applied patch, row height is now correct even for rows containing no text
2009-03-18 18:10:52 +0100 sj r269701 : #i93616# solved performance problem when loading document
2009-03-18 16:20:40 +0100 sj r269688 : removing unused code
2009-03-18 16:19:22 +0100 sj r269687 : removing unused code
2009-03-18 16:17:54 +0100 sj r269686 : removing unused code
2009-03-18 10:28:07 +0100 cl r269643 : #i100029# let cells be disposed as soon as the table model is disposed
2009-03-17 15:56:50 +0100 cl r269614 : #i99984# new impress photo layouts 3x2 and 2x2
2009-03-17 15:36:35 +0100 cl r269611 : #i99984# adding new impress photo layouts 3x2 and 2x2
2009-03-16 18:43:48 +0100 cl r269564 : #i55224# correct internal links if pages are changed
2009-03-16 16:40:38 +0100 cl r269559 : #i55224# correct internal hyperlinks if slides are changed/renamed
2009-03-16 15:34:12 +0100 cl r269553 : #i99427# invalidate slots after promote/demote
2009-03-13 18:18:20 +0100 sj r269492 : #i92421# fixed loop if loading encrypted ppt file
2009-03-13 14:51:58 +0100 sj r269481 : #i93002# fixed crash if saving presentation without master title placeholder
2009-03-13 12:26:21 +0100 sj r269468 : #i100147# do not exceed the max point count if creating simple polygon via ::GetSimple
2009-03-12 17:00:45 +0100 sj r269427 : #i82518# justifying rectangles for arc/pie and chord actions, fixed round rectangle problem
diff --git a/goodies/source/filter.vcl/eps/eps.cxx b/goodies/source/filter.vcl/eps/eps.cxx
index 43cd7e3..d14ccd3 100644
--- a/goodies/source/filter.vcl/eps/eps.cxx
+++ b/goodies/source/filter.vcl/eps/eps.cxx
@@ -2639,7 +2639,8 @@ BOOL PSWriter::ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
BOOL bNegative = FALSE;
BOOL bValid = TRUE;
- while ( ( --nSecurityCount ) && ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) pDest++;
+ while ( ( --nSecurityCount ) && ( ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) )
+ pDest++;
BYTE nByte = *pDest;
while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
{
diff --git a/goodies/source/filter.vcl/ieps/ieps.cxx b/goodies/source/filter.vcl/ieps/ieps.cxx
index 2729b99..178f247 100644
--- a/goodies/source/filter.vcl/ieps/ieps.cxx
+++ b/goodies/source/filter.vcl/ieps/ieps.cxx
@@ -93,7 +93,8 @@ static long ImplGetNumber( BYTE **pBuf, int& nSecurityCount )
BOOL bValid = TRUE;
BOOL bNegative = FALSE;
long nRetValue = 0;
- while ( ( --nSecurityCount ) && ( **pBuf == ' ' ) || ( **pBuf == 0x9 ) ) (*pBuf)++;
+ while ( ( --nSecurityCount ) && ( ( **pBuf == ' ' ) || ( **pBuf == 0x9 ) ) )
+ (*pBuf)++;
BYTE nByte = **pBuf;
while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
{
diff --git a/goodies/source/graphic/grfmgr2.cxx b/goodies/source/graphic/grfmgr2.cxx
index 64e1f92..1366afb 100644
--- a/goodies/source/graphic/grfmgr2.cxx
+++ b/goodies/source/graphic/grfmgr2.cxx
@@ -2321,11 +2321,11 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
rBmpEx.Crop( rCropRect );
// #104115# Negative crop sizes mean: enlarge bitmap and pad
- if( bEnlarge &&
+ if( bEnlarge && (
rCropLeftTop.Width() < 0 ||
rCropLeftTop.Height() < 0 ||
rCropRightBottom.Width() < 0 ||
- rCropRightBottom.Height() < 0 )
+ rCropRightBottom.Height() < 0 ) )
{
Size aBmpSize( rBmpEx.GetSizePixel() );
sal_Int32 nPadLeft( rCropLeftTop.Width() < 0 ? -rCropLeftTop.Width() : 0 );
diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx
index d4f892a..513bd7f 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx
@@ -390,10 +390,10 @@ BOOL EnhWMFReader::ReadEnhWMF()
pnPoints[ i ] = (UINT16)nPoints;
}
- if ( ( nGesPoints * sizeof(Point) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( nGesPoints * (sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) <= ( nEndPos - pWMF->Tell() ) )
{
// Polygonpunkte holen:
- pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
+ pPtAry = new Point[ nGesPoints ];
for ( i = 0; i < nGesPoints; i++ )
{
@@ -403,7 +403,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
// PolyPolygon Actions erzeugen
PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
- delete[] (char*) pPtAry;
+ delete[] pPtAry;
}
delete[] pnPoints;
}
@@ -1157,10 +1157,10 @@ BOOL EnhWMFReader::ReadEnhWMF()
*pWMF >> nPoints;
pnPoints[ i ] = (UINT16)nPoints;
}
- if ( ( nGesPoints * sizeof(Point) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) )
{
// Polygonpunkte holen:
- pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
+ pPtAry = new Point[ nGesPoints ];
for ( i = 0; i < nGesPoints; i++ )
{
*pWMF >> nX16 >> nY16;
@@ -1170,7 +1170,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
// PolyPolygon Actions erzeugen
PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
- delete[] (char*) pPtAry;
+ delete[] pPtAry;
}
delete[] pnPoints;
}
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx
index f63d66e..a0dee38 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/winwmf.cxx
@@ -276,7 +276,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_ROUNDRECT:
{
Size aSize( ReadYXExt() );
- pOut->DrawRoundRect( ReadRectangle(), aSize );
+ pOut->DrawRoundRect( ReadRectangle(), Size( aSize.Width() / 2, aSize.Height() / 2 ) );
}
break;
@@ -290,7 +290,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- pOut->DrawArc( ReadRectangle(), aStart, aEnd );
+ Rectangle aRect( ReadRectangle() );
+ aRect.Justify();
+ pOut->DrawArc( aRect, aStart, aEnd );
}
break;
@@ -299,6 +301,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
Rectangle aRect( ReadRectangle() );
+ aRect.Justify();
// #i73608# OutputDevice deviates from WMF
// semantics. start==end means full ellipse here.
@@ -313,7 +316,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- pOut->DrawChord( ReadRectangle(), aStart, aEnd );
+ Rectangle aRect( ReadRectangle() );
+ aRect.Justify();
+ pOut->DrawChord( aRect, aStart, aEnd );
}
break;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 51f6b7b..dd6d40e 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1004,8 +1004,8 @@ void Polygon::GetSimple( Polygon& rResult ) const
rResult = Polygon( (USHORT)aPointVector.size() );
::std::vector< Point >::iterator aIter( aPointVector.begin() ), aEnd( aPointVector.end() );
Point* pPointArray = rResult.mpImplPolygon->mpPointAry;
-
- while( aIter != aEnd )
+ USHORT nPoints = rResult.mpImplPolygon->mnPoints;
+ while( nPoints-- && aIter != aEnd )
*pPointArray++ = *aIter++;
}
}
commit 57c2443dcd65667bba450fa968202ef8a4f0b073
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Tue May 19 09:31:27 2009 +0000
CWS-TOOLING: integrate CWS tl66
2009-05-15 12:28:55 +0200 tl r271932 : #i91812# include fixed
2009-05-07 16:52:41 +0200 tl r271680 : #i97200# one more MathML export problem to fix
2009-05-05 08:33:29 +0200 tl r271494 : #i99401# positiv user-dicts vs negativ user-dicts
2009-05-04 14:14:03 +0200 tl r271452 : #i97200# warning free code; MathML 2.0 export
2009-05-04 13:26:30 +0200 tl r271448 : #i97200# write valid MathML 2.0 on export
2009-04-29 14:21:54 +0200 tl r271371 : #i97200# new MathML token
2009-04-29 11:12:07 +0200 tl r271360 : #i97200# inroducing separate files for import and export
2009-04-28 16:47:42 +0200 tl r271331 : #i97200# better MathML pretty printing
2009-04-28 11:21:57 +0200 tl r271315 : #i97200# MathML attributes and default namespace for MathML
2009-04-28 11:21:24 +0200 tl r271314 : #i97200# MathML attributes and default namespace for MathML
2009-04-23 12:44:18 +0200 tl r271154 : #i97200# math.dtd removed
2009-04-23 12:31:56 +0200 tl r271151 : #i97200# MathML: don't use namespace on attributes
2009-04-22 13:21:11 +0200 tl r271099 : warning-free code
2009-04-22 12:20:13 +0200 tl r271092 : #i100757# loop fixed
2009-04-22 11:29:51 +0200 tl r271086 : #97327# adding mongolian fingerprint for language guessing
2009-04-22 11:25:56 +0200 tl r271083 : #97327# adding mongolian fingerprint for language guessing
2009-04-21 10:39:21 +0200 tl r271025 : #99599# code fix for LRE/RLE embedding
2009-04-20 16:36:33 +0200 tl r270992 : #i99604# HasDigits fixed
2009-04-20 14:44:19 +0200 tl r270985 : #i99604# warning-free code for Windows
2009-04-20 13:48:13 +0200 tl r270980 : #i99604# HasDigits fix for non-ASCII characters
2009-04-20 13:47:50 +0200 tl r270979 : #i99604# HasDigits fix for non-ASCII characters
2009-04-20 12:28:15 +0200 tl r270973 : warning-free code after merging
2009-04-20 10:16:19 +0200 tl r270964 : warning-free code after merging
2009-04-17 14:43:36 +0200 tl r270948 : #i96846#
2009-04-16 13:09:15 +0200 tl r270883 : CWS-TOOLING: rebase CWS tl66 to trunk at 270723 (milestone: DEV300:m46)
2009-04-14 14:34:08 +0200 tl r270770 : #101067# warning-free code
2009-04-02 09:07:44 +0200 tl r270368 : #i100757# performance patch for start-up (initialize language guessing on demand only)
2009-03-11 10:37:59 +0100 tl r269301 : #i100083# fixed system dictionary lookup
2009-03-06 13:10:23 +0100 tl r268998 : warning-free code for Windows non-pro
2009-02-23 14:01:23 +0100 tl r268355 : #i99401# winning rules for user-dictionaries changed
2009-02-19 14:05:57 +0100 tl r268281 : #i98644# suggestion improvement when first checker does not know any suggestions
2009-02-19 14:05:02 +0100 tl r268280 : #i98644# suggestion improvement when first checker does not know any suggestions
2009-02-19 13:58:51 +0100 tl r268279 : #i98644# suggestion improvement when first checker does not know any suggestions
2009-02-19 11:38:03 +0100 tl r268266 : #i98644# suggestion improvement when first checker does not know any suggestions
2009-02-12 11:58:34 +0100 tl r267642 : #i96846# some properties declared as maybevoid
2009-02-06 12:43:55 +0100 tl r267454 : #i98644# provide sugestions from secondary spell checkers if the primary does not provide ones
2009-02-05 13:02:26 +0100 tl r267418 : #i98880# a bit clean-up in the grammar checking framework
2009-02-04 12:15:37 +0100 tl r267363 : #i91812# remove unused/duplicate code
2009-02-04 12:09:34 +0100 tl r267362 : #i91812# remove unused/duplicate code
2009-02-04 11:07:57 +0100 tl r267355 : #i91812# remove unused code
2009-02-04 11:06:48 +0100 tl r267354 : #i91812# remove unused code
2009-02-03 14:52:43 +0100 tl r267331 : #i91812# remove unused code
2009-02-03 14:26:00 +0100 tl r267324 : #i91198# adding fingerprint for luxembourgish
2009-02-03 14:20:58 +0100 tl r267323 : #i91198# adding fingerprint for luxembourgish
2009-02-03 14:18:33 +0100 tl r267322 : #i91198# adding fingerprint for luxembourgish
2009-02-03 13:56:39 +0100 tl r267319 : #i91812# remove unused code
2009-02-03 12:41:50 +0100 tl r267314 : #i48400# auto-spellcheck improvement when deleting wrong chars
2009-02-03 11:48:51 +0100 tl r267310 : #i91812# remove unused code
2009-02-03 11:14:29 +0100 tl r267307 : warning free code
2009-02-03 10:45:21 +0100 tl r267306 : #i91812# remove unused code
2009-02-03 10:37:04 +0100 tl r267304 : #i33387# name change for 'View/Selection'
2009-02-03 10:36:17 +0100 tl r267303 : #i33387# name change for 'View/Selection'
2009-02-03 10:32:12 +0100 tl r267302 : #i30642# spelling error in context menu fixed
2009-02-03 10:27:34 +0100 tl r267301 : #i92210# remove unused code types.cxx cfgitem.*
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index fc2be61..5524fc9 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -484,8 +484,8 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
{
sModule = xModuleDetection->identify(xFrame);
}
- catch(const css::uno::RuntimeException&)
- { throw; }
+ catch(const css::uno::RuntimeException&rEx)
+ { (void) rEx; throw; }
catch(const css::uno::Exception&)
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
@@ -579,8 +579,8 @@ IMPL_LINK(AsyncAccelExec, impl_ts_asyncCallback, void*,)
}
catch(const css::lang::DisposedException&)
{}
- catch(const css::uno::RuntimeException&)
- { throw; }
+ catch(const css::uno::RuntimeException&rEx)
+ { (void) rEx; throw; }
catch(const css::uno::Exception&)
{}
commit 07b30ef9ff11680ef56a1c5cb4d28b4b0e2c3e0f
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Mon May 18 14:16:16 2009 +0000
CWS-TOOLING: integrate CWS smoketest22
2009-05-18 15:25:11 +0200 ihi r272027 : l10n fix
2009-05-13 16:50:47 +0200 kz r271864 : #i101889# adjust installpath
diff --git a/transex3/source/localize.cxx b/transex3/source/localize.cxx
index 75c54c2..6b48184 100644
--- a/transex3/source/localize.cxx
+++ b/transex3/source/localize.cxx
@@ -94,6 +94,24 @@ const char *PositiveList[] = {
"chart2/source/controller/menu/MenuItems_tmpl.hrc",
"chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc",
"chart2/source/controller/dialogs/res_Trendline_tmpl.hrc",
+ "svx.link/inc/globlmn_tmpl.hrc",
+ "sw.link/source/ui/inc/swmn_tmpl.hrc",
+ "sw.link/source/ui/inc/swacc_tmpl.hrc",
+ "sw.link/source/ui/inc/toolbox_tmpl.hrc",
+ "offmgr.link/inc/offmenu_tmpl.hrc",
+ "offmgr.link/source/offapp/intro/intro_tmpl.hrc",
+ "dbaccess.link/source/ui/inc/toolbox_tmpl.hrc",
+ "svx.link/source/intro/intro_tmpl.hrc",
+ "dbaccess.link/source/ui/dlg/AutoControls_tmpl.hrc",
+ "svx.link/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_DataLabel_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_LegendPosition_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_Statistic_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_Titlesx_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc",
+ "chart2.link/source/controller/menu/MenuItems_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_ErrorBar_tmpl.hrc",
+ "chart2.link/source/controller/dialogs/res_Trendline_tmpl.hrc",
"NULL"
};
commit 725c1b13f51d4ce4757a9a826a769c1f9208ed5d
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Mon May 18 12:01:49 2009 +0000
CWS-TOOLING: integrate CWS cairocanvastext01
2009-05-12 07:10:00 +0200 mox r271795 : Rename ::GetLayoutData() to ::GetSysTextLayoutData() to avoid build
breakage in sc module.
2009-05-11 23:40:57 +0200 mox r271794 : merge fixes (again). These files should have been removed by the rebase.
2009-05-11 20:17:44 +0200 mox r271791 : fix build breakage on UNX
2009-05-11 16:53:15 +0200 mox r271779 : Documentation fix
2009-05-11 16:49:16 +0200 mox r271778 : merge fixes
2009-05-11 14:10:36 +0200 mox r271769 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 271427 (milestone: DEV300:m47)
2009-05-11 10:55:11 +0200 mox r271760 : merge fixes
2009-05-11 10:49:44 +0200 mox r271759 : manual merge to DEV300_m47
2009-05-11 10:42:11 +0200 mox r271758 : merge fixes
2009-05-11 10:29:16 +0200 mox r271757 : Manual merge to DEV300_m47
2009-05-11 10:21:13 +0200 mox r271756 : manual merge to DEV300_m47
2009-05-11 10:10:29 +0200 mox r271755 : manual merge to DEV300_m47
2009-05-11 10:01:33 +0200 mox r271754 : Manual merge to DEV300_m47
2009-05-11 09:59:30 +0200 mox r271753 : manual merge to DEV300_m47
2009-05-11 09:57:33 +0200 mox r271752 : merge fixes
2009-05-11 09:56:05 +0200 mox r271751 : merge fixes
2009-05-11 09:53:26 +0200 mox r271749 : Manual merge to DEV300_m47
2009-05-11 09:49:34 +0200 mox r271748 : manual merge to DEV300_m47
2009-05-11 09:43:20 +0200 mox r271747 : manual merge to DEV300_m47
2009-05-11 09:30:10 +0200 mox r271745 : Manual merge to DEV300_m47
2009-05-11 09:28:59 +0200 mox r271744 : manual merge to DEV300_m47
2009-05-11 09:24:49 +0200 mox r271743 : Fix to merge
2009-05-11 09:21:55 +0200 mox r271742 : Manual merge to DEV300_m47
2009-05-11 09:18:13 +0200 mox r271741 : merge fixes
2009-05-11 09:00:50 +0200 mox r271739 : Manual merge to DEV300_m47
2009-05-09 13:26:10 +0200 mox r271734 : cleanup
2009-05-09 13:17:22 +0200 mox r271733 : WNT build fixes
2009-05-09 09:23:59 +0200 mox r271732 : Implement proper cross-platform font width calculation
Implement faux bold support
2009-02-21 19:47:08 +0100 mox r268339 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 267171 (milestone: DEV300:m41)
2009-01-19 21:51:21 +0100 mox r266530 : Fix compilation on win32
2009-01-19 21:37:20 +0100 mox r266529 : Fix typo
2009-01-19 21:35:28 +0100 mox r266528 : Better debug
2009-01-19 21:13:30 +0100 mox r266527 : Win32 fixes for proper text rendering
2009-01-19 21:12:56 +0100 mox r266526 : Win32 fixes for proper text rendering
2008-12-27 13:04:05 +0100 mox r265814 : configure fixes
2008-12-27 11:37:00 +0100 mox r265813 : x86_64 works only with system-cairo
2008-12-26 20:02:32 +0100 mox r265809 : Use the fix for 64bit builds
2008-12-25 16:58:11 +0100 mox r265802 : Fix build breaker on WNT
2008-12-24 23:04:58 +0100 mox r265801 : Unbreak build after rebase.
2008-12-23 18:52:32 +0100 mox r265790 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 265758 (milestone: DEV300:m38)
2008-12-23 18:23:09 +0100 mox r265789 : Fix the fix
2008-12-23 18:21:27 +0100 mox r265788 : Fix OS2 stuff
2008-12-11 19:50:40 +0100 mox r265354 : Fix build breaker on Mac
2008-12-09 22:00:53 +0100 mox r265139 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 264807 (milestone: DEV300:m37)
2008-12-08 23:02:32 +0100 thb r265052 : Removed outdated parts from readme
2008-12-08 22:26:54 +0100 mox r265051 : cleanup
2008-12-07 19:55:31 +0100 mox r264967 : Fix for non-intel processors.
2008-12-07 19:47:11 +0100 mox r264963 : sysdata fixes
2008-12-07 19:23:27 +0100 mox r264959 : Sysdata fixes
2008-12-07 19:01:48 +0100 mox r264958 : Fix sysdata usage
2008-12-07 11:41:33 +0100 mox r264951 : sysdata fixes
2008-12-07 11:38:32 +0100 mox r264950 : sysdata fixes
2008-12-06 23:15:06 +0100 mox r264947 : Try to fix error: __sync_val_compare_and_swap_4
2008-12-06 23:09:30 +0100 mox r264945 : Revert unnecessary change.
2008-12-06 23:04:40 +0100 mox r264944 : Use pre/postx from tools module.
2008-12-06 22:49:08 +0100 mox r264943 : Use proper pre/post includes.
2008-12-06 22:48:03 +0100 mox r264942 : Use pre/postx from tools module.
2008-12-06 22:24:10 +0100 mox r264941 : Fix build breaker.
2008-12-06 21:55:46 +0100 mox r264940 : Make pre/postx.h properly available
2008-12-06 21:54:23 +0100 mox r264939 : Make pre/postx.h properly available.
2008-12-06 21:43:09 +0100 mox r264938 : Try to fix error: __sync_val_compare_and_swap_4
2008-12-06 21:12:18 +0100 mox r264937 : Remove obsolete pre-built binaries
2008-12-06 21:07:40 +0100 mox r264936 : WNT: do not hardcode pixman version in cairo build
2008-12-06 19:26:44 +0100 mox r264934 : Revert pixman upgrade.
2008-12-06 18:35:14 +0100 mox r264933 : Fix build breaker
2008-12-06 18:31:11 +0100 mox r264932 : Use static pixman lib on unx/32bit to avoid linking problems
2008-12-06 17:22:52 +0100 mox r264930 : Update pixman to 0.13.2
2008-12-06 13:30:41 +0100 mox r264928 : Fix accidentally changed property
2008-12-06 13:09:00 +0100 mox r264927 : Fix accidental prop changes
2008-12-06 12:40:08 +0100 mox r264926 : Fix build breaker on Win32
2008-12-06 12:39:22 +0100 mox r264925 : Fix build breaker on Win32
2008-12-06 12:30:23 +0100 mox r264924 : Fix build breakers on win32
2008-12-06 11:45:33 +0100 mox r264923 : revert.
2008-12-06 11:43:05 +0100 mox r264922 : Try to fix header include problems on WNT
2008-12-06 09:57:35 +0100 mox r264921 : Cleanup accidental props
2008-11-29 14:43:51 +0100 mox r264580 : Move headers around to make all platforms compile
2008-11-29 14:41:59 +0100 mox r264579 : WaE fixes for X11
2008-11-29 13:13:49 +0100 mox r264578 : Fix build breaker on linux
2008-11-29 12:21:03 +0100 mox r264577 : Fix build breaker
2008-11-29 12:13:50 +0100 mox r264576 : Try to fix build breaker
2008-11-28 22:51:27 +0100 mox r264573 : Revert header includes to common style
2008-11-18 18:59:15 +0100 mox r263794 : Fix build breaker.
2008-11-17 20:28:19 +0100 mox r263740 : Revert most configure hacks
2008-11-17 20:12:51 +0100 mox r263739 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 263288 (milestone: DEV300:m35)
2008-11-14 21:22:22 +0100 mox r263698 : ZLIB_FIX define set
2008-11-14 18:48:22 +0100 mox r263694 : hardcode zlib paths
2008-11-14 16:23:07 +0100 mox r263683 : Fix typo
2008-11-13 20:16:13 +0100 mox r263662 : WaE fix
2008-11-13 19:44:29 +0100 mox r263661 : Properly include zlib headers for win32
2008-11-12 20:05:51 +0100 mox r263610 : Add debugging code.
2008-11-10 19:44:35 +0100 mox r263537 : Try to fix build breaker
2008-11-09 22:34:35 +0100 mox r263504 : Remove accidentally added svn:ignore properties.
2008-11-09 22:33:21 +0100 mox r263503 : prop should be actually deleted.
2008-11-09 22:30:06 +0100 mox r263502 : props should be empty.
2008-11-09 22:23:22 +0100 mox r263501 : Try fix props again...
2008-11-09 22:11:26 +0100 mox r263500 : try to fix svn:ignore
2008-11-09 21:30:01 +0100 mox r263499 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 262620 (milestone: DEV300:m34)
2008-11-09 20:30:55 +0100 mox r263498 : add missing cairo patch
2008-11-09 10:56:33 +0100 mox r263494 : Resync cairo module with cws cairosource01
2008-11-01 09:32:19 +0100 mox r262870 : CWS-TOOLING: rebase CWS cairocanvastext01 to trunk at 262620 (milestone: DEV300:m34)
2008-10-26 20:55:48 +0100 mox r262663 : Fix build breaker
2008-10-25 13:10:00 +0200 mox r262662 : CWS rebase to m33
2008-10-12 19:47:56 +0200 mox r262170 : Migrate CWS cairocanvastext01 to SVN.
diff --git a/canvas/overview.txt b/canvas/overview.txt
index 0f9ada4..5d508b0 100644
--- a/canvas/overview.txt
+++ b/canvas/overview.txt
@@ -1,13 +1,10 @@
The new OOo Canvas Framework
============================
-The new OpenOffice.org canvas framework is the successor of the
-system GUI and graphics backend VCL. It is planned for the
-OpenOffice.org 2.0 release, and currently ready in a first developer
-version, with X11, Java, and DirectX/GDI+ backends. This means, that
-basic functionality is available, supplying just as much features as
-to provide a VCL-equivalent feature set (except proper BiDi/CTL
-support).
+The new OpenOffice.org canvas framework is the successor of the system
+GUI and graphics backend VCL. Basic functionality is available,
+supplying just as much features as necessary to provide a
+VCL-equivalent feature set (except proper BiDi/CTL support).
For migration purposes, the new canvas and VCL will be shipped with
OpenOffice.org for quite some time, allowing a step-by-step adaptation
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index af29544..0c38187 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -343,10 +343,12 @@ namespace cairocanvas
// TODO(F2): alpha
mpVirtualDevice->SetLayoutMode( nLayoutMode );
- mpVirtualDevice->DrawText( aOutpos,
- text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+
+ OSL_TRACE(":cairocanvas::CanvasHelper::drawText(O,t,f,v,r,d): %s", ::rtl::OUStringToOString( text.Text.copy( text.StartPosition, text.Length ),
+ RTL_TEXTENCODING_UTF8 ).getStr());
+
+ TextLayout* pTextLayout = new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider);
+ pTextLayout->draw( mpSurface, *mpVirtualDevice, aOutpos, viewState, renderState );
}
return uno::Reference< rendering::XCachedPrimitive >(NULL);
@@ -384,7 +386,7 @@ namespace cairocanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// TODO(F2): What about the offset scalings?
- pTextLayout->draw( *mpVirtualDevice, aOutpos, viewState, renderState );
+ pTextLayout->draw( mpSurface, *mpVirtualDevice, aOutpos, viewState, renderState );
}
}
else
diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx
index 0f08510..3d2ac7f 100644
--- a/canvas/source/cairo/cairo_quartz_cairo.cxx
+++ b/canvas/source/cairo/cairo_quartz_cairo.cxx
@@ -37,6 +37,9 @@
************************************************************************/
#include <osl/diagnose.h>
+#include <vcl/sysdata.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/virdev.hxx>
#include "cairo_cairo.hxx"
diff --git a/canvas/source/cairo/cairo_quartz_cairo.hxx b/canvas/source/cairo/cairo_quartz_cairo.hxx
index 1eea627..c4826cc 100644
--- a/canvas/source/cairo/cairo_quartz_cairo.hxx
+++ b/canvas/source/cairo/cairo_quartz_cairo.hxx
@@ -38,10 +38,6 @@
#include <cairo-quartz.h>
#include "postmac.h"
-#include <vcl/sysdata.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/virdev.hxx>
-
namespace cairo {
class QuartzSurface : public Surface
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 6a12efb..003ba68 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -31,6 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_canvas.hxx"
+#include <math.h>
+
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
@@ -38,6 +40,13 @@
#include <vcl/metric.hxx>
#include <vcl/virdev.hxx>
+#ifdef WNT
+#include <tools/prewin.h>
+#include <windows.h>
+#include <tools/postwin.h>
+#endif
+#include <vcl/sysdata.hxx>
+
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
@@ -46,6 +55,17 @@
#include "cairo_textlayout.hxx"
#include "cairo_spritecanvas.hxx"
+#ifdef CAIRO_HAS_QUARTZ_SURFACE
+# include "cairo_quartz_cairo.hxx"
+#elif defined CAIRO_HAS_WIN32_SURFACE
+# include "cairo_win32_cairo.hxx"
+# include <cairo-win32.h>
+#elif defined CAIRO_HAS_XLIB_SURFACE
+# include "cairo_xlib_cairo.hxx"
+# include <cairo-ft.h>
+#else
+# error Native API needed.
+#endif
using namespace ::cairo;
using namespace ::com::sun::star;
@@ -292,6 +312,11 @@ namespace cairocanvas
cairo_set_font_size( pCairo, aFontRequest.CellSize );
}
+ /** TextLayout:draw
+ *
+ * This function uses the "toy" api of the cairo library
+ *
+ **/
bool TextLayout::draw( Cairo* pCairo )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -310,6 +335,248 @@ namespace cairocanvas
return true;
}
+
+ /**
+ * TextLayout::isCairoRenderable
+ *
+ * Features currenly not supported by Cairo (VCL rendering is used as fallback):
+ * - vertical glyphs
+ *
+ * @return true, if text/font can be rendered with cairo
+ **/
+ bool TextLayout::isCairoRenderable(SystemFontData aSysFontData) const
+ {
+#if defined UNX && !defined QUARTZ
+ // is font usable?
+ if (!aSysFontData.nFontId) return false;
+#endif
+
+ // vertical glyph rendering is not supported in cairo for now
+ if (aSysFontData.bVerticalCharacterType) {
+ OSL_TRACE(":cairocanvas::TextLayout::isCairoRenderable(): ***************** VERTICAL CHARACTER STYLE!!! ****************");
+ return false;
+ }
+
+ return true;
+ }
+
+
+ /**
+ * TextLayout::draw
+ *
+ * Cairo-based text rendering. Draw text directly on the cairo surface with cairo fonts.
+ * Avoid using VCL VirtualDevices for that, bypassing VCL DrawText functions, when possible
+ *
+ * Note: some text effects are not rendered due to lacking generic canvas or cairo canvas
+ * implementation. See issues 92657, 92658, 92659, 92660, 97529
+ *
+ * @return true, if successful
+ **/
+ bool TextLayout::draw( SurfaceSharedPtr& pSurface,
+ OutputDevice& rOutDev,
+ const Point& rOutpos,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState ) const
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ SystemTextLayoutData aSysLayoutData;
+#if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
+ LOGFONTW logfont;
+#endif
+ setupLayoutMode( rOutDev, mnTextDirection );
+
+ // TODO(P2): cache that
+ ::boost::scoped_array< sal_Int32 > aOffsets(new sal_Int32[maLogicalAdvancements.getLength()]);
+
+ if( maLogicalAdvancements.getLength() )
+ {
+ setupTextOffsets( aOffsets.get(), maLogicalAdvancements, viewState, renderState );
+
+ // TODO(F3): ensure correct length and termination for DX
+ // array (last entry _must_ contain the overall width)
+ }
+
+ aSysLayoutData = rOutDev.GetSysTextLayoutData(rOutpos, maText.Text,
+ ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<USHORT>(maText.Length),
+ maLogicalAdvancements.getLength() ? aOffsets.get() : NULL);
+
+ // The ::GetSysTextLayoutData(), i.e. layouting of text to glyphs can change the font being used.
+ // The fallback checks need to be done after final font is known.
+ if (!isCairoRenderable(aSysLayoutData.aSysFontData)) // VCL FALLBACKS
+ {
+ OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK %s%s%s%s - %s",
+ maLogicalAdvancements.getLength() ? "ADV " : "",
+ aSysLayoutData.aSysFontData.bAntialias ? "AA " : "",
+ aSysLayoutData.aSysFontData.bFakeBold ? "FB " : "",
+ aSysLayoutData.aSysFontData.bFakeItalic ? "FI " : "",
+ ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
+ RTL_TEXTENCODING_UTF8 ).getStr());
+
+ if (maLogicalAdvancements.getLength()) // VCL FALLBACK - with glyph advances
+ {
+ rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(),
+ ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ return true;
+ }
+ else // VCL FALLBACK - without advances
+ {
+ rOutDev.DrawText( rOutpos, maText.Text,
+ ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ return true;
+ }
+ }
+
+ if (aSysLayoutData.rGlyphData.empty()) return false; //??? false?
+
+ /**
+ * Setup platform independent glyph vector into cairo-based glyphs vector.
+ **/
+
+ // setup glyphs
+ std::vector<cairo_glyph_t> cairo_glyphs;
+ cairo_glyphs.reserve( 256 );
+
+ for( int nStart = 0; nStart < (int) aSysLayoutData.rGlyphData.size(); nStart++ )
+ {
+ cairo_glyph_t aGlyph;
+ SystemGlyphData systemGlyph = aSysLayoutData.rGlyphData.at(nStart);
+ aGlyph.index = systemGlyph.index;
+#ifdef CAIRO_HAS_WIN32_SURFACE
+ // Cairo requires standard glyph indexes (ETO_GLYPH_INDEX), while vcl/win/* uses ucs4 chars.
+ // Convert to standard indexes
+ aGlyph.index = cairo::ucs4toindex((unsigned int) aGlyph.index, aSysLayoutData.aSysFontData.hFont);
+#endif
+ aGlyph.x = systemGlyph.x;
+ aGlyph.y = systemGlyph.y;
+ cairo_glyphs.push_back(aGlyph);
+ }
+
+ if (cairo_glyphs.empty()) return true; //true or false??
+
+ /**
+ * Setup font
+ **/
+ cairo_font_face_t* font_face = NULL;
+
+#ifdef CAIRO_HAS_QUARTZ_SURFACE
+ // TODO: use cairo_quartz_font_face_create_for_cgfont(cgFont)
+ // when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend.
+ font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) aSysLayoutData.aSysFontData.aATSUFontID);
+
+#elif defined CAIRO_HAS_WIN32_SURFACE
+ #if (OSL_DEBUG_LEVEL > 1)
+ GetObjectW( aSysLayoutData.aSysFontData.hFont, sizeof(logfont), &logfont );
+ #endif
+ // Note: cairo library uses logfont fallbacks when lfEscapement, lfOrientation and lfWidth are not zero.
+ // VCL always has non-zero value for lfWidth
+ font_face = cairo_win32_font_face_create_for_hfont(aSysLayoutData.aSysFontData.hFont);
+
+#elif defined CAIRO_HAS_XLIB_SURFACE
+ font_face = cairo_ft_font_face_create_for_ft_face((FT_Face)aSysLayoutData.aSysFontData.nFontId,
+ aSysLayoutData.aSysFontData.nFontFlags);
+#else
+# error Native API needed.
+#endif
+
+ CairoSharedPtr pSCairo = pSurface->getCairo();
+
+ cairo_set_font_face( pSCairo.get(), font_face);
+
+ // create default font options. cairo_get_font_options() does not retrieve the surface defaults,
+ // only what has been set before with cairo_set_font_options()
+ cairo_font_options_t* options = cairo_font_options_create();
+ if (aSysLayoutData.aSysFontData.bAntialias) {
+ // CAIRO_ANTIALIAS_GRAY provides more similar result to VCL Canvas,
+ // so we're not using CAIRO_ANTIALIAS_SUBPIXEL
+ cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY);
+ }
+ cairo_set_font_options( pSCairo.get(), options);
+
+ // Font color
+ Color mTextColor = rOutDev.GetTextColor();
+ cairo_set_source_rgb(pSCairo.get(),
+ mTextColor.GetRed()/255.0,
+ mTextColor.GetGreen()/255.0,
+ mTextColor.GetBlue()/255.0);
+
+ // Font rotation and scaling
+ cairo_matrix_t m;
+ Font aFont = rOutDev.GetFont();
+ FontMetric aMetric( rOutDev.GetFontMetric(aFont) );
+ long nWidth = 0;
+
+ // width calculation is deep magic and platform/font dependant.
+ // width == 0 means no scaling, and usually width == height means the same.
+ // Other values mean horizontal scaling (narrow or stretching)
+ // see issue #101566
+
+ //proper scale calculation across platforms
+ if (aFont.GetWidth() == 0) {
+ nWidth = aFont.GetHeight();
+ } else {
+ // any scaling needs to be relative to the platform-dependent definition
+ // of width of the font
+ nWidth = aFont.GetHeight() * aFont.GetWidth() / aMetric.GetWidth();
+ }
+
+ cairo_matrix_init_identity(&m);
+
+ if (aSysLayoutData.orientation) cairo_matrix_rotate(&m, (3600 - aSysLayoutData.orientation) * M_PI / 1800.0);
+
+ cairo_matrix_scale(&m, nWidth, aFont.GetHeight());
+
+ //faux italics
+ if (aSysLayoutData.aSysFontData.bFakeItalic) m.xy = -m.xx * 0x6000L / 0x10000L;
+
+ cairo_set_font_matrix(pSCairo.get(), &m);
+
+ OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), W:%d->%d, Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s",
+ aFont.GetWidth(),
+ aFont.GetHeight(),
+ aMetric.GetWidth(),
+ nWidth,
+ (int) rOutpos.X(),
+ (int) rOutpos.Y(),
+ cairo_glyphs[0].index, cairo_glyphs[1].index, cairo_glyphs[2].index,
+ maLogicalAdvancements.getLength() ? "ADV " : "",
+ aSysLayoutData.aSysFontData.bAntialias ? "AA " : "",
+ aSysLayoutData.aSysFontData.bFakeBold ? "FB " : "",
+ aSysLayoutData.aSysFontData.bFakeItalic ? "FI " : "",
+#if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
+ ::rtl::OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr(),
+#else
+ ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr(),
+#endif
+ ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
+ RTL_TEXTENCODING_UTF8 ).getStr()
+ );
+
+ cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
+
+ //faux bold
+ if (aSysLayoutData.aSysFontData.bFakeBold) {
+ double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() );
+ int total_steps = 2 * ((int) (bold_dx + 0.5));
+
+ // loop to draw the text for every half pixel of displacement
+ for (int nSteps = 0; nSteps < total_steps; nSteps++) {
+ for(int nGlyphIdx = 0; nGlyphIdx < (int) cairo_glyphs.size(); nGlyphIdx++) {
+ cairo_glyphs[nGlyphIdx].x += bold_dx * nSteps / total_steps;
+ }
+ cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
+ }
+ OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx);
+ }
+
+ cairo_restore( pSCairo.get() );
+ cairo_font_face_destroy(font_face);
+ return true;
+ }
+
+
namespace
{
class OffsetTransformer
@@ -363,41 +630,6 @@ namespace cairocanvas
OffsetTransformer( aMatrix ) );
}
- bool TextLayout::draw( OutputDevice& rOutDev,
- const Point& rOutpos,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState ) const
- {
- ::osl::MutexGuard aGuard( m_aMutex );
-
- setupLayoutMode( rOutDev, mnTextDirection );
-
- if( maLogicalAdvancements.getLength() )
- {
- // TODO(P2): cache that
- ::boost::scoped_array< sal_Int32 > aOffsets(new sal_Int32[maLogicalAdvancements.getLength()]);
- setupTextOffsets( aOffsets.get(), maLogicalAdvancements, viewState, renderState );
-
- // TODO(F3): ensure correct length and termination for DX
- // array (last entry _must_ contain the overall width)
-
- rOutDev.DrawTextArray( rOutpos,
- maText.Text,
- aOffsets.get(),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
- }
- else
- {
- rOutDev.DrawText( rOutpos,
- maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
- }
-
- return true;
- }
-
#define SERVICE_NAME "com.sun.star.rendering.TextLayout"
#define IMPLEMENTATION_NAME "CairoCanvas::TextLayout"
diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx
index a54922e..b7feaf1 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -93,10 +93,12 @@ namespace cairocanvas
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
bool draw( ::cairo::Cairo* pCairo );
- bool draw( OutputDevice& rOutDev,
+ bool draw( SurfaceSharedPtr& pSurface,
+ OutputDevice& rOutDev,
const Point& rOutpos,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
+
void setupTextOffsets( sal_Int32* outputOffsets,
const ::com::sun::star::uno::Sequence< double >& inputOffsets,
const ::com::sun::star::rendering::ViewState& viewState,
@@ -112,7 +114,8 @@ namespace cairocanvas
SurfaceProviderRef mpRefDevice;
sal_Int8 mnTextDirection;
- void useFont( ::cairo::Cairo* pCairo );
+ void useFont( ::cairo::Cairo* pCairo );
+ bool isCairoRenderable(SystemFontData aSysFontData) const;
};
}
diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx
index 90f9948..9df46bd 100644
--- a/canvas/source/cairo/cairo_win32_cairo.cxx
+++ b/canvas/source/cairo/cairo_win32_cairo.cxx
@@ -284,6 +284,43 @@ namespace cairo
return SurfaceSharedPtr();
}
+
+ /**
+ * cairo::ucs4toindex: Convert ucs4 char to glyph index
+ * @param ucs4 an ucs4 char
+ * @param hfont current font
+ *
+ * @return true if successful
+ **/
+ unsigned long ucs4toindex(unsigned int ucs4, HFONT hfont)
+ {
+ wchar_t unicode[2];
+ WORD glyph_index;
+ HDC hdc = NULL;
+ int i = 0;
+
+ hdc = CreateCompatibleDC (NULL);
+
+ if (!hdc) return 0;
+ if (!SetGraphicsMode (hdc, GM_ADVANCED)) {
+ DeleteDC (hdc);
+ return 0;
+ }
+
+ SelectObject (hdc, hfont);
+ SetMapMode (hdc, MM_TEXT);
+
+ unicode[0] = ucs4;
+ unicode[1] = 0;
+ if (GetGlyphIndicesW (hdc, unicode, 1, &glyph_index, 0) == GDI_ERROR) {
+ glyph_index = 0;
+ }
+
+ DeleteDC (hdc);
+ return glyph_index;
+ }
+
+
} // namespace cairo
#endif // CAIRO_HAS_WIN32_SURFACE
diff --git a/canvas/source/cairo/cairo_win32_cairo.hxx b/canvas/source/cairo/cairo_win32_cairo.hxx
index c764e68..fe35f2e 100644
--- a/canvas/source/cairo/cairo_win32_cairo.hxx
+++ b/canvas/source/cairo/cairo_win32_cairo.hxx
@@ -66,6 +66,8 @@ namespace cairo {
int getDepth() const;
};
+
+ unsigned long ucs4toindex(unsigned int ucs4, HFONT hfont);
}
#endif
diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx
index ab47b90..fbf8a7d 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.cxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.cxx
@@ -31,10 +31,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_canvas.hxx"
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/extensions/Xrender.h>
#include <X11/Xlib.h>
-#include <postx.h>
+#include <tools/postx.h>
#include "cairo_xlib_cairo.hxx"
@@ -71,23 +71,23 @@ namespace cairo
pRenderFormat(NULL)
{}
- X11SysData::X11SysData( const SystemGraphicsData* pSysDat ) :
- pDisplay(pSysDat->pDisplay),
- hDrawable(pSysDat->hDrawable),
- pVisual(pSysDat->pVisual),
- nScreen(pSysDat->nScreen),
- nDepth(pSysDat->nDepth),
- aColormap(pSysDat->aColormap),
- pRenderFormat(pSysDat->pRenderFormat)
+ X11SysData::X11SysData( const SystemGraphicsData& pSysDat ) :
+ pDisplay(pSysDat.pDisplay),
+ hDrawable(pSysDat.hDrawable),
+ pVisual(pSysDat.pVisual),
+ nScreen(pSysDat.nScreen),
+ nDepth(pSysDat.nDepth),
+ aColormap(pSysDat.aColormap),
+ pRenderFormat(pSysDat.pRenderFormat)
{}
- X11SysData::X11SysData( const SystemEnvData* pSysDat ) :
- pDisplay(pSysDat->pDisplay),
- hDrawable(pSysDat->aWindow),
- pVisual(pSysDat->pVisual),
- nScreen(pSysDat->nScreen),
- nDepth(pSysDat->nDepth),
- aColormap(pSysDat->aColormap),
+ X11SysData::X11SysData( const SystemEnvData& pSysDat ) :
+ pDisplay(pSysDat.pDisplay),
+ hDrawable(pSysDat.aWindow),
+ pVisual(pSysDat.pVisual),
+ nScreen(pSysDat.nScreen),
+ nDepth(pSysDat.nDepth),
+ aColormap(pSysDat.aColormap),
pRenderFormat(NULL)
{}
@@ -315,12 +315,12 @@ namespace cairo
if( !pSysData )
return X11SysData();
else
- return X11SysData(pSysData);
+ return X11SysData(*pSysData);
}
static X11SysData getSysData( const VirtualDevice& rVirDev )
{
- return X11SysData( &rVirDev.GetSystemGfxData() );
+ return X11SysData( rVirDev.GetSystemGfxData() );
}
SurfaceSharedPtr createSurface( const OutputDevice& rRefDevice,
diff --git a/canvas/source/cairo/cairo_xlib_cairo.hxx b/canvas/source/cairo/cairo_xlib_cairo.hxx
index e902692..b7165cc 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.hxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.hxx
@@ -42,8 +42,8 @@ namespace cairo {
struct X11SysData
{
X11SysData();
- explicit X11SysData( const SystemGraphicsData* );
- explicit X11SysData( const SystemEnvData* );
+ explicit X11SysData( const SystemGraphicsData& );
+ explicit X11SysData( const SystemEnvData& );
void* pDisplay; // the relevant display connection
long hDrawable; // a drawable
diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk
index 0466b1d..bd54254 100644
--- a/canvas/source/cairo/makefile.mk
+++ b/canvas/source/cairo/makefile.mk
@@ -99,12 +99,14 @@ SHL1STDLIBS+= -lcairo
SLOFILES+= $(SLO)$/cairo_quartz_cairo.obj
OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions
CFLAGSCXX+=$(OBJCXXFLAGS)
-SHL1STDLIBS+= -lpixman-1
-.ELSE
+.ELSE # "$(GUIBASE)"=="aqua"
+
# Xlib
SLOFILES+= $(SLO)$/cairo_xlib_cairo.obj
-SHL1STDLIBS+= -lfontconfig $(FREETYPELIB) -lX11 -lXrender
-.ENDIF
+SHL1STDLIBS+= -lfontconfig -lX11 -lXrender -lpixman-1 $(FREETYPE_LIBS)
+CFLAGS+=$(FREETYPE_CFLAGS)
+
+.ENDIF # "$(GUIBASE)"=="aqua"
.ELSE # "$(GUI)"=="UNX"
diff --git a/canvas/source/cairo/postx.h b/canvas/source/cairo/postx.h
deleted file mode 100644
index ca8f610..0000000
--- a/canvas/source/cairo/postx.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: postx.h,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: kz $ $Date: 2008-06-30 12:59:14 $
- *
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library 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 for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- ************************************************************************/
-
-#ifndef _POSTX_H
-#define _POSTX_H
-
-#if defined __cplusplus
-}
-#endif
-
-/* X-Types */
-#undef Window
-#undef BYTE
-#undef INT8
-#undef INT64
-#undef BOOL
-#undef Font
-#undef Cursor
-#undef String
-#undef KeyCode
-#undef Region
-#undef Icon
-#undef Time
-#undef Boolean
-
-#undef Min
-#undef Max
-#undef DestroyAll
-#undef Success
-
-#undef Printer
-/* #undef FontInfo */
-#undef Orientation
-
-#undef GetToken
-#undef ReleaseToken
-#undef InitializeToken
-#undef NextRequest
-
-#ifdef KeyPress
-#if KeyPress != 2
-Error KeyPress must be Equal 2
-#endif
-#undef KeyPress
-#endif
-#define XLIB_KeyPress 2
-
-#endif
-
diff --git a/canvas/source/cairo/prex.h b/canvas/source/cairo/prex.h
deleted file mode 100644
index 764f771..0000000
--- a/canvas/source/cairo/prex.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: prex.h,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: kz $ $Date: 2008-06-30 12:58:44 $
- *
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library 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 for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- ************************************************************************/
-
-#ifndef _PREX_H
-#define _PREX_H
-
-#define Window XLIB_Window
-#define BYTE XLIB_BYTE
-#define INT8 XLIB_INT8
-#define INT64 XLIB_INT64
-#define BOOL XLIB_BOOL
-#define Font XLIB_Font
-#define Cursor XLIB_Cursor
-#define String XLIB_String
-#define KeyCode XLIB_KeyCode
-#define Region XLIB_Region
-#define Icon XLIB_Icon
-#define Time XLIB_Time
-#define Region XLIB_Region
-#define Boolean XLIB_Boolean
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) // should really check for xfree86 or for X11R6.1 and higher
-#define __XKeyboardExtension__ 1
-#else
-#define __XKeyboardExtension__ 0
-#endif
-
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/StringDefs.h>
-#include <X11/extensions/Xrender.h>
-#if __XKeyboardExtension__
-#include <X11/XKBlib.h>
-#endif
-typedef unsigned long Pixel;
-
-#undef DestroyAll
-#define DestroyAll XLIB_DestroyAll
-#define XLIB_DestroyAll 0
-#undef String
-#define String XLIB_String
-
-#undef KeyCode
-#define KeyCode XLIB_KeyCode //undef in intrinsics
-
-#define __Ol_OlXlibExt_h__
-
-#endif
-
diff --git a/toolkit/source/awt/vclxdialog.cxx b/toolkit/source/awt/vclxdialog.cxx
index 7488783..08283dc 100644
--- a/toolkit/source/awt/vclxdialog.cxx
+++ b/toolkit/source/awt/vclxdialog.cxx
@@ -45,9 +45,7 @@
#include <tools/prewin.h>
#include <windows.h>
#include <tools/postwin.h>
-#endif
-
-#ifdef QUARTZ
+#elif defined ( QUARTZ )
#include "premac.h"
#include <Cocoa/Cocoa.h>
#include "postmac.h"
diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx
index 7fa0d28..f3db357 100644
--- a/toolkit/source/awt/vclxsystemdependentwindow.cxx
+++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx
@@ -46,9 +46,7 @@
#include <tools/prewin.h>
#include <windows.h>
#include <tools/postwin.h>
-#endif
-
-#ifdef QUARTZ
+#elif defined ( QUARTZ )
#include "premac.h"
#include <Cocoa/Cocoa.h>
#include "postmac.h"
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 25f9b4e..d5b70de 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -55,6 +55,18 @@
#include <rtl/memory.h>
#include <rtl/uuid.h>
#include <rtl/process.h>
+
+#ifdef WNT
+#include <tools/prewin.h>
+#include <windows.h>
+#include <tools/postwin.h>
+#elif (defined QUARTZ)
+#include "premac.h"
+#include <Cocoa/Cocoa.h>
+#include "postmac.h"
+#endif
+#include <vcl/sysdata.hxx>
+
#include <toolkit/awt/vclxwindows.hxx>
#include <toolkit/awt/vclxsystemdependentwindow.hxx>
#include <toolkit/awt/vclxregion.hxx>
@@ -108,12 +120,6 @@
#include <vcl/wrkwin.hxx>
#include "toolkit/awt/vclxspinbutton.hxx"
-#ifdef QUARTZ
-#include "premac.h"
-#include <Cocoa/Cocoa.h>
-#include "postmac.h"
-#endif
-#include <vcl/sysdata.hxx>
#include <tools/debug.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx
index cfe9a45..f490a78 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -33,13 +33,11 @@
#include <com/sun/star/lang/SystemDependent.hpp>
#include <com/sun/star/awt/SystemDependentXWindow.hpp>
-#if !defined(UNX) && !defined(OS2)
+#ifdef WNT
#include <tools/prewin.h>
#include <windows.h>
#include <tools/postwin.h>
-#endif
-
-#ifdef QUARTZ
+#elif defined ( QUARTZ )
#include "premac.h"
#include <Cocoa/Cocoa.h>
#include "postmac.h"
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 982e842..9ddd90e 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -38,7 +38,12 @@
#include <vcl/wrkwin.hxx>
#endif
#include <vcl/window.hxx>
-#ifdef QUARTZ
+
+#ifdef WNT
+#include <tools/prewin.h>
+#include <windows.h>
+#include <tools/postwin.h>
+#elif defined ( QUARTZ )
#include "premac.h"
#include <Cocoa/Cocoa.h>
#include "postmac.h"
diff --git a/tools/inc/tools/postx.h b/tools/inc/tools/postx.h
new file mode 100644
index 0000000..79a4696
--- /dev/null
+++ b/tools/inc/tools/postx.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postx.h,v $
+ * $Revision: 1.7 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef _POSTX_H
+#define _POSTX_H
+
+#if defined __cplusplus
+}
+#endif
+
+/* X-Types */
+#undef Window
+#undef BYTE
+#undef INT8
+#undef INT64
+#undef BOOL
+#undef Font
+#undef Cursor
+#undef String
+#undef KeyCode
+#undef Region
+#undef Icon
+#undef Time
+#undef Boolean
+
+#undef Min
+#undef Max
+#undef DestroyAll
+#undef Success
+
+#undef Printer
+/* #undef FontInfo */
+#undef Orientation
+
+#undef GetToken
+#undef ReleaseToken
+#undef InitializeToken
+#undef NextRequest
+
+#ifdef KeyPress
+#if KeyPress != 2
+Error KeyPress must be Equal 2
+#endif
+#undef KeyPress
+#endif
+#define XLIB_KeyPress 2
+
+#endif
+
diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h
new file mode 100644
index 0000000..976a4cb
--- /dev/null
+++ b/tools/inc/tools/prex.h
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: prex.h,v $
+ * $Revision: 1.17 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef _PREX_H
+#define _PREX_H
+
+#define Window XLIB_Window
+#define BYTE XLIB_BYTE
+#define INT8 XLIB_INT8
+#define INT64 XLIB_INT64
+#define BOOL XLIB_BOOL
+#define Font XLIB_Font
+#define Cursor XLIB_Cursor
+#define String XLIB_String
+#define KeyCode XLIB_KeyCode
+#define Region XLIB_Region
+#define Icon XLIB_Icon
+#define Time XLIB_Time
+#define Region XLIB_Region
+#define Boolean XLIB_Boolean
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) // should really check for xfree86 or for X11R6.1 and higher
+#define __XKeyboardExtension__ 1
+#else
+#define __XKeyboardExtension__ 0
+#endif
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/StringDefs.h>
+#include <X11/extensions/Xrender.h>
+#if __XKeyboardExtension__
+#include <X11/XKBlib.h>
+#endif
+typedef unsigned long Pixel;
+
+#undef DestroyAll
+#define DestroyAll XLIB_DestroyAll
+#define XLIB_DestroyAll 0
+#undef String
+#define String XLIB_String
+
+#undef KeyCode
+#define KeyCode XLIB_KeyCode //undef in intrinsics
+
+#define __Ol_OlXlibExt_h__
+
+#endif
+
diff --git a/tools/prj/d.lst b/tools/prj/d.lst
index 660afff..e8fde61 100644
--- a/tools/prj/d.lst
+++ b/tools/prj/d.lst
@@ -31,6 +31,9 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp
..\inc\tools\postwin.h %_DEST%\inc%_EXT%\tools\postwin.h
..\inc\tools\prewin.h %_DEST%\inc%_EXT%\tools\prewin.h
+..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h
+..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h
+
..\inc\tools\agapi.hxx %_DEST%\inc%_EXT%\tools\agapi.hxx
..\inc\tools\agapi.hxx %_DEST%\inc%_EXT%\tools\agapi.hxx
..\inc\tools\agitem.hxx %_DEST%\inc%_EXT%\tools\agitem.hxx
diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h
index dbd64dd..b4651cf 100644
--- a/vcl/aqua/inc/salgdi.h
+++ b/vcl/aqua/inc/salgdi.h
@@ -348,6 +348,7 @@ public:
virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int /* nFallbacklevel */ ) const;
private:
// differences between VCL, Quartz and kHiThemeOrientation coordinate systems
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 5f4f8f4..aa849d6 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -2298,6 +2298,43 @@ void AquaSalGraphics::FreeEmbedFontData( const void* pData, long nDataLen )
// -----------------------------------------------------------------------
+SystemFontData AquaSalGraphics::GetSysFontData( int /* nFallbacklevel */ ) const
+{
+ SystemFontData aSysFontData;
+ OSStatus err;
+ aSysFontData.nSize = sizeof( SystemFontData );
+
+ // NOTE: Native ATSU font fallbacks are used, not the VCL fallbacks.
+ ATSUFontID fontId;
+ err = ATSUGetAttribute( maATSUStyle, kATSUFontTag, sizeof(fontId), &fontId, 0 );
+ if (err) fontId = 0;
+ aSysFontData.aATSUFontID = (void *) fontId;
+
+ Boolean bFbold;
+ err = ATSUGetAttribute( maATSUStyle, kATSUQDBoldfaceTag, sizeof(bFbold), &bFbold, 0 );
+ if (err) bFbold = FALSE;
+ aSysFontData.bFakeBold = (bool) bFbold;
+
+ Boolean bFItalic;
+ err = ATSUGetAttribute( maATSUStyle, kATSUQDItalicTag, sizeof(bFItalic), &bFItalic, 0 );
+ if (err) bFItalic = FALSE;
+ aSysFontData.bFakeItalic = (bool) bFItalic;
+
+ ATSUVerticalCharacterType aVerticalCharacterType;
+ err = ATSUGetAttribute( maATSUStyle, kATSUVerticalCharacterTag, sizeof(aVerticalCharacterType), &aVerticalCharacterType, 0 );
+ if (!err && aVerticalCharacterType == kATSUStronglyVertical) {
+ aSysFontData.bVerticalCharacterType = true;
+ } else {
+ aSysFontData.bVerticalCharacterType = false;
+ }
+
+ aSysFontData.bAntialias = !mbNonAntialiasedText;
+
+ return aSysFontData;
+}
+
+// -----------------------------------------------------------------------
+
SystemGraphicsData AquaSalGraphics::GetGraphicsData() const
{
SystemGraphicsData aRes;
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 8cc2aed..eeb8e21 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -53,6 +53,8 @@ class ImplFontEntry;
struct ImplObjStack;
struct ImplKernPairData;
struct SystemGraphicsData;
+struct SystemFontData;
+struct SystemTextLayoutData;
class ImplFontCache;
class ImplDevFontList;
class ImplGetDevFontList;
@@ -883,6 +885,12 @@ public:
void SetFont( const Font& rNewFont );
const Font& GetFont() const { return maFont; }
+
+ SystemFontData GetSysFontData( int nFallbacklevel ) const;
+ SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const XubString& rStr,
+ xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
+ const sal_Int32* pDXAry = NULL ) const;
+
void SetTextColor( const Color& rColor );
const Color& GetTextColor() const { return maTextColor; }
void SetTextFillColor();
diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx
index cbaebab..4f357fa 100644
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -57,6 +57,7 @@ struct FontSubsetInfo;
class OutputDevice;
class ServerFontLayout;
struct SystemGraphicsData;
+struct SystemFontData;
namespace basegfx {
class B2DVector;
@@ -493,6 +494,7 @@ public:
sal_uInt8 nTransparency, const OutputDevice *pOutDev );
virtual SystemGraphicsData GetGraphicsData() const = 0;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const = 0;
};
#endif // _SV_SALGDI_HXX
diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx
index f1ee3fc..7588b00 100644
--- a/vcl/inc/vcl/sysdata.hxx
+++ b/vcl/inc/vcl/sysdata.hxx
@@ -31,10 +31,12 @@
#ifndef _SV_SYSDATA_HXX
#define _SV_SYSDATA_HXX
+#include <vector>
+
#ifdef QUARTZ
// predeclare the native classes to avoid header/include problems
typedef struct CGContext *CGContextRef;
-typedef struct CGLayer *CGLayerRef;
+typedef struct CGLayer *CGLayerRef;
#ifdef __OBJC__
@class NSView;
#else
@@ -141,4 +143,50 @@ struct SystemWindowData
#endif
};
+
+// --------------------
+// - SystemGlyphData -
+// --------------------
+
+struct SystemGlyphData
+{
+ unsigned long index;
+ double x;
+ double y;
+};
+
+
+// --------------------
+// - SystemFontData -
+// --------------------
+
+struct SystemFontData
+{
+ unsigned long nSize; // size in bytes of this structure
+#if defined( WNT )
+ HFONT hFont; // native font object
+#elif defined( QUARTZ )
+ void* aATSUFontID; // native font object
+#elif defined( UNX )
+ void* nFontId; // native font id
+ int nFontFlags; // native font flags
+#endif
+ bool bFakeBold; // Does this font need faking the bold style
+ bool bFakeItalic; // Does this font need faking the italic style
+ bool bAntialias; // Should this font be antialiased
+ bool bVerticalCharacterType; // Is the font using vertical character type
+};
+
+// --------------------
+// - SystemTextLayoutData -
+// --------------------
+
+struct SystemTextLayoutData
+{
+ unsigned long nSize; // size in bytes of this structure
+ std::vector<SystemGlyphData> rGlyphData; // glyph data
+ int orientation; // Text orientation
+ SystemFontData aSysFontData; // Font data for the text layout
+};
+
#endif // _SV_SYSDATA_HXX
diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h
index 20a57de..634d2c9 100644
--- a/vcl/os2/inc/salgdi.h
+++ b/vcl/os2/inc/salgdi.h
@@ -328,6 +328,7 @@ public:
virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
// Init/Deinit Graphics
diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx
index 5524867..c50d7a9 100644
--- a/vcl/os2/source/gdi/salgdi3.cxx
+++ b/vcl/os2/source/gdi/salgdi3.cxx
@@ -1754,3 +1754,21 @@ void Os2SalGraphics::DrawServerFontLayout( const ServerFontLayout& )
//--------------------------------------------------------------------------
+SystemFontData Os2SalGraphics::GetSysFontData( int nFallbacklevel ) const
+{
+ SystemFontData aSysFontData;
+
+ if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
+ if (nFallbacklevel < 0 ) nFallbacklevel = 0;
+
+ aSysFontData.nSize = sizeof( SystemFontData );
+ aSysFontData.hFont = mhFonts[nFallbacklevel];
+ aSysFontData.bFakeBold = false;
+ aSysFontData.bFakeItalic = false;
+ aSysFontData.bAntialias = true;
+ aSysFontData.bVerticalCharacterType = false;
+
+ return aSysFontData;
+}
+
+//--------------------------------------------------------------------------
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 381464b..df63394 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -63,6 +63,7 @@
#include <vcl/outdev.hxx>
#include <vcl/edit.hxx>
#include <vcl/fontcfg.hxx>
+#include <vcl/sysdata.hxx>
#ifndef _OSL_FILE_H
#include <osl/file.h>
#endif
@@ -7700,6 +7701,97 @@ FontMetric OutputDevice::GetFontMetric( const Font& rFont ) const
// -----------------------------------------------------------------------
+/** OutputDevice::GetSysFontData
+ *
+ * @param nFallbacklevel Fallback font level (0 = best matching font)
+ *
+ * Retrieve detailed font information in platform independent structure
+ *
+ * @return SystemFontData
+ **/
+SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
+{
+ SystemFontData aSysFontData;
+ aSysFontData.nSize = sizeof(aSysFontData);
+
+ if (!mpGraphics) ImplGetGraphics();
+ if (mpGraphics) aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel);
+
+ return aSysFontData;
+}
+
+
+// -----------------------------------------------------------------------
+
+/** OutputDevice::GetSysTextLayoutData
+ *
+ * @param rStartPt Start point of the text
+ * @param rStr Text string that will be transformed into layout of glyphs
+ * @param nIndex Position in the string from where layout will be done
+ * @param nLen Length of the string
+ * @param pDXAry Custom layout adjustment data
+ *
+ * Export finalized glyph layout data as platform independent SystemTextLayoutData
+ * (see vcl/inc/vcl/sysdata.hxx)
+ *
+ * Only parameters rStartPt and rStr are mandatory, the rest is optional
+ * (default values will be used)
+ *
+ * @return SystemTextLayoutData
+ **/
+SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, const XubString& rStr, xub_StrLen nIndex, xub_StrLen nLen,
+ const sal_Int32* pDXAry) const
+{
+ DBG_TRACE( "OutputDevice::GetSysTextLayoutData()" );
+ DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
+
+ SystemTextLayoutData aSysLayoutData;
+ aSysLayoutData.nSize = sizeof(aSysLayoutData);
+ aSysLayoutData.rGlyphData.reserve( 256 );
+
+ if ( mpMetaFile ) {
+ if (pDXAry)
+ mpMetaFile->AddAction( new MetaTextArrayAction( rStartPt, rStr, pDXAry, nIndex, nLen ) );
+ else
+ mpMetaFile->AddAction( new MetaTextAction( rStartPt, rStr, nIndex, nLen ) );
+ }
+
+ if ( !IsDeviceOutputNecessary() ) return aSysLayoutData;
+
+ SalLayout* rLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true );
+
+ // setup glyphs
+ Point aPos;
+ sal_GlyphId aGlyphId;
+ int nFallbacklevel = 0;
+ for( int nStart = 0; rLayout->GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); )
+ {
+ // NOTE: Windows backend is producing unicode chars (ucs4), so on windows,
+ // ETO_GLYPH_INDEX is unusable, unless extra glyph conversion is made.
+
+ SystemGlyphData aGlyph;
+ aGlyph.index = static_cast<unsigned long> (aGlyphId & GF_IDXMASK);
+ aGlyph.x = aPos.X();
+ aGlyph.y = aPos.Y();
+ aSysLayoutData.rGlyphData.push_back(aGlyph);
+
+ int nLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
+ if (nLevel > nFallbacklevel && nLevel < MAX_FALLBACK)
+ nFallbacklevel = nLevel;
+ }
+
+ // Get font data
+ aSysLayoutData.aSysFontData = GetSysFontData(nFallbacklevel);
+ aSysLayoutData.orientation = rLayout->GetOrientation();
+
+ rLayout->Release();
+
+ return aSysLayoutData;
+}
+
+// -----------------------------------------------------------------------
+
+
long OutputDevice::GetMinKashida() const
{
DBG_TRACE( "OutputDevice::GetMinKashida()" );
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index fccce00..009e68d 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -45,9 +45,9 @@
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xatom.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <dlfcn.h>
#include <vcl/salbtype.hxx>
diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx
index 41cc7b4..04b2891 100644
--- a/vcl/unx/headless/svpgdi.cxx
+++ b/vcl/unx/headless/svpgdi.cxx
@@ -558,6 +558,22 @@ BOOL SvpSalGraphics::drawEPS( long, long, long, long, void*, ULONG )
return FALSE;
}
+SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
+{
+ SystemFontData aSysFontData;
+
+ if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
+ if (nFallbacklevel < 0 ) nFallbacklevel = 0;
+
+ aSysFontData.nSize = sizeof( SystemFontData );
+ aSysFontData.nFontId = 0;
+ aSysFontData.nFontFlags = 0;
+ aSysFontData.bFakeBold = false;
+ aSysFontData.bFakeItalic = false;
+ aSysFontData.bAntialias = true;
+ return aSysFontData;
+}
+
SystemGraphicsData SvpSalGraphics::GetGraphicsData() const
{
SystemGraphicsData aRes;
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index f10ac54..9cd1a7f 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -169,6 +169,7 @@ public:
virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
#endif
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index 4926e4b..2481368 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -1398,6 +1398,22 @@ bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen
return bRet && m_bSwallowFaxNo;
}
+SystemFontData PspGraphics::GetSysFontData( int nFallbacklevel ) const
+{
+ SystemFontData aSysFontData;
+
+ if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
+ if (nFallbacklevel < 0 ) nFallbacklevel = 0;
+
+ aSysFontData.nSize = sizeof( SystemFontData );
+ aSysFontData.nFontId = 0;
+ aSysFontData.nFontFlags = 0;
+ aSysFontData.bFakeBold = false;
+ aSysFontData.bFakeItalic = false;
+ aSysFontData.bAntialias = true;
+ return aSysFontData;
+}
+
SystemGraphicsData PspGraphics::GetGraphicsData() const
{
SystemGraphicsData aRes;
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index aba67e1..22b4ffa 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -194,7 +194,9 @@ public:
virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
+
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
#endif // _SVP_PSPGRAPHICS_HXX
diff --git a/vcl/unx/inc/Xproto.h b/vcl/unx/inc/Xproto.h
index 8d29b4c..d56c279 100644
--- a/vcl/unx/inc/Xproto.h
+++ b/vcl/unx/inc/Xproto.h
@@ -33,7 +33,7 @@
#include "sal/config.h"
-#include "prex.h"
+#include <tools/prex.h>
#if defined __GNUC__
#pragma GCC system_header
@@ -47,6 +47,6 @@
#pragma enable_warn
#endif
-#include "postx.h"
+#include <tools/postx.h>
#endif
diff --git a/vcl/unx/inc/plugins/gtk/gtkdata.hxx b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
index 29a0ce8..932b322 100644
--- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
@@ -31,11 +31,11 @@
#ifndef _VCL_GTKDATA_HXX
#define _VCL_GTKDATA_HXX
-#include <prex.h>
+#include <tools/prex.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <saldisp.hxx>
#include <saldata.hxx>
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index 8317d42..bd90f91 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -31,12 +31,12 @@
#ifndef _VCL_GTKFRAME_HXX
#define _VCL_GTKFRAME_HXX
-#include <prex.h>
+#include <tools/prex.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <vcl/salframe.hxx>
#include <vcl/sysdata.hxx>
diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
index 8bcf65d..354b9a5 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -31,11 +31,11 @@
#ifndef _VCL_GTKGDI_HXX
#define _VCL_GTKGDI_HXX
-#include <prex.h>
+#include <tools/prex.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salgdi.h>
diff --git a/vcl/unx/inc/postx.h b/vcl/unx/inc/postx.h
deleted file mode 100644
index 79a4696..0000000
--- a/vcl/unx/inc/postx.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: postx.h,v $
- * $Revision: 1.7 $
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _POSTX_H
-#define _POSTX_H
-
-#if defined __cplusplus
-}
-#endif
-
-/* X-Types */
-#undef Window
-#undef BYTE
-#undef INT8
-#undef INT64
-#undef BOOL
-#undef Font
-#undef Cursor
-#undef String
-#undef KeyCode
-#undef Region
-#undef Icon
-#undef Time
-#undef Boolean
-
-#undef Min
-#undef Max
-#undef DestroyAll
-#undef Success
-
-#undef Printer
-/* #undef FontInfo */
-#undef Orientation
-
-#undef GetToken
-#undef ReleaseToken
-#undef InitializeToken
-#undef NextRequest
-
-#ifdef KeyPress
-#if KeyPress != 2
-Error KeyPress must be Equal 2
-#endif
-#undef KeyPress
-#endif
-#define XLIB_KeyPress 2
-
-#endif
-
diff --git a/vcl/unx/inc/prex.h b/vcl/unx/inc/prex.h
deleted file mode 100644
index 4f24fa9..0000000
--- a/vcl/unx/inc/prex.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: prex.h,v $
- * $Revision: 1.17 $
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _PREX_H
-#define _PREX_H
-
-#define Window XLIB_Window
-#define BYTE XLIB_BYTE
-#define INT8 XLIB_INT8
-#define INT64 XLIB_INT64
-#define BOOL XLIB_BOOL
-#define Font XLIB_Font
-#define Cursor XLIB_Cursor
-#define String XLIB_String
-#define KeyCode XLIB_KeyCode
-#define Region XLIB_Region
-#define Icon XLIB_Icon
-#define Time XLIB_Time
-#define Region XLIB_Region
-#define Boolean XLIB_Boolean
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-#if defined(LINUX) || defined(FREEBSD) // should really check for xfree86 or for X11R6.1 and higher
-#define __XKeyboardExtension__ 1
-#else
-#define __XKeyboardExtension__ 0
-#endif
-
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/StringDefs.h>
-#include <X11/extensions/Xrender.h>
-#if __XKeyboardExtension__
-#include <X11/XKBlib.h>
-#endif
-typedef unsigned long Pixel;
-
-#undef DestroyAll
-#define DestroyAll XLIB_DestroyAll
-#define XLIB_DestroyAll 0
-#undef String
-#define String XLIB_String
-
-#undef KeyCode
-#define KeyCode XLIB_KeyCode //undef in intrinsics
-
-#define __Ol_OlXlibExt_h__
-
-#endif
-
diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h
index 88ef0d1..a84106e 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -197,6 +197,7 @@ public:
virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
#endif // _VCL_PSPGRAPHICS_H
diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h
index ee61085..3582a99 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -336,6 +336,7 @@ public:
long nHeight, sal_uInt8 nTransparency );
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
/* use to handle GraphicsExpose/NoExpose after XCopyArea & friends
* if pFrame is not NULL, corresponding Paint events are generated
diff --git a/vcl/unx/inc/svunx.h b/vcl/unx/inc/svunx.h
index d196662..2ccb963 100644
--- a/vcl/unx/inc/svunx.h
+++ b/vcl/unx/inc/svunx.h
@@ -31,8 +31,8 @@
#ifndef _SVUNX_H
#define _SVUNX_H
-#include <prex.h>
-#include <postx.h>
+#include <tools/prex.h>
+#include <tools/postx.h>
#endif
diff --git a/vcl/unx/inc/wmadaptor.hxx b/vcl/unx/inc/wmadaptor.hxx
index 02f13bc..10fec50 100644
--- a/vcl/unx/inc/wmadaptor.hxx
+++ b/vcl/unx/inc/wmadaptor.hxx
@@ -37,9 +37,9 @@
#include <tools/gen.hxx>
#include <vcl/dllapi.h>
#ifndef _PREX_H
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlib.h>
-#include <postx.h>
+#include <tools/postx.h>
#endif
#include <vector>
diff --git a/vcl/unx/inc/xfont.hxx b/vcl/unx/inc/xfont.hxx
index 8bc0994..fbb73b4 100644
--- a/vcl/unx/inc/xfont.hxx
+++ b/vcl/unx/inc/xfont.hxx
@@ -31,9 +31,9 @@
#define EXTENDED_FONTSTRUCT_HXX
#ifndef _XLIB_H_
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlib.h>
-#include <postx.h>
+#include <tools/postx.h>
#endif
#include <tools/ref.hxx>
#include <rtl/tencinfo.h>
diff --git a/vcl/unx/source/app/i18n_cb.cxx b/vcl/unx/source/app/i18n_cb.cxx
index 7cc6166..49d2c85 100644
--- a/vcl/unx/source/app/i18n_cb.cxx
+++ b/vcl/unx/source/app/i18n_cb.cxx
@@ -34,10 +34,10 @@
#include <stdio.h>
#include <string.h>
#include <sal/alloca.h>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlocale.h>
#include <X11/Xlib.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
#include <XIM.h>
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
index a752d07..d4a4f6b 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -34,10 +34,10 @@
#include <stdio.h>
#include <sal/alloca.h>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlocale.h>
#include <X11/Xlib.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
diff --git a/vcl/unx/source/app/i18n_im.cxx b/vcl/unx/source/app/i18n_im.cxx
index 41180e6..43f4d5d 100644
--- a/vcl/unx/source/app/i18n_im.cxx
+++ b/vcl/unx/source/app/i18n_im.cxx
@@ -44,11 +44,11 @@
#include <sal/alloca.h>
#endif
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlocale.h>
#include <X11/Xlib.h>
#include <XIM.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
#include <saldisp.hxx>
diff --git a/vcl/unx/source/app/i18n_status.cxx b/vcl/unx/source/app/i18n_status.cxx
index 828d8ae..ed09d26 100644
--- a/vcl/unx/source/app/i18n_status.cxx
+++ b/vcl/unx/source/app/i18n_status.cxx
@@ -36,10 +36,10 @@
#endif
#include <sal/alloca.h>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlib.h>
#include <XIM.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
index 7dd372d..6221048 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -32,9 +32,9 @@
#include "precompiled_vcl.hxx"
#ifndef SOLARIS
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/XKBlib.h>
-#include <postx.h>
+#include <tools/postx.h>
#endif
#include <saldisp.hxx>
diff --git a/vcl/unx/source/app/randrwrapper.cxx b/vcl/unx/source/app/randrwrapper.cxx
index af030bc..c615899 100644
--- a/vcl/unx/source/app/randrwrapper.cxx
+++ b/vcl/unx/source/app/randrwrapper.cxx
@@ -31,9 +31,9 @@
#ifdef USE_RANDR
-#include "prex.h"
+#include <tools/prex.h>
#include <X11/extensions/Xrandr.h>
-#include "postx.h"
+#include <tools/postx.h>
#include "osl/module.h"
#include "rtl/ustring.hxx"
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 1996fa5..cebc26e 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -52,7 +52,7 @@
#include <osl/module.h>
#endif
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/cursorfont.h>
#include "salcursors.h"
#include "invert50.h"
@@ -81,7 +81,7 @@ Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*);
#endif
#endif
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
#include <sal/types.h>
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx
index 523de5d..644e908 100644
--- a/vcl/unx/source/app/sm.cxx
+++ b/vcl/unx/source/app/sm.cxx
@@ -40,9 +40,9 @@
#include <osl/process.h>
#include <osl/security.h>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xatom.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <sm.hxx>
#include <saldata.hxx>
#include <saldisp.hxx>
diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx
index 253a771..f72c4e3 100644
--- a/vcl/unx/source/app/wmadaptor.cxx
+++ b/vcl/unx/source/app/wmadaptor.cxx
@@ -43,11 +43,11 @@
#include <rtl/locale.h>
#include <osl/process.h>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xresource.h>
-#include <postx.h>
+#include <tools/postx.h>
#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
diff --git a/vcl/unx/source/gdi/gcach_xpeer.hxx b/vcl/unx/source/gdi/gcach_xpeer.hxx
index 05d2f4a..c348811 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.hxx
@@ -33,9 +33,9 @@
#include <vcl/glyphcache.hxx>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/extensions/Xrender.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <vcl/dllapi.h>
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index 2a629ea..9e4a345 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -1504,6 +1504,22 @@ SystemGraphicsData PspGraphics::GetGraphicsData() const
return aRes;
}
+SystemFontData PspGraphics::GetSysFontData( int nFallbacklevel ) const
+{
+ SystemFontData aSysFontData;
+
+ if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
+ if (nFallbacklevel < 0 ) nFallbacklevel = 0;
+
+ aSysFontData.nSize = sizeof( SystemFontData );
+ aSysFontData.nFontId = 0;
+ aSysFontData.nFontFlags = 0;
+ aSysFontData.bFakeBold = false;
+ aSysFontData.bFakeItalic = false;
+ aSysFontData.bAntialias = true;
+ return aSysFontData;
+}
+
bool PspGraphics::supportsOperation( OutDevSupportType ) const
{
return false;
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
index d02da75..d7bf640 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -37,9 +37,9 @@
#ifdef FREEBSD
#include <sys/types.h>
#endif
-#include <prex.h>
+#include <tools/prex.h>
#include "Xproto.h"
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
#include <osl/endian.h>
#include <rtl/memory.h>
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 298d31d..62a77e1 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -50,6 +50,7 @@
#include "pspgraphics.h"
#include "salvd.h"
#include "xfont.hxx"
+#include <vcl/sysdata.hxx>
#include "xlfd_attr.hxx"
#include "xlfd_smpl.hxx"
#include "xlfd_extd.hxx"
@@ -797,7 +798,11 @@ CairoWrapper::CairoWrapper()
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
mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
if( !mpCairoLib )
return;
@@ -1703,6 +1708,31 @@ SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
//--------------------------------------------------------------------------
+SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const
+{
+ SystemFontData aSysFontData;
+ aSysFontData.nSize = sizeof( SystemFontData );
+ aSysFontData.nFontId = 0;
+
+ if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
+ if (nFallbacklevel < 0 ) nFallbacklevel = 0;
+
+ if (mpServerFont[nFallbacklevel] != NULL)
+ {
+ ServerFont* rFont = mpServerFont[nFallbacklevel];
+ aSysFontData.nFontId = rFont->GetFtFace();
+ aSysFontData.nFontFlags = rFont->GetLoadFlags();
+ aSysFontData.bFakeBold = rFont->NeedsArtificialBold();
+ aSysFontData.bFakeItalic = rFont->NeedsArtificialItalic();
+ aSysFontData.bAntialias = rFont->GetAntialiasAdvice();
+ aSysFontData.bVerticalCharacterType = rFont->GetFontSelData().mbVertical;
+ }
+
+ return aSysFontData;
+}
+
+//--------------------------------------------------------------------------
+
BOOL X11SalGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx
index 951f833..051731c 100644
--- a/vcl/unx/source/gdi/salvd.cxx
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -31,9 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/extensions/Xrender.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
#include <saldata.hxx>
diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx
index e390af6..3a29aa6 100644
--- a/vcl/unx/source/gdi/xrender_peer.hxx
+++ b/vcl/unx/source/gdi/xrender_peer.hxx
@@ -31,9 +31,9 @@
#ifndef _SV_XRENDER_PEER_HXX
#define _SV_XRENDER_PEER_HXX
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/extensions/Xrender.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <vcl/salgtype.hxx>
#include <osl/module.h>
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index 12a1959..62a175c 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -37,9 +37,9 @@
#include <rtl/ustrbuf.hxx>
#include <svunx.h>
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xatom.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <vcl/salinst.hxx>
#include <saldata.hxx>
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index db7c060..9c4e624 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -36,7 +36,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "prex.h"
+#include <tools/prex.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
#include "FWS.hxx"
@@ -44,7 +44,7 @@
#ifndef SOLARIS
#include <X11/extensions/dpms.h>
#endif
-#include "postx.h"
+#include <tools/postx.h>
#include "salunx.h"
#include "saldata.hxx"
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
index 2475ef6..6f7ce68 100644
--- a/vcl/unx/source/window/salobj.cxx
+++ b/vcl/unx/source/window/salobj.cxx
@@ -31,10 +31,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <prex.h>
+#include <tools/prex.h>
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>
-#include <postx.h>
+#include <tools/postx.h>
#include <salunx.h>
#include <salstd.hxx>
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
index 313b6df..18cfa2a 100644
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -352,6 +352,7 @@ public:
virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
// Init/Deinit Graphics
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index cc6667b..4316172 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -34,6 +34,10 @@
#include <string.h>
#include <malloc.h>
+#include <tools/prewin.h>
+#include <windows.h>
+#include <tools/postwin.h>
+#include <vcl/sysdata.hxx>
#include "tools/svwin.h"
#include "wincomp.hxx"
@@ -2849,3 +2853,26 @@ void WinSalGraphics::DrawServerFontLayout( const ServerFontLayout& )
{}
//--------------------------------------------------------------------------
+
+SystemFontData WinSalGraphics::GetSysFontData( int nFallbacklevel ) const
+{
+ SystemFontData aSysFontData;
+
+ if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
+ if (nFallbacklevel < 0 ) nFallbacklevel = 0;
+
+ aSysFontData.nSize = sizeof( SystemFontData );
+ aSysFontData.hFont = mhFonts[nFallbacklevel];
+ aSysFontData.bFakeBold = false;
+ aSysFontData.bFakeItalic = false;
+ aSysFontData.bAntialias = true;
+ aSysFontData.bVerticalCharacterType = false;
+
+ OSL_TRACE("\r\n:WinSalGraphics::GetSysFontData(): FontID: %p, Fallback level: %d",
+ aSysFontData.hFont,
+ nFallbacklevel);
+
+ return aSysFontData;
+}
+
+//--------------------------------------------------------------------------
More information about the ooo-build-commit
mailing list