diff options
-rw-r--r-- | canvas/source/cairo/cairo_canvasfont.cxx | 5 | ||||
-rwxr-xr-x | canvas/source/directx/dx_textlayout_drawhelper.cxx | 7 | ||||
-rw-r--r-- | canvas/source/vcl/canvasfont.cxx | 5 | ||||
-rw-r--r-- | cppcanvas/inc/cppcanvas/renderer.hxx | 3 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 10 | ||||
-rw-r--r-- | svl/qa/complex/passwordcontainer/makefile.mk | 134 | ||||
-rw-r--r-- | svtools/qa/unoapi/makefile.mk | 48 | ||||
-rw-r--r-- | toolkit/qa/unoapi/makefile.mk | 48 |
8 files changed, 259 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index e90276f2ba33..5da2e10e7969 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -30,6 +30,8 @@ #include <canvas/debug.hxx> +#include <com/sun/star/rendering/PanoseProportion.hpp> + #include <rtl/math.hxx> #include <basegfx/numeric/ftools.hxx> @@ -83,6 +85,9 @@ namespace cairocanvas // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); maFont->SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + maFont->SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); maFont->SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale)); diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index b246cf5bedeb..7fd29805e2f7 100755 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -39,6 +39,7 @@ #include <boost/scoped_array.hpp> #include <boost/bind.hpp> #include <com/sun/star/rendering/FontRequest.hpp> +#include <com/sun/star/rendering/PanoseProportion.hpp> #include <com/sun/star/rendering/XCanvasFont.hpp> #include <comphelper/sequence.hxx> #include <comphelper/scopeguard.hxx> @@ -132,6 +133,9 @@ namespace dxcanvas aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + aFont.SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); aFont.SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale)); @@ -264,6 +268,9 @@ namespace dxcanvas aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + aFont.SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); // adjust to stretched font if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11)) diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index 4ca0084983db..9f10c788bd24 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -35,6 +35,8 @@ #include <i18npool/mslangid.hxx> #include <vcl/metric.hxx> +#include <com/sun/star/rendering/PanoseProportion.hpp> + #include "canvasfont.hxx" #include "textlayout.hxx" @@ -63,6 +65,9 @@ namespace vclcanvas // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); maFont->SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + maFont->SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); maFont->SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale)); diff --git a/cppcanvas/inc/cppcanvas/renderer.hxx b/cppcanvas/inc/cppcanvas/renderer.hxx index 0b8bb43d7e3e..09852ff9e530 100644 --- a/cppcanvas/inc/cppcanvas/renderer.hxx +++ b/cppcanvas/inc/cppcanvas/renderer.hxx @@ -136,6 +136,9 @@ namespace cppcanvas /// Optionally forces the given font letter form (italics etc.) for all text actions ::boost::optional< sal_Int8 > maFontLetterForm; + /// Optionally forces the given font proportion (condensed, monospaced etc.) for all text actions + ::boost::optional< sal_Int8 > maFontProportion; + /// Optionally forces underlining for all text actions ::boost::optional< bool > maFontUnderline; }; diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index e8a6468611f7..1e0611ab037a 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -43,6 +43,7 @@ #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/geometry/RealPoint2D.hpp> +#include <com/sun/star/rendering/PanoseProportion.hpp> #include <com/sun/star/rendering/ViewState.hpp> #include <com/sun/star/rendering/RenderState.hpp> #include <com/sun/star/rendering/XCanvasFont.hpp> @@ -863,6 +864,12 @@ namespace cppcanvas rParms.mrParms.maFontLetterForm.is_initialized() ? *rParms.mrParms.maFontLetterForm : (rFont.GetItalic() == ITALIC_NONE) ? 0 : 9; + aFontRequest.FontDescription.FontDescription.Proportion = + rParms.mrParms.maFontProportion.is_initialized() ? + *rParms.mrParms.maFontProportion : + (rFont.GetPitch() == PITCH_FIXED) + ? rendering::PanoseProportion::MONO_SPACED + : rendering::PanoseProportion::ANYTHING; LanguageType aLang = rFont.GetLanguage(); aFontRequest.Locale = MsLangId::convertLanguageToLocale(aLang, false); @@ -2980,7 +2987,8 @@ namespace cppcanvas if( rParams.maFontName.is_initialized() || rParams.maFontWeight.is_initialized() || rParams.maFontLetterForm.is_initialized() || - rParams.maFontUnderline.is_initialized() ) + rParams.maFontUnderline.is_initialized() || + rParams.maFontProportion.is_initialized() ) { ::cppcanvas::internal::OutDevState& rState = getState( aStateStack ); diff --git a/svl/qa/complex/passwordcontainer/makefile.mk b/svl/qa/complex/passwordcontainer/makefile.mk new file mode 100644 index 000000000000..625404682761 --- /dev/null +++ b/svl/qa/complex/passwordcontainer/makefile.mk @@ -0,0 +1,134 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ../../.. +PRJNAME = svl +TARGET = qa_complex_passwordcontainer + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = complex/passwordcontainer + +# here store only Files which contain a @Test +JAVATESTFILES = \ + PasswordContainerUnitTest.java + + +# put here all other files +JAVAFILES = $(JAVATESTFILES) \ + PasswordContainerTest.java\ + Test01.java\ + Test02.java\ + Test03.java\ + TestHelper.java\ + MasterPasswdHandler.java + + +JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) + +# Sample how to debug +# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y + +.END + +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk + +ALLTAR : javatest + +.END + + +# +# +# +# +# PRJ = ..$/..$/.. +# TARGET = PasswordContainerUnitTest +# PRJNAME=svl +# PACKAGE = complex$/passwordcontainer +# +# # --- Settings ----------------------------------------------------- +# .INCLUDE: settings.mk +# +# +# #----- compile .java files ----------------------------------------- +# +# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +# +# JAVAFILES =\ +# PasswordContainerUnitTest.java\ +# PasswordContainerTest.java\ +# TestHelper.java\ +# Test01.java\ +# Test02.java\ +# Test03.java\ +# MasterPasswdHandler.java +# +# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) +# +# #----- make a jar from compiled files ------------------------------ +# +# MAXLINELENGTH = 100000 +# +# JARCLASSDIRS = $(PACKAGE) +# JARTARGET = $(TARGET).jar +# JARCOMPRESS = TRUE +# +# # --- Parameters for the test -------------------------------------- +# +# # start an office if the parameter is set for the makefile +# .IF "$(OFFICE)" == "" +# CT_APPEXECCOMMAND = +# .ELSE +# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" +# .ENDIF +# +# # test base is java complex +# CT_TESTBASE = -TestBase java_complex +# +# # test looks something like the.full.package.TestName +# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b) +# +# # start the runner application +# CT_APP = org.openoffice.Runner +# +# # --- Targets ------------------------------------------------------ +# +# .INCLUDE: target.mk +# +# RUN: run +# +# run: +# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST) +# +# diff --git a/svtools/qa/unoapi/makefile.mk b/svtools/qa/unoapi/makefile.mk new file mode 100644 index 000000000000..e3afb77e637a --- /dev/null +++ b/svtools/qa/unoapi/makefile.mk @@ -0,0 +1,48 @@ +#************************************************************************* +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +#***********************************************************************/ + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ../.. +PRJNAME = svtools +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/svtools/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END + +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk + +ALLTAR : javatest + +.END diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/qa/unoapi/makefile.mk new file mode 100644 index 000000000000..9517601c3917 --- /dev/null +++ b/toolkit/qa/unoapi/makefile.mk @@ -0,0 +1,48 @@ +#************************************************************************* +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +#***********************************************************************/ + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ../.. +PRJNAME = toolkit +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/toolkit/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END + +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk + +ALLTAR : javatest + +.END |