[Libreoffice-commits] .: configure.in

2012-04-03 Thread Stephan Bergmann
 configure.in |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 844b4520a9f0879d7b756654cef8fdbaa03a9000
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Apr 3 08:58:05 2012 +0200

--enable-ext-languagetool requires --with-java

diff --git a/configure.in b/configure.in
index 067fa4f..2158d03 100644
--- a/configure.in
+++ b/configure.in
@@ -435,7 +435,7 @@ AC_ARG_ENABLE(ext-hunart,
 
 AC_ARG_ENABLE(ext-languagetool,
 AS_HELP_STRING([--enable-ext-languagetool],
-[Enable the LanguageTool extension.])
+[Enable the LanguageTool extension. Does not work --without-java.])
 )
 
 AC_ARG_ENABLE(ext-mysql-connector,
@@ -9604,6 +9604,9 @@ dnl Test whether to include LanguageTool extension
 dnl ===
 AC_MSG_CHECKING([for LanguageTool extension integration])
 if test x$enable_ext_languagetool = xyes -a 
x$enable_extension_integration != xno; then
+if test -z $SOLAR_JAVA; then
+AC_MSG_ERROR([--enable_ext_languagetool requires --with-java])
+fi
 BUILD_TYPE=$BUILD_TYPE LANGUAGETOOL
 SCPDEFS=$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL
 AC_MSG_RESULT([yes])
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source

2012-04-03 Thread Michael Stahl
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 05fde8006966df49221871fe3489aba8c2ca8e3f
Author: Miklos Vajna vmik...@suse.cz
Date:   Sat Mar 24 17:14:12 2012 +0100

fdo#46955 fix RTF import of all capitals char prop

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index d5d8ee6..ef4d3b8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2770,6 +2770,7 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, 
bool bParam, int nParam
 case RTF_STRIKED: nSprm = NS_sprm::LN_CFDStrike; break;
 case RTF_SCAPS: nSprm = NS_sprm::LN_CFSmallCaps; break;
 case RTF_IMPR: nSprm = NS_sprm::LN_CFImprint; break;
+case RTF_CAPS: nSprm = NS_sprm::LN_CFCaps; break;
 default: break;
 }
 if (nSprm = 0)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - solenv/gbuild

2012-04-03 Thread Michael Stahl
 solenv/gbuild/LinkTarget.mk  |5 +++--
 solenv/gbuild/platform/macosx.mk |   10 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 0683821d07132fb7635174b46d7423ecabc2703e
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 3 12:01:31 2012 +0200

gbuild: ObjC command invocation more consistent

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 8cef9b9..83f395a 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -232,7 +232,7 @@ gb_ObjCObject_get_source = $(1)/$(2).m
 #  gb_ObjCObject__command
 
 $(call gb_ObjCObject_get_target,%) : $(call 
gb_ObjCObject_get_source,$(SRCDIR),%)
-   $(call gb_ObjCObject__command,$@,$*,$)
+   $(call gb_ObjCObject__command,$@,$*,$,$(call 
gb_ObjObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_ObjCObject_get_dep_target,%) : $(call gb_ObjCObject_get_target,%)
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 22a1fa8..e501c2b 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -132,15 +132,15 @@ endef
 define gb_ObjCObject__command
 $(call gb_Output_announce,$(2),$(true),OCC,3)
 $(call gb_Helper_abbreviate_dirs,\
-   mkdir -p $(dir $(1))  \
-   mkdir -p $(dir $(call gb_ObjCObject_get_dep_target,$(2)))  \
+   mkdir -p $(dir $(1)) $(dir $(4))  \
$(gb_CC) \
-   $(DEFS) $(T_OBJCFLAGS) \
+   $(DEFS) \
+   $(T_OBJCFLAGS) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-c $(3) \
-o $(1) \
-   -MMD -MT $(call gb_ObjCObject_get_target,$(2)) \
-   -MP -MF $(call gb_ObjCObject_get_dep_target,$(2)) \
+   -MMD -MT $(1) \
+   -MP -MF $(4) \
-I$(dir $(3)) \
$(INCLUDE_STL) $(INCLUDE))
 endef
commit adaf721ccdac1d08c9fd63d72844bc5bcc1875e6
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 3 11:55:28 2012 +0200

LinkTarget.mk: only call gb_Object__command_dep if dep file doesn't exist

(infinite loop regression from a4e2453b42b54ba904c1ee8ad07e26f1e6d939e5)

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 11eeb02..8cef9b9 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -236,7 +236,8 @@ $(call gb_ObjCObject_get_target,%) : $(call 
gb_ObjCObject_get_source,$(SRCDIR),%
 
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_ObjCObject_get_dep_target,%) : $(call gb_ObjCObject_get_target,%)
-   $(call gb_Object__command_dep,$@,$(call gb_ObjCObject_get_target,$*))
+   $(if $(wildcard $@),touch $@,\
+ $(call gb_Object__command_dep,$@,$(call gb_ObjCObject_get_target,$*)))
 
 endif
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: starmath/inc starmath/source

2012-04-03 Thread Olivier Hallot
 starmath/inc/dialog.hxx|2 +-
 starmath/inc/utility.hxx   |2 +-
 starmath/source/dialog.cxx |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b20dd01623f99e311a8a346e787c6917048379a2
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Mon Apr 2 19:58:58 2012 -0300

Some String - OUString replacements in starmath

Some string to OUString replacements in starmath

diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 23f1297..7cb8521 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -366,7 +366,7 @@ class SmSymbolDialog : public ModalDialog
 SmViewShellrViewSh;
 SmSymbolManagerrSymbolMgr;
 
-String  aSymbolSetName;
+rtl::OUString   aSymbolSetName;
 SymbolPtrVec_t  aSymbolSet;
 
 OutputDevice   *pFontListDev;
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index 58e5961..a80fc5d 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -106,7 +106,7 @@ public:
 Font(), nBorderWidth(-1) { Impl_Init(); }
 SmFace(const Font rFont) :
 Font(rFont), nBorderWidth(-1) { Impl_Init(); }
-SmFace(const String rName, const Size rSize) :
+SmFace(const rtl::OUString rName, const Size rSize) :
 Font(rName, rSize), nBorderWidth(-1) { Impl_Init(); }
 SmFace( FontFamily eFamily, const Size rSize) :
 Font(eFamily, rSize), nBorderWidth(-1) { Impl_Init(); }
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 6679ae7..0437c0c 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1677,7 +1677,7 @@ bool SmSymbolDialog::SelectSymbolSet(const XubString 
rSymbolSetName)
 void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
 {
 const SmSym *pSym = NULL;
-if (aSymbolSetName.Len()  0nSymbolNo  static_cast sal_uInt16 
(aSymbolSet.size()))
+if (!aSymbolSetName.isEmpty()nSymbolNo  static_cast sal_uInt16 
(aSymbolSet.size()))
 pSym = aSymbolSet[ nSymbolNo ];
 
 aSymbolSetDisplay.SelectSymbol(nSymbolNo);
@@ -1689,7 +1689,7 @@ void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
 const SmSym * SmSymbolDialog::GetSymbol() const
 {
 sal_uInt16 nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
-bool bValid = aSymbolSetName.Len()  0nSymbolNo  static_cast 
sal_uInt16 (aSymbolSet.size());
+bool bValid = !aSymbolSetName.isEmpty()nSymbolNo  static_cast 
sal_uInt16 (aSymbolSet.size());
 return bValid ? aSymbolSet[ nSymbolNo ] : NULL;
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - vcl/inc vcl/source

2012-04-03 Thread Lubos Lunak
 vcl/inc/vcl/region.hxx  |   16 +++
 vcl/source/control/edit.cxx |3 -
 vcl/source/gdi/region.cxx   |   90 ++--
 3 files changed, 47 insertions(+), 62 deletions(-)

New commits:
commit 2d691f26c6d4fd6fac11559f9b5b854d306e137a
Author: Daniel Bankston daniel.dev.libreoff...@gmail.com
Date:   Mon Apr 2 19:35:34 2012 -0500

Ignore return type of Region::Intersect

Caller of Region::Intersect was not ignore the return value in a 
conditional, so I refactored the conditional to not depend on the return value 
of Intersect without affect the original functionality of the code.  This usage 
of Intersect may be a possible defect and should be checked out.

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7d03316..b3f7516 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -670,7 +670,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, 
bool bLayout )
 nIndex++;
 }
 i = nIndex;
-if( aClip.Intersect( aRegion )  nAttr )
+   aClip.Intersect(aRegion);
+if( nAttr )
 {
 Font aFont = GetFont();
 if ( nAttr  EXTTEXTINPUT_ATTR_UNDERLINE )
commit 93acb28e10760513b8bffd2c36dcbd68e75e57c7
Author: Daniel Bankston daniel.dev.libreoff...@gmail.com
Date:   Mon Apr 2 19:01:35 2012 -0500

fdo#44610 - EasyHack

Since they always return sal_Bool values that are not used by any callers, 
I changed the Region class methods (both versions of each Union, Intersect, 
Exclude, XOr) from sal_Bool return type to void return type.

diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx
index f21cca4..5d3eccd 100644
--- a/vcl/inc/vcl/region.hxx
+++ b/vcl/inc/vcl/region.hxx
@@ -99,14 +99,14 @@ public:
 
 voidMove( long nHorzMove, long nVertMove );
 voidScale( double fScaleX, double fScaleY );
-sal_BoolUnion( const Rectangle rRegion );
-sal_BoolIntersect( const Rectangle rRegion );
-sal_BoolExclude( const Rectangle rRegion );
-sal_BoolXOr( const Rectangle rRegion );
-sal_BoolUnion( const Region rRegion );
-sal_BoolIntersect( const Region rRegion );
-sal_BoolExclude( const Region rRegion );
-sal_BoolXOr( const Region rRegion );
+voidUnion( const Rectangle rRegion );
+voidIntersect( const Rectangle rRegion );
+voidExclude( const Rectangle rRegion );
+voidXOr( const Rectangle rRegion );
+voidUnion( const Region rRegion );
+voidIntersect( const Region rRegion );
+voidExclude( const Region rRegion );
+voidXOr( const Region rRegion );
 
 RegionType  GetType() const;
 sal_BoolIsEmpty() const { return GetType() == REGION_EMPTY; };
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index fa8ee5c..ee975d0 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1336,13 +1336,13 @@ void Region::Scale( double fScaleX, double fScaleY )
 
 // ---
 
-sal_Bool Region::Union( const Rectangle rRect )
+void Region::Union( const Rectangle rRect )
 {
 DBG_CHKTHIS( Region, ImplDbgTestRegion );
 
 // is rectangle empty? - nothing to do
 if ( rRect.IsEmpty() )
-return sal_True;
+return;
 
 if( HasPolyPolygon() )
 {
@@ -1353,7 +1353,7 @@ sal_Bool Region::Union( const Rectangle rRect )
 if( aThisPolyPoly.count() == 0 )
 {
 *this = rRect;
-return true;
+return;
 }
 
 // get the other B2DPolyPolygon
@@ -1363,7 +1363,7 @@ sal_Bool Region::Union( const Rectangle rRect )
 basegfx::B2DPolyPolygon aClip = 
basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, aOtherPolyPoly );
 *this = Region( aClip );
 
-return sal_True;
+return;
 }
 
 ImplPolyPolyRegionToBandRegion();
@@ -1394,13 +1394,11 @@ sal_Bool Region::Union( const Rectangle rRect )
 delete mpImplRegion;
 mpImplRegion = (ImplRegion*)(aImplEmptyRegion);
 }
-
-return sal_True;
 }
 
 // ---
 
-sal_Bool Region::Intersect( const Rectangle rRect )
+void Region::Intersect( const Rectangle rRect )
 {
 DBG_CHKTHIS( Region, ImplDbgTestRegion );
 
@@ -1416,7 +1414,7 @@ sal_Bool Region::Intersect( const Rectangle rRect )
 delete mpImplRegion;
 }
 mpImplRegion = (ImplRegion*)(aImplEmptyRegion);
-return sal_True;
+return;
 }
 
 // #103137# Avoid banding for special cases
@@ -1434,7 +1432,7 @@ sal_Bool 

[Libreoffice-commits] .: 3 commits - android/experiments solenv/bin

2012-04-03 Thread Tor Lillqvist
 android/experiments/DocumentLoader/Makefile   |8 
 solenv/bin/make_installer.pl  |   14 +++
 solenv/bin/modules/installer/download.pm  |4 +-
 solenv/bin/modules/installer/globals.pm   |4 +-
 solenv/bin/modules/installer/helppack.pm  |2 -
 solenv/bin/modules/installer/languagepack.pm  |2 -
 solenv/bin/modules/installer/packagelist.pm   |8 ++--
 solenv/bin/modules/installer/scriptitems.pm   |8 ++--
 solenv/bin/modules/installer/windows/file.pm  |2 -
 solenv/bin/modules/installer/windows/msiglobal.pm |2 -
 solenv/bin/modules/installer/windows/strip.pm |2 -
 solenv/bin/modules/installer/worker.pm|   42 +++---
 solenv/bin/modules/installer/ziplist.pm   |   18 -
 solenv/bin/modules/par2script/work.pm |2 -
 solenv/bin/par2script.pl  |2 -
 15 files changed, 64 insertions(+), 56 deletions(-)

New commits:
commit 94166f3c95651da395a262112d666ab841e5cb86
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Tue Apr 3 14:35:38 2012 +0300

Need libswlo.so

diff --git a/android/experiments/DocumentLoader/Makefile 
b/android/experiments/DocumentLoader/Makefile
index b4b5a61..bbebd56 100644
--- a/android/experiments/DocumentLoader/Makefile
+++ b/android/experiments/DocumentLoader/Makefile
@@ -98,6 +98,7 @@ copy-stuff:
   svgfilterlo \
   svllo \
   swdlo \
+  swlo \
   t602filterlo \
   textinstream.uno \
   tllo \
commit f82b40c2531c54fb1dbbdc4ca60cfec49d66fb63
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Tue Apr 3 14:35:17 2012 +0300

Add *en-US.res and images_*.zip

diff --git a/android/experiments/DocumentLoader/Makefile 
b/android/experiments/DocumentLoader/Makefile
index 76210a0..b4b5a61 100644
--- a/android/experiments/DocumentLoader/Makefile
+++ b/android/experiments/DocumentLoader/Makefile
@@ -196,6 +196,13 @@ copy-stuff:
echo 'ProductMinor=1'  assets/program/versionrc
echo 'ProductSource=OOO350'  assets/program/versionrc
echo 'ReferenceOOoMajorMinor=3.6'  assets/program/versionrc
+# .res files
+   mkdir -p assets/program/resource
+   cp $(OUTDIR)/bin/*en-US.res assets/program/resource
+# Image Zip archives
+   for I in default tango; do \
+   cp $(OUTDIR)/bin/images_$$I.zip assets/share/config; \
+   done
 # Assets that are unpacked at run-time into the app's data directory.
mkdir -p assets/unpack/etc/fonts
cp fonts.conf assets/unpack/etc/fonts
commit 4e8bc5911164971a9af5377633803ec620f593cc
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Tue Apr 3 08:55:28 2012 +0300

s/pathes/paths/

diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 7d0f56a..21f2077 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -276,13 +276,13 @@ if ( $$includepathref eq  )
 
 my $includepatharrayref = 
installer::converter::convert_stringlist_into_array($includepathref, ,);
 
-installer::ziplist::replace_all_variables_in_pathes($includepatharrayref, 
$pathvariableshashref);
+installer::ziplist::replace_all_variables_in_paths($includepatharrayref, 
$pathvariableshashref);
 
-installer::ziplist::replace_minor_in_pathes($includepatharrayref);
+installer::ziplist::replace_minor_in_paths($includepatharrayref);
 
-installer::ziplist::replace_packagetype_in_pathes($includepatharrayref);
+installer::ziplist::replace_packagetype_in_paths($includepatharrayref);
 
-installer::ziplist::resolve_relative_pathes($includepatharrayref);
+installer::ziplist::resolve_relative_paths($includepatharrayref);
 
 installer::ziplist::remove_ending_separator($includepatharrayref);
 
@@ -291,7 +291,7 @@ 
installer::ziplist::remove_ending_separator($includepatharrayref);
 # paths in global hashes.
 ##
 
-installer::worker::collect_all_files_from_includepathes($includepatharrayref);
+installer::worker::collect_all_files_from_includepaths($includepatharrayref);
 
 ##
 # Analyzing languages in zip.lst if required
@@ -636,9 +636,9 @@ for ( my $n = 0; $n = 
$#installer::globals::languageproducts; $n++ )
 # Resolving include paths (language dependent)
 
 
-$includepatharrayref_lang = 
installer::ziplist::replace_languages_in_pathes($includepatharrayref, 
$languagesarrayref);
+$includepatharrayref_lang = 
installer::ziplist::replace_languages_in_paths($includepatharrayref, 
$languagesarrayref);
 
-if ( $installer::globals::refresh_includepathes ) { 
installer::worker::collect_all_files_from_includepathes($includepatharrayref_lang);
 }
+if ( $installer::globals::refresh_includepaths ) { 

[Libreoffice-commits] .: vcl/source

2012-04-03 Thread Lubos Lunak
 vcl/source/control/edit.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 248edba9de6c25a37f014316a89e38e788a1ac09
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Apr 3 13:51:18 2012 +0200

adjust code for what the original Intersect() usage probably meant

Daniel Bankston is right, the call probably meant to check whether
the intersection is not empty, as an optimization.

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index b3f7516..aaa72bb 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -671,7 +671,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, 
bool bLayout )
 }
 i = nIndex;
aClip.Intersect(aRegion);
-if( nAttr )
+if( !aClip.IsEmpty()  nAttr )
 {
 Font aFont = GetFont();
 if ( nAttr  EXTTEXTINPUT_ATTR_UNDERLINE )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: stoc/README

2012-04-03 Thread Michael Meeks
 stoc/README |   39 +++
 1 file changed, 39 insertions(+)

New commits:
commit 96823006127dbae9dad2833b40c7f9cc7d467ce9
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Apr 3 12:59:26 2012 +0100

stoc: add helpful structural documentation from mailing list post.

diff --git a/stoc/README b/stoc/README
index db0e857..58f0c6f 100644
--- a/stoc/README
+++ b/stoc/README
@@ -1 +1,40 @@
 Registries, reflection, introspection implementation for UNO.
+
+
+The UNO types and services bootstrapping code is very old, and concepts
+are tightly knit together. Whenever you want to change something you risk
+backwards incompatibility.  The code causes mental pain, and whenever
+you need to touch it you want to run away screaming.  One typically ends
+up doing minimally invasive changes.  That way, you have a chance of
+surviving the process.  But you also pile up guilt.
+
+At the heart of the matter there is the old binary store file structure
+and the XRegistry interface on top of it.  At runtime, both all the UNO
+type information (scattered across a number of binary rdb files) and
+all the UNO service information (scattered across a number of rdb files
+that used to be binary but have been mostly changed to XML now) are
+represented by a single XRegistry instance each.
+
+The way the respective information is represented in the XRegistry
+interface simply corresponds to the way the information is stored in the
+binary rdb files.  Those files are designed for storage of hierarchically
+nested small blobs of information.  Hence, for example information about
+a UNO interface type com.sun.star.foo.XBar is stored in a nested folder
+with path com - sun - star - foo - XBar, containing little blobs of
+information about the type's ancestors, its methods, etc.  Similarly
+for information about instantiable services like com.sun.star.baz.Boz.
+
+As there are typically multiple rdb files containing types resp.
+services (URE specific, LO specific, from extensions, ...), but they need
+to be represented by a single XRegistry instance, so nested registries
+were invented.  They effectively form a linear list of chaining XRegistry
+instances together.  Whenever a path needs to be looked up in the top-level
+registry, it effectively searches through the linear list of nested
+registries.  All with the cumbersome UNO XRegistry interface between
+the individual parts.  Horror.
+
+When the XML service rdbs were introduced, we chickened out (see above
+for rationale) and put them behind an XRegistry facade, so that they
+would seamlessly integrate with the existing mess.  We postponed
+systematic clean-up to the pie-in-the-sky days of LO 4 (or, once we'll
+become incompatible with OOo, as the phrase used to be back then)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-04-03 Thread Lubos Lunak
 sal/qa/osl/security/osl_Security.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit c813c009479db3fab58fc48740ab8f80ceb93a26
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Apr 3 14:01:30 2012 +0200

don't skip first cmdline argument

It looks like this one is also meant to be called manually or something,
and the original version didn't skip the first argument either.

diff --git a/sal/qa/osl/security/osl_Security.cxx 
b/sal/qa/osl/security/osl_Security.cxx
index 92b9fe4..1c4f029 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -637,8 +637,7 @@ void MyTestPlugInImpl::initialize( 
CPPUNIT_NS::TestFactoryRegistry *,
 rtl::OUString args[ 3 ];
 int argsCount = 0;
 sal_uInt32 n = rtl_getAppCommandArgCount();
-// skip first, that's the module name
-for (sal_uInt32 i = 1; i  n; ++i)
+for (sal_uInt32 i = 0; i  n; ++i)
 {
 rtl::OUString arg;
 rtl_getAppCommandArg(i, arg.pData);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'feature/cmclayout' - vcl/inc vcl/source

2012-04-03 Thread Caolán McNamara
 vcl/inc/vcl/fixed.hxx|2 --
 vcl/source/control/fixed.cxx |8 
 vcl/source/uipreviewer/previewer.cxx |   30 ++
 vcl/source/window/builder.cxx|5 +
 vcl/source/window/window.cxx |1 +
 5 files changed, 28 insertions(+), 18 deletions(-)

New commits:
commit e72276e03511add1abffa9d99c884c08fa40b393
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 3 13:08:53 2012 +0100

Implement visible from builder. Fix queueResize.

The natural place to call queueResize is from Window::StateChanged
= instant-beautiful ui-previewer demo. ship it.

diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index 32e116b..a894905 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -74,8 +74,6 @@ public:
 static Size CalcMinimumTextSize( Control const* pControl, long 
nMaxWidth = 0 );
 SizeCalcMinimumSize( long nMaxWidth = 0 ) const;
 virtual SizeGetOptimalSize(WindowSizeType eType) const;
-
-virtual voidSetText( const XubString rStr );
 };
 
 // -
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 0268295..0606073 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -429,14 +429,6 @@ void  FixedText::FillLayoutData() const
 ImplDraw( const_castFixedText*(this), 0, Point(), GetOutputSizePixel(), 
true );
 }
 
-
-void FixedText::SetText( const XubString rStr )
-{
-Window::SetText(rStr);
-//Text changed, tell possibly existing layout that size requisition has 
changed
-queueResize();
-}
-
 // ===
 
 void FixedLine::ImplInit( Window* pParent, WinBits nStyle )
diff --git a/vcl/source/uipreviewer/previewer.cxx 
b/vcl/source/uipreviewer/previewer.cxx
index 9f3bdb2..7a27729 100644
--- a/vcl/source/uipreviewer/previewer.cxx
+++ b/vcl/source/uipreviewer/previewer.cxx
@@ -31,6 +31,7 @@
 #include com/sun/star/lang/XMultiServiceFactory.hpp
 #include comphelper/processfactory.hxx
 #include cppuhelper/bootstrap.hxx
+#include osl/file.hxx
 #include ucbhelper/configurationkeys.hxx
 #include ucbhelper/contentbroker.hxx
 #include vcl/builder.hxx
@@ -49,7 +50,11 @@ int UIPreviewApp::Main()
 {
 std::vectorrtl::OUString uifiles;
 for (sal_uInt16 i = 0; i  GetCommandLineParamCount(); ++i)
-uifiles.push_back(GetCommandLineParam(i));
+{
+rtl::OUString aFileUrl;
+osl::File::getFileURLFromSystemPath(GetCommandLineParam(i), aFileUrl);
+uifiles.push_back(aFileUrl);
+}
 
 if (uifiles.empty())
 {
@@ -71,17 +76,26 @@ int UIPreviewApp::Main()
 aArgs[ 1 ] = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE));
 ::ucbhelper::ContentBroker::initialize(xSFactory, aArgs);
 
-VclBuilder aBuilder(NULL, uifiles[0]);
-Window *pWindow = aBuilder.get_widget_root();
-Dialog *pDialog = dynamic_castDialog*(pWindow);
-if (pDialog)
+try
 {
-pDialog-Execute();
+VclBuilder aBuilder(NULL, uifiles[0]);
+Window *pWindow = aBuilder.get_widget_root();
+Dialog *pDialog = dynamic_castDialog*(pWindow);
+if (pDialog)
+{
+pDialog-Execute();
+}
+else
+{
+fprintf(stderr, to-do: no toplevel dialog, make one\n);
+}
 }
-else
+catch (const uno::Exception e)
 {
-fprintf(stderr, to-do: no toplevel dialog, make one\n);
+fprintf(stderr, fatal error: \n, rtl::OUStringToOString(e.Message, 
osl_getThreadTextEncoding()).getStr());
 }
+return false;
+
 
 ::ucbhelper::ContentBroker::deinitialize();
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ac89bfd..71f9e04 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -142,6 +142,11 @@ Window *VclBuilder::insertObject(Window *pParent, const 
rtl::OString rClass, st
 const rtl::OString rValue = aI-second;
 if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(label)))
 pCurrentChild-SetText(rtl::OStringToOUString(rValue, 
RTL_TEXTENCODING_UTF8));
+else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(visible)))
+{
+bool bIsVisible = (rValue[0] == 't' || rValue[0] == 'T' || 
rValue[0] == '1');
+pCurrentChild-Show(bIsVisible);
+}
 else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(xalign)))
 {
 WinBits nBits = pCurrentChild-GetStyle();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bf251be..dfb839f 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4927,6 +4927,7 @@ void Window::UserEvent( sal_uLong, void* )
 
 void Window::StateChanged( StateChangedType )
 {
+queueResize();
 DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 }
 

[Libreoffice-commits] .: sw/source

2012-04-03 Thread Michael Stahl
 sw/source/core/txtnode/fntcache.cxx |  155 ++--
 1 file changed, 78 insertions(+), 77 deletions(-)

New commits:
commit c39cb68bec7eb5048c3a5feb669cc9e60a8a4371
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 3 14:25:24 2012 +0200

fntcache.cxx: translate comments

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index 4ddeb3d..bf15370 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -37,8 +37,8 @@
 #include com/sun/star/i18n/CharacterIteratorMode.hdl
 #include com/sun/star/i18n/WordType.hdl
 #include breakit.hxx
-#include viewsh.hxx   // Bildschirmabgleich
-#include viewopt.hxx  // Bildschirmabgleich abschalten, ViewOption
+#include viewsh.hxx
+#include viewopt.hxx
 #include fntcache.hxx
 #include IDocumentSettingAccess.hxx
 #include swfont.hxx   // CH_BLANK + CH_BULLET
@@ -61,12 +61,12 @@
 
 using namespace ::com::sun::star;
 
-// globale Variablen, werden in FntCache.Hxx bekanntgegeben
-// Der FontCache wird in TxtInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht
+// global variables declared in fntcache.hxx
+// FontCache is created in txtinit.cxx _TextInit and deleted in _TextFinit
 SwFntCache *pFntCache = NULL;
-// Letzter Font, der durch ChgFntCache eingestellt wurde.
+// last Font set by ChgFntCache
 SwFntObj *pLastFont = NULL;
-// Die MagicNumber, die den Fonts zur Identifizierung verpasst wird
+// MagicNumber used to identify Fonts
 sal_uInt8* pMagicNo = NULL;
 
 Color *pWaveCol = 0;
@@ -285,9 +285,8 @@ void lcl_calcLinePos( const CalcLinePosData rData,
  *
  *  sal_uInt16 SwFntObj::GetFontAscent( const OutputDevice rOut )
  *
- *  Beschreibung: liefern den Ascent des Fonts auf dem
- *  gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst
- *  erzeugt werden.
+ * Returns the Ascent of the Font on the given output device;
+ * it may be necessary to create the screen font first.
  */
 
 sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice 
rOut )
@@ -303,7 +302,7 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, 
const OutputDevice rO
 }
 else
 {
-if ( nPrtAscent == USHRT_MAX ) // DruckerAscent noch nicht bekannt?
+if (nPrtAscent == USHRT_MAX) // printer ascent unknown?
 {
 CreatePrtFont( rOut );
 const Font aOldFnt( rRefDev.GetFont() );
@@ -329,9 +328,8 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, 
const OutputDevice rO
  *
  *  sal_uInt16 SwFntObj::GetFontHeight( const OutputDevice* pOut )
  *
- *  Beschreibung: liefern die H?he des Fonts auf dem
- *  gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst
- *  erzeugt werden.
+ * Returns the height of the Font on the given output device;
+ * it may be necessary to create the screen font first.
  */
 
 sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice 
rOut )
@@ -347,7 +345,7 @@ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, 
const OutputDevice rO
 }
 else
 {
-if ( nPrtHeight == USHRT_MAX ) // PrinterHeight noch nicht bekannt?
+if (nPrtHeight == USHRT_MAX) // printer height unknown?
 {
 CreatePrtFont( rOut );
 const Font aOldFnt( rRefDev.GetFont() );
@@ -483,12 +481,11 @@ void SwFntObj::CreateScrFont( const ViewShell rSh, const 
OutputDevice rOut )
 pScrFont = pPrtFont;
 }
 
-// Zoomfaktor ueberpruefen, z.B. wg. PrtOle2 beim Speichern
+// check zoom factor, e.g. because of PrtOle2 during export
 {
-// Sollte der Zoomfaktor des OutputDevices nicht mit dem der View-
-// Options uebereinstimmen, so darf dieser Font nicht gecacht
-// werden, deshalb wird der Zoomfaktor auf einen ungueltigen Wert
-// gesetzt.
+// In case the zoom factor of the output device differs from the
+// one in the ViewOptions, this Font must not be cached,
+// hence set zoom factor to an invalid value
 long nTmp;
 if( pOut-GetMapMode().GetScaleX().IsValid() 
 pOut-GetMapMode().GetScaleY().IsValid() 
@@ -541,10 +538,9 @@ void SwFntObj::GuessLeading( const ViewShell
 const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() );
 if( pPrtFont-GetName().Search( aWinMet.GetName() )  USHRT_MAX )
 {
-// Wenn das Leading auf dem Window auch 0 ist, dann
-// muss es auch so bleiben (vgl. StarMath!).
+// If the Leading on the Window is also 0, then it has to stay
+// that way (see also StarMath).
 long nTmpLeading = (long)aWinMet.GetIntLeading();
- // einen Versuch haben wir noch wg. 31003:
 if( nTmpLeading = 0 )
 {
 

[Libreoffice-commits] .: solenv/gbuild

2012-04-03 Thread Michael Stahl
 solenv/gbuild/LinkTarget.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 72e7082f158d5d4216ea94a7617cdc39fc3a7e4b
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 3 14:46:15 2012 +0200

LinkTarget.mk: fix stupid typo in 0683821d

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 83f395a..a217086 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -232,7 +232,7 @@ gb_ObjCObject_get_source = $(1)/$(2).m
 #  gb_ObjCObject__command
 
 $(call gb_ObjCObject_get_target,%) : $(call 
gb_ObjCObject_get_source,$(SRCDIR),%)
-   $(call gb_ObjCObject__command,$@,$*,$,$(call 
gb_ObjObject_get_dep_target,$*))
+   $(call gb_ObjCObject__command,$@,$*,$,$(call 
gb_ObjCObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_ObjCObject_get_dep_target,%) : $(call gb_ObjCObject_get_target,%)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sd/source

2012-04-03 Thread Jan Holesovsky
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx|   21 +---
 sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx |   14 -
 sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx   |   21 +++-
 sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx   |4 -
 sd/source/ui/view/ToolBarManager.cxx |   46 ---
 sd/source/ui/view/ViewShellManager.cxx   |   44 +++---
 6 files changed, 45 insertions(+), 105 deletions(-)

New commits:
commit 58d5e3032274b5a15ccc0bf2c9788cd18a5a63d4
Author: Rob Snelders programm...@ertai.nl
Date:   Tue Apr 3 00:04:00 2012 +0200

SlsRequestQueue updated

diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx 
b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index 966c5d2..a79ddaf 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -31,10 +31,6 @@
 
 #include set
 
-
-#undef VERBOSE
-//#define VERBOSE
-
 namespace sd { namespace slidesorter { namespace cache {
 
 /** This class extends the actual request data with additional information
@@ -118,7 +114,7 @@ void RequestQueue::AddRequest (
 
 // If the request is already a member of the queue then remove it so
 // that the following insertion will use the new prioritization.
-#ifdef VERBOSE
+#if OSL_DEBUG_LEVEL =2
 bool bRemoved =
 #endif
 RemoveRequest(aKey);
@@ -130,13 +126,12 @@ void RequestQueue::AddRequest (
 Request aRequest (aKey, nPriority, eRequestClass);
 mpRequestQueue-insert(aRequest);
 
-SSCD_SET_REQUEST_CLASS(rRequestData.GetPage(),eRequestClass);
+SSCD_SET_REQUEST_CLASS(aKey,eRequestClass);
 
-#ifdef VERBOSE
-OSL_TRACE(%s request for page %d with priority class %d,
-bRemoved?replaced:added,
-(rRequestData.GetPage()-GetPageNum()-1)/2,
-eRequestClass);
+#if OSL_DEBUG_LEVEL =2
+SAL_INFO(sd.sls, OSL_THIS_FUNC  :   (bRemoved?replaced:added)
+  request for page   ((aKey-GetPageNum()-1)/2)
+  with priority class   static_castint(eRequestClass));
 #endif
 }
 
@@ -166,7 +161,7 @@ bool RequestQueue::RemoveRequest (
 
 if (bRequestWasRemoved)
 {
-SSCD_SET_STATUS(rRequest.GetPage(),NONE);
+SSCD_SET_STATUS(aKey,NONE);
 }
 }
 else
@@ -195,7 +190,7 @@ void RequestQueue::ChangeClass (
 if (iRequest!=mpRequestQueue-end()  iRequest-meClass!=eNewRequestClass)
 {
 AddRequest(aKey, eNewRequestClass, true);
-SSCD_SET_REQUEST_CLASS(rRequestData.GetPage(),eNewRequestClass);
+SSCD_SET_REQUEST_CLASS(aKey,eNewRequestClass);
 }
 }
 
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx 
b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
index e59f7e3..9fe0dda 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
@@ -52,7 +52,7 @@ public:
 /** Insert a request with highest or lowest priority in its priority
 class.  When the request is already present then it is first
 removed.  This effect is then a re-prioritization.
-@param rRequestData
+@param aKey
 The request.
 @param eRequestClass
 The priority class in which to insert the request with highest
@@ -68,7 +68,7 @@ public:
 bool bInsertWithHighestPriority = false);
 
 /** Remove the specified request from the queue.
-@param rRequestData
+@param aKey
 It is OK when the specified request is not a member of the
 queue.
 @return
commit 5ff6bf59c90cf3a55acffcb64e63f1da6dd5dec2
Author: Rob Snelders programm...@ertai.nl
Date:   Mon Apr 2 22:54:08 2012 +0200

Removal of VERBOSE define

diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx 
b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index f369079..d556c5c 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -35,11 +35,6 @@
 #include sdpage.hxx
 #include drawdoc.hxx
 
-// Uncomment the following define for some more OSL_TRACE messages.
-#ifdef DEBUG
-//#define VERBOSE
-#endif
-
 // Define the default value for the maximal cache size that is used for
 // previews that are currently not visible.  The visible previews are all
 // held in memory at all times.  This default is used only when the
@@ -421,9 +416,7 @@ void BitmapCache::ReCalculateTotalCacheSize (void)
 }
 mbIsFull = (mnNormalCacheSize  = mnMaximalNormalCacheSize);
 
-#ifdef VERBOSE
-OSL_TRACE(cache size is %d/%d, mnNormalCacheSize, mnPreciousCacheSize);
-#endif
+SAL_INFO(sd.sls, OSL_THIS_FUNC  : cache size is   
mnNormalCacheSize  /  mnPreciousCacheSize);
 }
 
 
@@ -527,9 +520,7 @@ void BitmapCache::UpdateCacheSize (const CacheEntry 
rEntry, CacheOperation eOpe
 if ( ! rEntry.IsPrecious()  

[Libreoffice-commits] .: 3 commits - sw/qa writerfilter/source

2012-04-03 Thread Miklos Vajna
 sw/qa/extras/rtftok/data/fdo47107.rtf  |   21 
 sw/qa/extras/rtftok/rtftok.cxx |   14 ++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |  122 +
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |5 -
 4 files changed, 161 insertions(+), 1 deletion(-)

New commits:
commit 63b78e6db15a76b9e928cb4a7d0d995bd12f9bf4
Author: Miklos Vajna vmik...@suse.cz
Date:   Tue Apr 3 15:07:06 2012 +0200

testcase for fdo#47107

diff --git a/sw/qa/extras/rtftok/data/fdo47107.rtf 
b/sw/qa/extras/rtftok/data/fdo47107.rtf
new file mode 100644
index 000..74371cd
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/fdo47107.rtf
@@ -0,0 +1,21 @@
+{\rtf1
+{\fonttbl
+{\f1 Symbol;}
+}
+\pard \fi-283\li283
+{\*\pn \pnlvlbody\pndec\pnstart1
+{\pntxta .}
+}
+{Alpha
+\par 
+Beta
+\par }
+\pard \fi-283\li283
+{\*\pn \pnlvlblt\pnf1\pnstart1
+{\pntxtb \'b7}
+}
+{Alpha
+\par 
+Beta
+\par }
+}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index ac7a2e4..45eabbf 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -76,6 +76,7 @@ public:
 void testFdo46955();
 void testFdo45394();
 void testFdo48104();
+void testFdo47107();
 
 CPPUNIT_TEST_SUITE(RtfModelTest);
 #if !defined(MACOSX)  !defined(WNT)
@@ -95,6 +96,7 @@ public:
 CPPUNIT_TEST(testFdo46955);
 CPPUNIT_TEST(testFdo45394);
 CPPUNIT_TEST(testFdo48104);
+CPPUNIT_TEST(testFdo47107);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -486,6 +488,18 @@ void RtfModelTest::testFdo48104()
 CPPUNIT_ASSERT_EQUAL(2, getPages());
 }
 
+void RtfModelTest::testFdo47107()
+{
+load(fdo47107.rtf);
+
+uno::Referencestyle::XStyleFamiliesSupplier 
xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Referencecontainer::XNameAccess 
xStyles(xStyleFamiliesSupplier-getStyleFamilies(), uno::UNO_QUERY);
+uno::Referencecontainer::XNameAccess 
xNumberingStyles(xStyles-getByName(OUString(RTL_CONSTASCII_USTRINGPARAM(NumberingStyles))),
 uno::UNO_QUERY);
+// Make sure numbered and bullet legacy syntax is recognized, this used to 
throw a NoSuchElementException
+xNumberingStyles-getByName(WWNum1);
+xNumberingStyles-getByName(WWNum2);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit ea04bbd697ad984cc4e39ed42994a072f052ba36
Author: Miklos Vajna vmik...@suse.cz
Date:   Tue Apr 3 11:53:59 2012 +0200

fdo#47107 rtftok: support bullet points in paragraph numberings

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 51f7b5e..5ceeaeb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -893,6 +893,7 @@ void RTFDocumentImpl::text(OUString rString)
 case DESTINATION_ANNOTATIONAUTHOR:
 case DESTINATION_FALT:
 case DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER:
+case DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE:
 m_aStates.top().aDestinationText.append(rString);
 break;
 case DESTINATION_EQINSTRUCTION:
@@ -1321,6 +1322,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
 case RTF_PNTXTA:
 m_aStates.top().nDestinationState = 
DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER;
 break;
+case RTF_PNTXTB:
+m_aStates.top().nDestinationState = 
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE;
+break;
 default:
 SAL_INFO(writerfilter, OSL_THIS_FUNC  : TODO handle 
destination '  lcl_RtfToString(nKeyword)  ');
 // Make sure we skip destinations (even without \*) till we don't 
handle them
@@ -2083,6 +2087,12 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
 
m_aStates.top().aTableSprms-push_back(make_pair(NS_rtf::LN_NFC, pValue));
 }
 break;
+case RTF_PNLVLBLT:
+{
+
m_aStates.top().aTableAttributes-push_back(make_pair(NS_rtf::LN_LSID, 
RTFValue::Pointer_t(new RTFValue(1;
+
m_aStates.top().aTableSprms-push_back(make_pair(NS_rtf::LN_NFC, 
RTFValue::Pointer_t(new RTFValue(23; // bullets, same as \levelnfc23
+}
+break;
 default:
 SAL_INFO(writerfilter, OSL_THIS_FUNC  : TODO handle flag ' 
 lcl_RtfToString(nKeyword)  ');
 aSkip.setParsed(false);
@@ -2735,6 +2745,13 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 case RTF_PNSTART:
 
m_aStates.top().aTableSprms-push_back(make_pair(NS_rtf::LN_ISTARTAT, 
pIntValue));
 break;
+case RTF_PNF:
+{
+int nFontIndex = getFontIndex(nParam);
+RTFValue::Pointer_t pValue(new RTFValue(nFontIndex));
+lcl_putNestedSprm(m_aStates.top().aTableSprms, 
NS_ooxml::LN_CT_Lvl_rPr, NS_sprm::LN_CRgFtc0, 

[Libreoffice-commits] .: filter/source

2012-04-03 Thread Fridrich Strba
 filter/source/svg/parserfragments.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 333cb00a6399bcafa0248a64922757da4a7d
Author: Christina Rossmanith chrrossman...@web.de
Date:   Sun Apr 1 21:14:10 2012 +0200

SVG: treat skewX and skewY correct

diff --git a/filter/source/svg/parserfragments.cxx 
b/filter/source/svg/parserfragments.cxx
index d70eaad..3de3d4b 100644
--- a/filter/source/svg/parserfragments.cxx
+++ b/filter/source/svg/parserfragments.cxx
@@ -93,16 +93,16 @@ void calcRotation(std::vectorgeometry::AffineMatrix2D 
rTransforms,
 void calcSkewX(std::vectorgeometry::AffineMatrix2D rTransforms,
double fSkewAngle)
 {
-geometry::AffineMatrix2D aMat(1.0,0.0,0.0,
-  tan(fSkewAngle*M_PI/180),1.0,0.0);
+geometry::AffineMatrix2D aMat(1.0,tan(fSkewAngle*M_PI/180),0.0,
+  0.0,1.0,0.0);
 rTransforms.push_back(aMat);
 }
 
 void calcSkewY(std::vectorgeometry::AffineMatrix2D rTransforms,
double fSkewAngle)
 {
-geometry::AffineMatrix2D aMat(1.0,tan(fSkewAngle*M_PI/180),0.0,
-  0.0,1.0,0.0);
+geometry::AffineMatrix2D aMat(1.0,0.0,0.0,
+  tan(fSkewAngle*M_PI/180),1.0,0.0);
 rTransforms.push_back(aMat);
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - configure.in i18npool/source set_soenv.in

2012-04-03 Thread Eike Rathke
 configure.in   |6 ++
 i18npool/source/breakiterator/Makefile |8 +++-
 set_soenv.in   |1 +
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit ba3550bc82b8fb697b905c9913e399e1835b7cc0
Author: Eike Rathke er...@redhat.com
Date:   Tue Apr 3 16:15:48 2012 +0200

as of ICU 4.9 RBBI the Prepend property is empty

Backport of 43084e8b30c101a44510b7a8267d5c2b316a17bb
* config_host.mk doesn't exist, instead changes to set_soenv.in
* i18npool/CustomTarget_breakiterator.mk doesn't exist, instead same changes
  to i18npool/source/breakiterator/Makefile
* char.txt and char_in.txt unchanged

Signed-off-by: Tomáš Chvátal tomas.chva...@gmail.com

diff --git a/configure.in b/configure.in
index ea959e6..8e45756 100644
--- a/configure.in
+++ b/configure.in
@@ -6162,6 +6162,7 @@ ICU_MAJOR=
 ICU_MINOR=
 ICU_MICRO=
 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY=
 AC_MSG_CHECKING([which icu to use])
 if test $with_system_icu = yes; then
 AC_MSG_RESULT([external])
@@ -6207,6 +6208,9 @@ if test $with_system_icu = yes; then
 if test $ICU_MAJOR -ge 5 -o $ICU_MAJOR = 4 -a $ICU_MINOR -ge 
4; then
 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=YES
 fi
+if test $ICU_MAJOR -ge 5 -o $ICU_MAJOR = 4 -a $ICU_MINOR -ge 
9; then
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY=YES
+fi
 fi
 
 MINGW_EXTERNAL_DLLS=$MINGW_EXTERNAL_DLLS icui18n$ICU_MAJOR$ICU_MINOR.dll 
icuuc$ICU_MAJOR$ICU_MINOR.dll icudata$ICU_MAJOR$ICU_MINOR.dll
@@ -6214,6 +6218,7 @@ else
 AC_MSG_RESULT([internal])
 SYSTEM_ICU=NO
 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=YES
+# ICU_RECLASSIFIED_PREPEND_SET_EMPTY not applied for our internal ICU 4.4.2
 BUILD_TYPE=$BUILD_TYPE ICU
 fi
 AC_SUBST(SYSTEM_ICU)
@@ -6224,6 +6229,7 @@ AC_SUBST(ICU_MAJOR)
 AC_SUBST(ICU_MINOR)
 AC_SUBST(ICU_MICRO)
 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
+AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
 
 dnl ===
 dnl Graphite
diff --git a/i18npool/source/breakiterator/Makefile 
b/i18npool/source/breakiterator/Makefile
index b34217a..6aed8b2 100644
--- a/i18npool/source/breakiterator/Makefile
+++ b/i18npool/source/breakiterator/Makefile
@@ -83,10 +83,16 @@ OpenOffice_dat.c : $(subst .brk,_brk.c,$(BRKFILES))
 %.brk : %.txt.p
$(GENBRK) -r $ -o $@
 
-# fdo#31271 ) reclassified in more recent ICU/Unicode Standards
+# fdo#31271 ) reclassified in more recent Unicode Standards / ICU 4.4
+# Prepend set empty as of Unicode Version 6.1 / ICU 4.9, which bails out if 
used.
+# NOTE: strips every line with _word_ 'Prepend', including $Prepend
 %.txt.p : $(realpath $(SRC_ROOT)/i18npool/source/breakiterator/data)/%.txt
 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
+ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
+   sed s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#;/\Prepend\/d $ 
 $@
+else
sed s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]# $  $@
+endif
 else
cp $ $@
 endif
diff --git a/set_soenv.in b/set_soenv.in
index 3dc9cfa..a8561cd 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1881,6 +1881,7 @@ ToFile( ICU_MAJOR, @ICU_MAJOR@,e );
 ToFile( ICU_MINOR, @ICU_MINOR@,e );
 ToFile( ICU_MICRO, @ICU_MICRO@,e );
 ToFile( ICU_RECLASSIFIED_CLOSE_PARENTHESIS, 
@ICU_RECLASSIFIED_CLOSE_PARENTHESIS@, e );
+ToFile( ICU_RECLASSIFIED_PREPEND_SET_EMPTY, 
@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@, e );
 ToFile( SYSTEM_GENBRK, @SYSTEM_GENBRK@,e );
 ToFile( SYSTEM_GENCCODE,   @SYSTEM_GENCCODE@,  e );
 ToFile( SYSTEM_GENCMN, @SYSTEM_GENCMN@,e );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/inc

2012-04-03 Thread Tor Lillqvist
 sal/inc/sal/types.h |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit 61c5883f4cb35cbb1016b9abcf0718ca4d967f3d
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Apr 3 18:22:42 2012 +0300

Simplify SAL_CONST_CAST and SAL_STATIC_CAST defns, mention they are obsolete

diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 52b008f..8d0bb7e 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -351,22 +351,12 @@ typedef struct _sal_Sequence
 #endif
 
 
-/** Wrap C++ const_cast, reinterpret_cast and static_cast expressions in
-macros to keep code portable to old compilers (since most compilers still
-lack RTTI support, dynamic_cast is not included here).
+/* Historical macros, no need to use, old use cases should be replaced
+ * by their expansions.
  */
 #ifdef __cplusplus
-#if defined SAL_W32 || defined SOLARIS || defined LINUX || defined MACOSX || \
-defined FREEBSD || defined NETBSD || defined AIX || \
-defined OPENBSD || defined DRAGONFLY
 #define SAL_CONST_CAST(type, expr) (const_cast type (expr))
-#define SAL_REINTERPRET_CAST(type, expr) (reinterpret_cast type (expr))
 #define SAL_STATIC_CAST(type, expr) (static_cast type (expr))
-#else /* SAL_W32, SOLARIS, LINUX */
-#define SAL_CONST_CAST(type, expr) ((type) (expr))
-#define SAL_REINTERPRET_CAST(type, expr) ((type) (expr))
-#define SAL_STATIC_CAST(type, expr) ((type) (expr))
-#endif /* SAL_W32, SOLARIS, LINUX */
 #endif /* __cplusplus */
 
 /** Definition of function throw clause macros.  These have been introduced
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: migrationanalysis/README migrationanalysis/Read Me.odt migrationanalysis/Read_Me.odt

2012-04-03 Thread Eike Rathke
 dev/null  |binary
 migrationanalysis/README  |2 +-
 migrationanalysis/Read_Me.odt |binary
 3 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d5191a390553c4701288d4fffc026d5748ab144
Author: Eike Rathke er...@redhat.com
Date:   Tue Apr 3 17:32:30 2012 +0200

get rid of the annoying space in Read Me.odt file name

diff --git a/migrationanalysis/README b/migrationanalysis/README
index 9ba149b..32fdaf2 100644
--- a/migrationanalysis/README
+++ b/migrationanalysis/README
@@ -1,3 +1,3 @@
 Wizard to analyze potential problems when migrating from MSOffice to 
LibreOffice.
 
-See also Read Me.odt in this module directory.
+See also Read_Me.odt in this module directory.
diff --git a/migrationanalysis/Read Me.odt b/migrationanalysis/Read Me.odt
deleted file mode 100644
index 02c8db4..000
Binary files a/migrationanalysis/Read Me.odt and /dev/null differ
diff --git a/migrationanalysis/Read_Me.odt b/migrationanalysis/Read_Me.odt
new file mode 100644
index 000..02c8db4
Binary files /dev/null and b/migrationanalysis/Read_Me.odt differ
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-04-03 Thread Kohei Yoshida
 editeng/source/editeng/editdbg.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2c4e811049e9f2cad823e372a01a5afc09ead25c
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Apr 3 11:44:06 2012 -0400

Fix the dbgutil build.

diff --git a/editeng/source/editeng/editdbg.cxx 
b/editeng/source/editeng/editdbg.cxx
index 48f6e00..9142ec1 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -384,7 +384,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool 
bInfoBox )
 sal_uLong n = 0;
 for ( z = 0; z  nTextPortions; z++ )
 {
-TextPortion* pPortion = pPPortion-GetTextPortions().GetObject( z 
);
+TextPortion* pPortion = pPPortion-GetTextPortions()[z];
 aPortionStr.append(' ');
 aPortionStr.append(static_castsal_Int32(pPortion-GetLen()));
 aPortionStr.append('(');
@@ -409,7 +409,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool 
bInfoBox )
 sal_uInt16 nLine;
 for ( nLine = 0; nLine  pPPortion-GetLines().Count(); nLine++ )
 {
-EditLine* pLine = pPPortion-GetLines().GetObject( nLine );
+EditLine* pLine = pPPortion-GetLines()[nLine];
 
 rtl::OString 
aLine(rtl::OUStringToOString(pPPortion-GetNode()-Copy(pLine-GetStart(), 
pLine-GetEnd() - pLine-GetStart()), RTL_TEXTENCODING_ASCII_US));
 fprintf( fp, \nLine %i\t%s, nLine, aLine.getStr() );
@@ -417,7 +417,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool 
bInfoBox )
 // then the internal data ...
 for ( nLine = 0; nLine  pPPortion-GetLines().Count(); nLine++ )
 {
-EditLine* pLine = pPPortion-GetLines().GetObject( nLine );
+EditLine* pLine = pPPortion-GetLines()[nLine];
 fprintf( fp, \nZeile %i:\tStart: %i,\tEnd: %i, nLine, 
pLine-GetStart(), pLine-GetEnd() );
 fprintf( fp, \t\tPortions: %i - %i.\tHight: %i, Ascent=%i, 
pLine-GetStartPortion(), pLine-GetEndPortion(), pLine-GetHeight(), 
pLine-GetMaxAscent() );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-04-03 Thread Kohei Yoshida
 editeng/source/editeng/impedit2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 97bcf0b645fa5ce14cfd806548c6805952fd3e76
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Apr 3 11:51:18 2012 -0400

WaE: for Norbert's Mac OS tinderbox.

diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 6a01a0f..ec74f29 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3965,7 +3965,7 @@ long ImpEditEngine::GetXPos(
 // End of Portion
 if ( pPortion-GetKind() == PORTIONKIND_TAB )
 {
-if ( (nTextPortion+1)  
pParaPortion-GetTextPortions().Count() )
+if ( static_castsize_t(nTextPortion+1)  
pParaPortion-GetTextPortions().Count() )
 {
 const TextPortion* pNextPortion = 
pParaPortion-GetTextPortions()[nTextPortion+1];
 if ( pNextPortion-GetKind() != PORTIONKIND_TAB )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/qa writerfilter/source

2012-04-03 Thread Miklos Vajna
 sw/qa/extras/rtftok/data/fdo45182.rtf  |   11 +++
 sw/qa/extras/rtftok/rtftok.cxx |   15 +++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   17 +++--
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |2 ++
 4 files changed, 43 insertions(+), 2 deletions(-)

New commits:
commit f4e0cbaa15c2861e87149a62c9c80a9e9b4094b3
Author: Miklos Vajna vmik...@suse.cz
Date:   Tue Apr 3 16:49:41 2012 +0200

fdo#45182 fix RTF import of character encoding in footnotes

There were two problems here:

1) \plain reset the character properties, but did not touch the current 
encoding
2) the default properties were not passed to substreams

diff --git a/sw/qa/extras/rtftok/data/fdo45182.rtf 
b/sw/qa/extras/rtftok/data/fdo45182.rtf
new file mode 100644
index 000..b076106
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/fdo45182.rtf
@@ -0,0 +1,11 @@
+{\rtf1\deff0
+{\fonttbl
+{\f0\fcharset238
+Times New Roman;}
+}
+a\chftn 
+{\footnote 
+\ltrpar \pard\plain\'9eivnost\'ed
+\par
+}
+}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index 45eabbf..9267967 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -35,6 +35,7 @@
 #include com/sun/star/text/RelOrientation.hpp
 #include com/sun/star/text/SizeType.hpp
 #include com/sun/star/text/TextContentAnchorType.hpp
+#include com/sun/star/text/XFootnotesSupplier.hpp
 #include com/sun/star/text/XPageCursor.hpp
 #include com/sun/star/text/XTextDocument.hpp
 #include com/sun/star/text/XTextGraphicObjectsSupplier.hpp
@@ -77,6 +78,7 @@ public:
 void testFdo45394();
 void testFdo48104();
 void testFdo47107();
+void testFdo45182();
 
 CPPUNIT_TEST_SUITE(RtfModelTest);
 #if !defined(MACOSX)  !defined(WNT)
@@ -97,6 +99,7 @@ public:
 CPPUNIT_TEST(testFdo45394);
 CPPUNIT_TEST(testFdo48104);
 CPPUNIT_TEST(testFdo47107);
+CPPUNIT_TEST(testFdo45182);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -500,6 +503,18 @@ void RtfModelTest::testFdo47107()
 xNumberingStyles-getByName(WWNum2);
 }
 
+void RtfModelTest::testFdo45182()
+{
+load(fdo45182.rtf);
+
+uno::Referencetext::XFootnotesSupplier xFootnotesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Referencecontainer::XIndexAccess 
xFootnotes(xFootnotesSupplier-getFootnotes(), uno::UNO_QUERY);
+uno::Referencetext::XTextRange xTextRange(xFootnotes-getByIndex(0), 
uno::UNO_QUERY);
+// Encoding in the footnote was wrong.
+OUString aExpected(živností, 10, RTL_TEXTENCODING_UTF8);
+CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange-getString());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5ceeaeb..e938f98 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -541,6 +541,14 @@ int RTFDocumentImpl::getFontIndex(int nIndex)
 return m_pSuperstream-getFontIndex(nIndex);
 }
 
+RTFParserState RTFDocumentImpl::getDefaultState()
+{
+if (!m_pSuperstream)
+return m_aDefaultState;
+else
+return m_pSuperstream-getDefaultState();
+}
+
 void RTFDocumentImpl::resolve(Stream  rMapper)
 {
 m_pMapperStream = rMapper;
@@ -1762,8 +1770,13 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
 m_aStates.top().nCurrentEncoding = RTL_TEXTENCODING_MS_1252;
 break;
 case RTF_PLAIN:
-m_aStates.top().aCharacterSprms = m_aDefaultState.aCharacterSprms;
-m_aStates.top().aCharacterAttributes = 
m_aDefaultState.aCharacterAttributes;
+{
+m_aStates.top().aCharacterSprms = 
getDefaultState().aCharacterSprms;
+RTFValue::Pointer_t pValue = 
m_aStates.top().aCharacterSprms.find(NS_sprm::LN_CRgFtc0);
+if (pValue.get())
+m_aStates.top().nCurrentEncoding = 
getEncoding(pValue-getInt());
+m_aStates.top().aCharacterAttributes = 
getDefaultState().aCharacterAttributes;
+}
 break;
 case RTF_PARD:
 m_aStates.top().aParagraphSprms = m_aDefaultState.aParagraphSprms;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 1747958..1d72ece 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -372,6 +372,8 @@ namespace writerfilter {
 int getFontIndex(int nIndex);
 /// Return the encoding associated with a dmapper font index.
 rtl_TextEncoding getEncoding(sal_uInt32 nFontIndex);
+/// Get the default parser state.
+RTFParserState getDefaultState();
 
 private:
 SvStream Strm();
___

[Libreoffice-commits] .: 3 commits - git-hooks/pre-commit sal/inc sal/osl

2012-04-03 Thread Lubos Lunak
 git-hooks/pre-commit|3 +++
 sal/inc/rtl/oustringostreaminserter.hxx |   16 
 sal/inc/rtl/ustring.hxx |5 +
 sal/inc/sal/detail/log.h|1 +
 sal/inc/sal/log.hxx |   29 -
 sal/osl/all/log.cxx |   13 ++---
 6 files changed, 47 insertions(+), 20 deletions(-)

New commits:
commit 2ac5b08361bf0c7c98ff9bc10869e2b41c9d85fd
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Apr 3 17:29:08 2012 +0200

try including the ostreamOUString operator directly with OUString

The theory is that

- the operator is suboptimal, because it always uses utf-8 as the encoding,
  which might possibly lead to some encoding problem somewhere

but

- the SAL_LOG macros need it anyway, or they are otherwise cumbersome
  with OUString
- as people learn to use the macros more, rtl/oustringostreaminserter.hxx
  will be included in more and more places, eventually possibly triggering
  the above problem anyway
- people probably should not just blindly do ostream  oustring if they
  have special encoding requirements

So let's try to simply always have the operator available and see how
it works out.

diff --git a/sal/inc/rtl/oustringostreaminserter.hxx 
b/sal/inc/rtl/oustringostreaminserter.hxx
index 632bc23..28d7c17 100644
--- a/sal/inc/rtl/oustringostreaminserter.hxx
+++ b/sal/inc/rtl/oustringostreaminserter.hxx
@@ -34,14 +34,6 @@
 #include rtl/textenc.h
 #include rtl/ustring.hxx
 
-/** Include this header to support rtl::OUString in std::ostream (and thus in
-CPPUNIT_ASSERT macros, for example).
-
-The rtl::OUString is converted to UTF-8.
-
-@since LibreOffice 3.5.
-*/
-
 // The unittest uses slightly different code to help check that the proper
 // calls are made. The class is put into a different namespace to make
 // sure the compiler generates a different (if generating also non-inline)
@@ -57,6 +49,14 @@ namespace rtl {
 #undef rtl
 #endif
 
+/**
+Support for rtl::OUString in std::ostream (and thus in
+CPPUNIT_ASSERT or SAL_INFO macros, for example).
+
+The rtl::OUString is converted to UTF-8.
+
+@since LibreOffice 3.5.
+*/
 template typename charT, typename traits  std::basic_ostreamcharT, traits 
 operator (
 std::basic_ostreamcharT, traits  stream, rtl::OUString const  string)
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index ee1ba7f..093b6c9 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -2085,4 +2085,9 @@ inline OString OUStringToOString( const OUString  
rUnicode,
 
 #endif /* _RTL_USTRING_HXX */
 
+// Include the ostream  operator directly here, so that it's always available
+// for SAL_INFO etc. Make sure it's outside of #ifdef _RTL_USTRING_HXX, because
+// includes ustring.hxx back.
+#include rtl/oustringostreaminserter.hxx
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/sal/log.hxx b/sal/inc/sal/log.hxx
index 59c11cd..bb41a6f 100644
--- a/sal/inc/sal/log.hxx
+++ b/sal/inc/sal/log.hxx
@@ -197,13 +197,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const ) {
 
   SAL_INFO(foo, string   s   of length   n)
 
-would be an example of such a call; if the given s is of type 
rtl::OUString,
+would be an example of such a call.
 
-  \#include rtl/oustringostreaminserter.hxx
-
-would make sure that an appropriate operator  is available.
-
-In either case, the composed message should be in UTF-8 and it should
+In the composed message should be in UTF-8 and it should
 contain no vertical formatting characters and no null characters
 
 For the _IF variants, log output is only generated if the given condition 
is
commit 7d540bd08ea06c95d5ac27530b8386ae1bea6526
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Apr 3 17:17:06 2012 +0200

commit hook preventing commits with SAL_DEBUG

diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
index 2e1ebf8..495dc16 100755
--- a/git-hooks/pre-commit
+++ b/git-hooks/pre-commit
@@ -64,6 +64,9 @@ sub check_whitespaces($)
if (/^(?:[=]){7}$/) {
bad_line(unresolved merge conflict, $src_full);
}
+   if (/SAL_DEBUG/) {
+   bad_line(temporary debug in commit, $_, $src_limited);
+   }
}
 }
 if ( $found_bad)
commit f46775a206589fb9486833ae2e043731cb6be54f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Apr 3 17:14:43 2012 +0200

SAL_DEBUG(), instead of those temporary debug printf's

diff --git a/sal/inc/sal/detail/log.h b/sal/inc/sal/detail/log.h
index 6ed6a1d..bb3d4c6 100644
--- a/sal/inc/sal/detail/log.h
+++ b/sal/inc/sal/detail/log.h
@@ -72,6 +72,7 @@ extern C {
 
 enum sal_detail_LogLevel {
 SAL_DETAIL_LOG_LEVEL_INFO, SAL_DETAIL_LOG_LEVEL_WARN,
+SAL_DETAIL_LOG_LEVEL_DEBUG,
 SAL_DETAIL_MAKE_FIXED_SIZE = 

[Libreoffice-commits] .: 2 commits - sc/source sw/source

2012-04-03 Thread Noel Power
 sc/source/ui/inc/prevwsh.hxx  |5 +-
 sc/source/ui/view/preview.cxx |5 +-
 sc/source/ui/view/prevwsh.cxx |  104 +-
 sw/source/ui/uiview/pview.cxx |   84 +
 4 files changed, 143 insertions(+), 55 deletions(-)

New commits:
commit f194d18dfeceff104f9c5e500ea4dd94fa1b5b06
Author: Noel Power noel.po...@novell.com
Date:   Tue Apr 3 17:07:54 2012 +0100

Hori/Vert scrollbars in calc preview should be shown only when necessary

diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 271a352..1ac668a 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -50,6 +50,7 @@ class CommandEvent;
 
 class ScPreviewShell: public SfxViewShell
 {
+friend class ScPreview; // allow access to AdjustPosSizePixel
 ScDocShell* pDocShell;
 
 ScPreview*  pPreview;   // Ausgabe-Fenster
@@ -63,7 +64,8 @@ class ScPreviewShell: public SfxViewShell
 longnMaxVertPos;
 
 SfxBroadcaster* pAccessibilityBroadcaster;
-
+boolGetPageSize( Size aPageSize );
+voidUpdateNeededScrollBars();
 private:
 voidConstruct( Window* pParent );
 DECL_LINK(ScrollHandler, ScrollBar* );
@@ -72,7 +74,6 @@ private:
 protected:
 virtual voidActivate(sal_Bool bMDI);
 virtual voidDeactivate(sal_Bool bMDI);
-
 virtual voidAdjustPosSizePixel( const Point rPos, const Size rSize );
 
 virtual voidInnerResizePixel( const Point rOfs, const Size rSize );
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index bbb7c72..e83224d 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -705,7 +705,10 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
 SetMapMode( aMMMode );
 
 bInSetZoom = true;  // don't scroll during SetYOffset in 
UpdateScrollBars
-pViewShell-UpdateScrollBars();
+if ( Window* pWin = pViewShell-GetWindow() )
+pViewShell-AdjustPosSizePixel( pWin-GetPosPixel(), 
pWin-GetSizePixel() );
+else
+pViewShell-UpdateScrollBars();
 bInSetZoom = false;
 
 bStateValid = false;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index dfc6268..8b65824 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -134,8 +134,8 @@ void ScPreviewShell::Construct( Window* pParent )
 if (pDrawBC)
 StartListening(*pDrawBC);
 
-pHorScroll-Show();
-pVerScroll-Show();
+pHorScroll-Show( false );
+pVerScroll-Show( false );
 pCorner-Show();
 SetHelpId( HID_SCSHELL_PREVWSH );
 SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(Preview)));
@@ -244,24 +244,15 @@ Size ScPreviewShell::GetOptimalSizePixel() const
 
 void ScPreviewShell::AdjustPosSizePixel( const Point rPos, const Size rSize )
 {
-long nBarW = 
GetViewFrame()-GetWindow().GetSettings().GetStyleSettings().GetScrollBarSize();
-long nBarH = nBarW;
-
-Size aOutSize( rSize.Width()-nBarW, rSize.Height()-nBarH );
+Size aOutSize( rSize );
 pPreview-SetPosSizePixel( rPos, aOutSize );
-pHorScroll-SetPosSizePixel( Point( rPos.X(), rPos.Y() + aOutSize.Height() 
),
- Size( aOutSize.Width(), nBarH ) );
-pVerScroll-SetPosSizePixel( Point( rPos.X() + aOutSize.Width(), rPos.Y() 
),
- Size( nBarW, aOutSize.Height() ) );
-pCorner-SetPosSizePixel( Point( rPos.X() + aOutSize.Width(), rPos.Y() + 
aOutSize.Height() ),
-  Size( nBarW, nBarH ) );
 
 if ( SVX_ZOOM_WHOLEPAGE == eZoom )
 pPreview-SetZoom( pPreview-GetOptimalZoom(false) );
 else if ( SVX_ZOOM_PAGEWIDTH == eZoom )
-pPreview-SetZoom( pPreview-GetOptimalZoom(sal_True) );
+pPreview-SetZoom( pPreview-GetOptimalZoom(true) );
 
-UpdateScrollBars();
+UpdateNeededScrollBars();
 }
 
 void ScPreviewShell::InnerResizePixel( const Point rOfs, const Size rSize )
@@ -274,7 +265,7 @@ void ScPreviewShell::OuterResizePixel( const Point rOfs, 
const Size rSize )
 AdjustPosSizePixel( rOfs,rSize );
 }
 
-void ScPreviewShell::UpdateScrollBars()
+bool ScPreviewShell::GetPageSize( Size aPageSize )
 {
 ScDocument* pDoc = pDocShell-GetDocument();
 SCTAB nTab = pPreview-GetTab();
@@ -282,13 +273,87 @@ void ScPreviewShell::UpdateScrollBars()
 ScStyleSheetPool*   pStylePool  = pDoc-GetStyleSheetPool();
 SfxStyleSheetBase*  pStyleSheet = pStylePool-Find( pDoc-GetPageStyle( 
nTab ),
 SFX_STYLE_FAMILY_PAGE 
);
-OSL_ENSURE(pStyleSheet,StyleSheet nicht gefunden);
-if (!pStyleSheet) return;
+OSL_ENSURE(pStyleSheet,No style sheet);
+if (!pStyleSheet) return false;
 const SfxItemSet* pParamSet = pStyleSheet-GetItemSet();
 
-Size aPageSize = ((const SvxSizeItem) 

[Libreoffice-commits] .: framework/source

2012-04-03 Thread Ivan Timofeev
 framework/source/services/backingwindow.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 4e24d472f693c458b17d2ba1fb6c883aaf9c3b27
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Apr 3 20:40:14 2012 +0400

fix the initial font size in the Start Center

Recover the code that was for some reason removed in commit
78e8d5f0d62f910b8561a1c4fd7ebd8ae4cfb9f8.

diff --git a/framework/source/services/backingwindow.cxx 
b/framework/source/services/backingwindow.cxx
index d930f77..ca0e9e7 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -239,6 +239,9 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
 maButtonImageSize.Width() += 12;
 maButtonImageSize.Height() += 12;
 
+// set a slighly larger font than normal labels on the texts
+maTextFont.SetSize( Size( 0, 11 ) );
+maTextFont.SetWeight( WEIGHT_NORMAL );
 }
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-04-03 Thread Kohei Yoshida
 editeng/source/editeng/impedit3.cxx |2 +-
 editeng/source/editeng/impedit4.cxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 881fa8d5cbb937b033f87f7da813419895b31b28
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Apr 3 13:15:57 2012 -0400

More dbgutil build fix.

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 091c329..83396c9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1697,7 +1697,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( 
ParaPortion* pParaPortion, sal_uIn
 {
 // -2: The new one is already inserted.
 #ifdef DBG_UTIL
-EditLine* pLastLine = pParaPortion-GetLines().GetObject( 
pParaPortion-GetLines().Count()-2 );
+EditLine* pLastLine = 
pParaPortion-GetLines()[pParaPortion-GetLines().Count()-2];
 DBG_ASSERT( pLastLine, soft wrap no line?! );
 DBG_ASSERT( pLastLine-GetEnd() == pParaPortion-GetNode()-Len(), 
different anyway? );
 #endif
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index dd45a57..63b9402 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1167,9 +1167,9 @@ EditTextObject* ImpEditEngine::CreateBinTextObject( 
EditSelection aSel, SfxItemP
 sal_uInt16 nTest;
 int nTPLen = 0, nTxtLen = 0;
 for ( nTest = pParaPortion-GetTextPortions().Count(); nTest; )
-nTPLen += pParaPortion-GetTextPortions().GetObject( --nTest 
)-GetLen();
+nTPLen += pParaPortion-GetTextPortions()[--nTest]-GetLen();
 for ( nTest = pParaPortion-GetLines().Count(); nTest; )
-nTxtLen += pParaPortion-GetLines().GetObject( --nTest 
)-GetLen();
+nTxtLen += pParaPortion-GetLines()[--nTest]-GetLen();
 DBG_ASSERT( ( nTPLen == pParaPortion-GetNode()-Len() )  ( 
nTxtLen == pParaPortion-GetNode()-Len() ), CreateBinTextObject: ParaPortion 
not completely formatted! );
 #endif
 }
@@ -1363,9 +1363,9 @@ EditSelection ImpEditEngine::InsertBinTextObject( 
BinTextObject rTextObject, Ed
 sal_uInt16 nTest;
 int nTPLen = 0, nTxtLen = 0;
 for ( nTest = pParaPortion-GetTextPortions().Count(); nTest; )
-nTPLen += pParaPortion-GetTextPortions().GetObject( 
--nTest )-GetLen();
+nTPLen += 
pParaPortion-GetTextPortions()[--nTest]-GetLen();
 for ( nTest = pParaPortion-GetLines().Count(); nTest; )
-nTxtLen += pParaPortion-GetLines().GetObject( --nTest 
)-GetLen();
+nTxtLen += pParaPortion-GetLines()[--nTest]-GetLen();
 DBG_ASSERT( ( nTPLen == pParaPortion-GetNode()-Len() )  ( 
nTxtLen == pParaPortion-GetNode()-Len() ), InsertBinTextObject: ParaPortion 
not completely formatted! );
 #endif
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/inc

2012-04-03 Thread Tor Lillqvist
 sal/inc/sal/types.h |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9b9f70737e5133c8aa5a95fd2e49a0f9a5e091e6
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Tue Apr 3 20:37:03 2012 +0300

SAL_REINTERPRET_CAST returns, for API stability (for 3rd-party extensions)

diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 8d0bb7e..288c2e7 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -356,6 +356,7 @@ typedef struct _sal_Sequence
  */
 #ifdef __cplusplus
 #define SAL_CONST_CAST(type, expr) (const_cast type (expr))
+#define SAL_REINTERPRET_CAST(type, expr) (reinterpret_cast type (expr))
 #define SAL_STATIC_CAST(type, expr) (static_cast type (expr))
 #endif /* __cplusplus */
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-04-03 Thread Kohei Yoshida
 editeng/source/editeng/impedit.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e7e882715872303dc8feabc899ceab572d1c2337
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Apr 3 13:53:15 2012 -0400

Unused local variables.

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index b01c830..d3268ce 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -491,7 +491,6 @@ void ImpEditView::ResetOutputArea( const Rectangle rRec )
 
 void ImpEditView::RecalcOutputArea()
 {
-Rectangle aOldArea( aOutArea );
 Point aNewTopLeft( aOutArea.TopLeft() );
 Size aNewSz( aOutArea.GetSize() );
 
@@ -886,7 +885,6 @@ Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 
nRangeCheck )
 #endif
 
 Rectangle aNewVisArea( GetVisDocArea() );
-Size aPaperSz( pEditEngine-pImpEditEngine-GetPaperSize() );
 
 // Vertical:
 if ( !IsVertical() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - chart2/source cui/source reportdesign/source sd/source svtools/inc svtools/source svx/inc svx/source

2012-04-03 Thread Matteo Casalin
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |1 
 chart2/source/controller/dialogs/ChartTypeDialogController.hxx |3 
 chart2/source/controller/inc/res_ErrorBar.hxx  |1 
 cui/source/tabpages/numpages.cxx   |1 
 reportdesign/source/ui/dlg/Condition.cxx   |1 
 reportdesign/source/ui/dlg/Condition.hxx   |2 
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx|1 
 sd/source/ui/table/TableDesignPane.cxx |1 
 sd/source/ui/table/TableDesignPane.hxx |1 
 sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx   |1 
 svtools/inc/svtools/valueset.hxx   |1 
 svtools/source/control/toolbarmenuimp.hxx  |2 
 svtools/source/control/valueset.cxx|  218 
--
 svx/inc/svx/float3d.hxx|1 
 svx/source/gallery2/galbrws2.cxx   |1 
 svx/source/tbxctrls/colorwindow.hxx|1 
 svx/source/tbxctrls/extrusioncontrols.hxx  |2 
 17 files changed, 96 insertions(+), 143 deletions(-)

New commits:
commit d701d7b68344854b9a67583bbd38f40d061e6cb4
Author: Matteo Casalin matteo.casa...@gmx.com
Date:   Tue Apr 3 15:00:19 2012 +0200

ValueSet: reworked key navigation

diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index e8aa9f5..95d5e6b 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1299,41 +1299,22 @@ void ValueSet::Tracking( const TrackingEvent rTEvt )
 
 // ---
 
-namespace
-{
-
-size_t
-lcl_gotoLastLine(size_t const nLastPos, size_t const nCols, size_t const 
nCurPos)
-{
-size_t nItemPos = nLastPos+1)/nCols)-1)*nCols)+(nCurPos%nCols);
-if ( nItemPos+nCols = nLastPos )
-nItemPos = nItemPos + nCols;
-return nItemPos;
-}
-
-}
-
 void ValueSet::KeyInput( const KeyEvent rKEvt )
 {
 size_t nLastItem = mItemList.size();
-size_t nItemPos = VALUESET_ITEM_NOTFOUND;
-size_t nCurPos = VALUESET_ITEM_NONEITEM;
-size_t nCalcPos;
 
 if ( !nLastItem || !ImplGetFirstItem() )
 {
 Control::KeyInput( rKEvt );
 return;
 }
-else
-nLastItem--;
 
-if ( mnSelItemId )
-nCurPos = GetItemPos( mnSelItemId );
-nCalcPos = nCurPos;
+--nLastItem;
+const size_t nCurPos = mnSelItemId ? GetItemPos( mnSelItemId )
+   : mpNoneItem ? VALUESET_ITEM_NONEITEM : 
0;
+size_t nItemPos = VALUESET_ITEM_NOTFOUND;
+size_t nVStep = mnCols;
 
-//switch off selection mode if key travelling is used
-bool bDefault = false;
 switch ( rKEvt.GetKeyCode().GetCode() )
 {
 case KEY_HOME:
@@ -1345,147 +1326,129 @@ void ValueSet::KeyInput( const KeyEvent rKEvt )
 break;
 
 case KEY_LEFT:
-case KEY_RIGHT:
-if ( rKEvt.GetKeyCode().GetCode()==KEY_LEFT )
+if (nCurPos != VALUESET_ITEM_NONEITEM)
 {
-if ( nCalcPos == VALUESET_ITEM_NONEITEM )
-nItemPos = nLastItem;
-else if ( !nCalcPos )
+if (nCurPos)
 {
-if ( mpNoneItem )
-nItemPos = VALUESET_ITEM_NONEITEM;
-else
-nItemPos = nLastItem;
+nItemPos = nCurPos-1;
+}
+else if (mpNoneItem)
+{
+nItemPos = VALUESET_ITEM_NONEITEM;
 }
-else
-nItemPos = nCalcPos-1;
 }
-else
+break;
+
+case KEY_RIGHT:
+if (nCurPos  nLastItem)
 {
-if ( nCalcPos == VALUESET_ITEM_NONEITEM )
-nItemPos = 0;
-else if ( nCalcPos == nLastItem )
+if (nCurPos == VALUESET_ITEM_NONEITEM)
 {
-if ( mpNoneItem )
-nItemPos = VALUESET_ITEM_NONEITEM;
-else
-nItemPos = 0;
+nItemPos = 0;
 }
 else
-nItemPos = nCalcPos+1;
+{
+nItemPos = nCurPos+1;
+}
 }
-nCalcPos = nItemPos;
 break;
 
-case KEY_UP:
 case KEY_PAGEUP:
-{
-if( rKEvt.GetKeyCode().GetCode() != KEY_PAGEUP ||
-( !rKEvt.GetKeyCode().IsShift()  
!rKEvt.GetKeyCode().IsMod1()  !rKEvt.GetKeyCode().IsMod2() ) )
+if (rKEvt.GetKeyCode().IsShift() || rKEvt.GetKeyCode().IsMod1() || 

[Libreoffice-commits] .: sc/source

2012-04-03 Thread Eike Rathke
 sc/source/core/tool/stringutil.cxx |   52 +
 1 file changed, 42 insertions(+), 10 deletions(-)

New commits:
commit 35fed09a0c5560b56ba53c64da8dea28bf88acff
Author: Eike Rathke er...@redhat.com
Date:   Tue Apr 3 20:57:19 2012 +0200

resolved fdo#39716 CSV import numbers in scientific notation

diff --git a/sc/source/core/tool/stringutil.cxx 
b/sc/source/core/tool/stringutil.cxx
index 58e84e9..263e22c 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -48,9 +48,15 @@ ScSetStringParam::ScSetStringParam() :
 bool ScStringUtil::parseSimpleNumber(
 const OUString rStr, sal_Unicode dsep, sal_Unicode gsep, double rVal)
 {
-if (gsep == 0x00A0)
-// unicode space to ascii space
-gsep = 0x0020;
+// Actually almost the entire pre-check is unnecessary and we could call
+// rtl::math::stringToDouble() just after having exchanged ascii space with
+// non-breaking space, if it wasn't for check of grouped digits. The NaN
+// and Inf cases that are accepted by stringToDouble() could be detected
+// using rtl::math::isFinite() on the result.
+
+/* TODO: The grouped digits check isn't even valid for locales that do not
+ * group in thousands ... e.g. Indian locales. But that's something also
+ * the number scanner doesn't implement yet, only the formatter. */
 
 OUStringBuffer aBuf;
 
@@ -60,6 +66,7 @@ bool ScStringUtil::parseSimpleNumber(
 const sal_Unicode* pLast = p + (n-1);
 sal_Int32 nPosDSep = -1, nPosGSep = -1;
 sal_uInt32 nDigitCount = 0;
+sal_Int32 nPosExponent = -1;
 
 // Skip preceding spaces.
 for (i = 0; i  n; ++i, ++p)
@@ -88,9 +95,9 @@ bool ScStringUtil::parseSimpleNumber(
 for (i = 0; i  n; ++i, ++p)
 {
 sal_Unicode c = *p;
-if (c == 0x00A0)
-// unicode space to ascii space
-c = 0x0020;
+if (c == 0x0020  gsep == 0x00A0)
+// ascii space to unicode space if that is group separator
+c = 0x00A0;
 
 if (sal_Unicode('0') = c  c = sal_Unicode('9'))
 {
@@ -132,17 +139,40 @@ bool ScStringUtil::parseSimpleNumber(
 // must be exactly 3 digits since the last group separator.
 return false;
 
+if (nPosExponent = 0)
+// not allowed in exponent.
+return false;
+
 nPosGSep = i;
 nDigitCount = 0;
 }
 else if (c == sal_Unicode('-') || c == sal_Unicode('+'))
 {
-// A sign must be the first character if it's given.
-if (i == 0)
+// A sign must be the first character if it's given, or immediately
+// follow the exponent character if present.
+if (i == 0 || (nPosExponent = 0  i == nPosExponent + 1))
 aBuf.append(c);
 else
 return false;
 }
+else if (c == sal_Unicode('E') || c == sal_Unicode('e'))
+{
+// this is an exponent designator.
+
+if (nPosExponent = 0)
+// Only one exponent allowed.
+return false;
+
+if (nPosGSep = 0  nDigitCount != 3)
+// must be exactly 3 digits since the last group separator.
+return false;
+
+aBuf.append(c);
+nPosExponent = i;
+nPosDSep = -1;
+nPosGSep = -1;
+nDigitCount = 0;
+}
 else
 return false;
 }
@@ -155,8 +185,10 @@ bool ScStringUtil::parseSimpleNumber(
 
 rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
 sal_Int32 nParseEnd = 0;
-rVal = ::rtl::math::stringToDouble(aBuf.makeStringAndClear(), dsep, gsep, 
eStatus, nParseEnd);
-if (eStatus != rtl_math_ConversionStatus_Ok)
+OUString aString( aBuf.makeStringAndClear());
+rVal = ::rtl::math::stringToDouble( aString, dsep, gsep, eStatus, 
nParseEnd);
+if (eStatus != rtl_math_ConversionStatus_Ok || nParseEnd  
aString.getLength())
+// Not a valid number or not entire string consumed.
 return false;
 
 return true;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 9 commits - boost/boost_1_44_0-logical-op-parentheses.patch boost/boost_1_44_0-unused-parameters.patch boost/makefile.mk cppcanvas/source framework/source sc/qa sc/source vcl/

2012-04-03 Thread Tor Lillqvist
 boost/boost_1_44_0-logical-op-parentheses.patch  |   12 +
 boost/boost_1_44_0-unused-parameters.patch   |   77 
 boost/makefile.mk|1 
 cppcanvas/source/mtfrenderer/bitmapaction.cxx|2 
 cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx |2 
 cppcanvas/source/mtfrenderer/polypolyaction.cxx  |6 
 cppcanvas/source/mtfrenderer/rendergraphicaction.cxx |2 
 framework/source/classes/menumanager.cxx |8 
 sc/qa/unit/helper/debughelper.hxx|3 
 sc/source/core/data/dpgroup.cxx  |9 
 sc/source/filter/oox/worksheetfragment.cxx   |   20 --
 vcl/inc/ios/salframeview.h   |5 
 vcl/ios/source/gdi/salcoretextfontutils.cxx  |  177 ---
 vcl/ios/source/gdi/salcoretextlayout.cxx |   26 ++
 vcl/ios/source/gdi/salnativewidgets.cxx  |   18 +
 vcl/ios/source/window/salframeview.mm|   16 +
 16 files changed, 168 insertions(+), 216 deletions(-)

New commits:
commit 86b99ab408c7235604a1a02d7bc531fe5d5f97f6
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Apr 4 00:57:00 2012 +0300

Clang WaE: -Woverloaded-virtual weirdness, this seems to help

diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx 
b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
index 2129ca5..39f240a 100644
--- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx
+++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
@@ -60,6 +60,8 @@ namespace cppcanvas
 class BitmapAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 BitmapAction( const ::BitmapEx,
   const ::basegfx::B2DPoint rDstPoint,
   const CanvasSharedPtr,
diff --git a/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx 
b/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
index 8cef77f..4e72cae 100644
--- a/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
+++ b/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
@@ -79,11 +79,11 @@ namespace cppcanvas
 protected:
 using Action::render;
 
-private:
 virtual bool render( ::com::sun::star::uno::Reference
  
::com::sun::star::rendering::XCachedPrimitive  rCachedPrimitive,
  const ::basegfx::B2DHomMatrix
   rTransformation ) const = 0;
 
+private:
 CanvasSharedPtr 
mpCanvas;
 mutable ::com::sun::star::uno::Reference
 ::com::sun::star::rendering::XCachedPrimitive  
mxCachedPrimitive;
diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx 
b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
index dcfe33c..2ff5316 100644
--- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx
+++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
@@ -61,6 +61,8 @@ namespace cppcanvas
 class PolyPolyAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 PolyPolyAction( const ::basegfx::B2DPolyPolygon,
 const CanvasSharedPtr,
 const OutDevState,
@@ -245,6 +247,8 @@ namespace cppcanvas
 class TexturedPolyPolyAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 TexturedPolyPolyAction( const ::basegfx::B2DPolyPolygon rPoly,
 const CanvasSharedPtr   
rCanvas,
 const OutDevState   
rState,
@@ -359,6 +363,8 @@ namespace cppcanvas
 class StrokedPolyPolyAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 StrokedPolyPolyAction( const ::basegfx::B2DPolyPolygon 
rPoly,
const CanvasSharedPtr   
rCanvas,
const OutDevState   
rState,
diff --git a/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx 
b/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx
index f5ce0ee..237f781 100644
--- a/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx
+++ b/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx
@@ -60,6 +60,8 @@ namespace cppcanvas
 class RenderGraphicAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 RenderGraphicAction( const ::vcl::RenderGraphic 
rRenderGraphic,
   const ::basegfx::B2DPoint rDstPoint,
   const ::basegfx::B2DVector 

[Libreoffice-commits] .: editeng/source

2012-04-03 Thread Kohei Yoshida
 editeng/source/editeng/impedit3.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit e5d378b1ba04c470e0c6c16b48af97ab5818e2bb
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Apr 3 18:26:29 2012 -0400

Check for empty-ness of vector before accessing the first element.

I hope this will keep Stephan's tinderbox happy.  If not...

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 83396c9..4e9c393 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1241,7 +1241,9 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, 
sal_uInt32 nStartPosY )
 if ( bCompressedChars  pPortion  ( pPortion-GetLen()  1 )  
pPortion-GetExtraInfos()  pPortion-GetExtraInfos()-bCompressed )
 {
 // I need the manipulated DXArray for determining the break 
postion...
-sal_Int32* pDXArray = pLine-GetCharPosArray()[0] + 
(nPortionStart - pLine-GetStart());
+sal_Int32* pDXArray = NULL;
+if (!pLine-GetCharPosArray().empty())
+pDXArray = pLine-GetCharPosArray()[0] + (nPortionStart - 
pLine-GetStart());
 ImplCalcAsianCompression(
 pNode, pPortion, nPortionStart, pDXArray, 1, true);
 }
@@ -2997,7 +2999,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
Rectangle aClipRec, Point aSta
 aText = *pPortion-GetNode();
 nTextStart = nIndex;
 nTextLen = pTextPortion-GetLen();
-pDXArray = pLine-GetCharPosArray()[0]+( 
nIndex-pLine-GetStart() );
+if (!pLine-GetCharPosArray().empty())
+pDXArray = 
pLine-GetCharPosArray()[0]+( nIndex-pLine-GetStart() );
 
 // Paint control characters (#i55716#)
 if ( aStatus.MarkFields() )
@@ -4457,7 +4460,9 @@ void ImpEditEngine::ImplExpandCompressedPortions( 
EditLine* pLine, ParaPortion*
 size_t nTxtPortion = pParaPortion-GetTextPortions().GetPos( 
pTP );
 sal_uInt16 nTxtPortionStart = 
pParaPortion-GetTextPortions().GetStartPos( nTxtPortion );
 DBG_ASSERT( nTxtPortionStart = pLine-GetStart(), Portion 
doesn't belong to the line!!! );
-sal_Int32* pDXArray = pLine-GetCharPosArray()[0]+( 
nTxtPortionStart-pLine-GetStart() );
+sal_Int32* pDXArray = NULL;
+if (!pLine-GetCharPosArray().empty())
+pDXArray = pLine-GetCharPosArray()[0]+( 
nTxtPortionStart-pLine-GetStart() );
 if ( pTP-GetExtraInfos()-pOrgDXArray )
 memcpy( pDXArray, pTP-GetExtraInfos()-pOrgDXArray, 
(pTP-GetLen()-1)*sizeof(sal_Int32) );
 ImplCalcAsianCompression( pParaPortion-GetNode(), pTP, 
nTxtPortionStart, pDXArray, (sal_uInt16)nCompressPercent, sal_True );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-04-03 Thread Kohei Yoshida
 editeng/source/editeng/impedit2.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 71da75abda60172ee9b8f42c1bf5de2f48a731b9
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Apr 3 18:45:55 2012 -0400

I need to check for empty-ness here too.

diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index ec74f29..ecb4a89 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4021,7 +4021,9 @@ long ImpEditEngine::GetXPos(
 if ( nType == CHAR_PUNCTUATIONRIGHT )
 {
 sal_uInt16 n = nIndex - nTextPortionStart;
-const sal_Int32* pDXArray = 
pLine-GetCharPosArray()[0]+( nTextPortionStart-pLine-GetStart() );
+const sal_Int32* pDXArray = NULL;
+if (!pLine-GetCharPosArray().empty())
+pDXArray = pLine-GetCharPosArray()[0]+( 
nTextPortionStart-pLine-GetStart() );
 sal_Int32 nCharWidth = ( ( (n+1)  
pPortion-GetLen() ) ? pDXArray[n] : pPortion-GetSize().Width() )
 - ( n ? 
pDXArray[n-1] : 0 );
 if ( (n+1)  pPortion-GetLen() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: drawinglayer/inc svx/inc svx/source

2012-04-03 Thread Markus Mohrhard
 drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx |   10 +--
 svx/inc/svx/framelink.hxx   |   22 

 svx/source/dialog/framelink.cxx |   27 
--
 3 files changed, 28 insertions(+), 31 deletions(-)

New commits:
commit 2c91cb08d65cd35fa8ef6eaca3677aa82fb58cbe
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Wed Apr 4 01:58:07 2012 +0200

better drawing support for borders of different width, fdo#33634

diff --git 
a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx 
b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx
index 1449e2b..6ca9643 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx
@@ -85,17 +85,17 @@ namespace drawinglayer
 /// local helpers
 double getCorrectedLeftWidth() const
 {
-return basegfx::fTools::equal(1.0, mfLeftWidth) ? 0.0 : 
mfLeftWidth;
+return mfLeftWidth = 0.1 ? 0.0 : mfLeftWidth;
 }
 
 double getCorrectedDistance() const
 {
-return basegfx::fTools::equal(1.0, mfDistance) ? 0.0 : 
mfDistance;
+return mfDistance = 0.1 ? 0.0 : mfDistance;
 }
 
 double getCorrectedRightWidth() const
 {
-return basegfx::fTools::equal(1.0, mfRightWidth) ? 0.0 : 
mfRightWidth;
+return mfRightWidth = 0.1 ? 0.0 : mfRightWidth;
 }
 
 double getWidth() const
@@ -105,12 +105,12 @@ namespace drawinglayer
 
 bool leftIsHairline() const
 {
-return basegfx::fTools::equal(1.0, mfLeftWidth);
+return 0  mfLeftWidth  mfLeftWidth = 0.1;
 }
 
 bool rightIsHairline() const
 {
-return basegfx::fTools::equal(1.0, mfRightWidth);
+return 0  mfRightWidth  mfRightWidth = 0.1;
 }
 
 bool isSolidLine() const
diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx
index 218ae56..c2edbb4 100644
--- a/svx/inc/svx/framelink.hxx
+++ b/svx/inc/svx/framelink.hxx
@@ -118,12 +118,12 @@ public:
 /** Constructs an invisible frame style. */
 inline explicit Style() : meRefMode( REFMODE_CENTERED ), mnType( 
editeng::SOLID ) { Clear(); }
 /** Constructs a frame style with passed line widths. */
-inline explicit Style( sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS, 
editeng::SvxBorderStyle nType ) :
+inline explicit Style( double nP, double nD, double nS, 
editeng::SvxBorderStyle nType ) :
 meRefMode( REFMODE_CENTERED ), mnType( nType )
 { Clear(); Set( nP, nD, nS ); }
 /** Constructs a frame style with passed color and line widths. */
 inline explicit Style( const Color rColorPrim, const Color 
rColorSecn, const Color rColorGap, bool bUseGapColor,
-sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS, 
editeng::SvxBorderStyle nType ) :
+double nP, double nD, double nS, 
editeng::SvxBorderStyle nType ) :
 meRefMode( REFMODE_CENTERED ), mnType( nType )
 { Set( rColorPrim, rColorSecn, rColorGap, 
bUseGapColor, nP, nD, nS ); }
 /** Constructs a frame style from the passed SvxBorderLine struct. */
@@ -138,21 +138,21 @@ public:
 inline const Color GetColorSecn() const { return maColorSecn; }
 inline const Color GetColorGap() const { return maColorGap; }
 inline bool UseGapColor() const { return mbUseGapColor; }
-inline sal_uInt16   Prim() const { return mnPrim; }
-inline sal_uInt16   Dist() const { return mnDist; }
-inline sal_uInt16   Secn() const { return mnSecn; }
+inline double   Prim() const { return mnPrim; }
+inline double   Dist() const { return mnDist; }
+inline double   Secn() const { return mnSecn; }
 inline editeng::SvxBorderStyle Type() const { return mnType; }
 
 /** Returns the total width of this frame style. */
-inline sal_uInt16   GetWidth() const { return mnPrim + mnDist + mnSecn; }
+inline double   GetWidth() const { return mnPrim + mnDist + mnSecn; }
 
 /** Sets the frame style to invisible state. */
 voidClear();
 /** Sets the frame style to the passed line widths. */
-voidSet( sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS );
+voidSet( double nP, double nD, double nS );
 /** Sets the frame style to the passed line widths. */
 voidSet( const Color rColorPrim, const Color rColorSecn, 
const Color rColorGap, bool bUseGapColor,
-sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS );
+ 

[Libreoffice-commits] .: cppcanvas/source

2012-04-03 Thread Tor Lillqvist
 cppcanvas/source/inc/action.hxx  |4 -
 cppcanvas/source/mtfrenderer/bitmapaction.cxx|   20 ++---
 cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx |4 -
 cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx |4 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx|4 -
 cppcanvas/source/mtfrenderer/lineaction.cxx  |8 +-
 cppcanvas/source/mtfrenderer/pointaction.cxx |8 +-
 cppcanvas/source/mtfrenderer/polypolyaction.cxx  |   60 ++-
 cppcanvas/source/mtfrenderer/rendergraphicaction.cxx |   20 ++---
 cppcanvas/source/mtfrenderer/textaction.cxx  |   50 ++--
 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx |   14 +--
 11 files changed, 93 insertions(+), 103 deletions(-)

New commits:
commit 66aed6f470c795f172fa85b89ae9d25c76eb38bd
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Apr 4 06:55:01 2012 +0300

New try to sort out the overloaded virtual method weirdness

Revert Clang WaE: -Woverloaded-virtual weirdness, this seems to help
as that broke tinderboxes. Try another way instead, renaming two
versions of the overloaded render() method, so that there is no longer
any overloading.

Compiles -Werror-clean with Clang, hopefully no problem with other
compilers either.

This reverts commit 86b99ab408c7235604a1a02d7bc531fe5d5f97f6.

diff --git a/cppcanvas/source/inc/action.hxx b/cppcanvas/source/inc/action.hxx
index 971cfcb..c961f82 100644
--- a/cppcanvas/source/inc/action.hxx
+++ b/cppcanvas/source/inc/action.hxx
@@ -114,8 +114,8 @@ namespace cppcanvas
 specified subset is invalid for this action, or if
 rendering failed for other reasons, false is returned.
  */
-virtual bool render( const ::basegfx::B2DHomMatrix 
rTransformation,
- const Subset  rSubset ) 
const = 0;
+virtual bool renderSubset( const ::basegfx::B2DHomMatrix 
rTransformation,
+   const Subset  rSubset 
) const = 0;
 
 /** Query bounds of this action on the associated canvas
 
diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx 
b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
index 39f240a..83e7a0a 100644
--- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx
+++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
@@ -60,8 +60,6 @@ namespace cppcanvas
 class BitmapAction : public CachedPrimitiveBase
 {
 public:
-using CachedPrimitiveBase::render;
-
 BitmapAction( const ::BitmapEx,
   const ::basegfx::B2DPoint rDstPoint,
   const CanvasSharedPtr,
@@ -72,8 +70,8 @@ namespace cppcanvas
   const CanvasSharedPtr,
   const OutDevState );
 
-virtual bool render( const ::basegfx::B2DHomMatrix 
rTransformation,
- const Subset  rSubset ) 
const;
+virtual bool renderSubset( const ::basegfx::B2DHomMatrix 
rTransformation,
+   const Subset  
rSubset ) const;
 
 virtual ::basegfx::B2DRange getBounds( const 
::basegfx::B2DHomMatrix rTransformation ) const;
 virtual ::basegfx::B2DRange getBounds( const 
::basegfx::B2DHomMatrix   rTransformation,
@@ -83,8 +81,8 @@ namespace cppcanvas
 
 private:
 using Action::render;
-virtual bool render( uno::Reference 
rendering::XCachedPrimitive  rCachedPrimitive,
- const ::basegfx::B2DHomMatrix
 rTransformation ) const;
+virtual bool renderPrimitive( uno::Reference 
rendering::XCachedPrimitive  rCachedPrimitive,
+  const ::basegfx::B2DHomMatrix   
  rTransformation ) const;
 
 uno::Reference rendering::XBitmap 
mxBitmap;
 CanvasSharedPtr 
mpCanvas;
@@ -152,10 +150,10 @@ namespace cppcanvas
NULL );
 }
 
-bool BitmapAction::render( uno::Reference 
rendering::XCachedPrimitive  rCachedPrimitive,
-   const ::basegfx::B2DHomMatrix  
   rTransformation ) const
+bool BitmapAction::renderPrimitive( uno::Reference 
rendering::XCachedPrimitive  rCachedPrimitive,
+const ::basegfx::B2DHomMatrix 
rTransformation ) const
 {
-RTL_LOGFILE_CONTEXT( aLog, 
::cppcanvas::internal::BitmapAction::render() );
+RTL_LOGFILE_CONTEXT( aLog, 

[Libreoffice-commits] .: sc/qa

2012-04-03 Thread Markus Mohrhard
 sc/qa/unit/ucalc.cxx |   49 +
 1 file changed, 49 insertions(+)

New commits:
commit 62d745ddde6b60796123f45b3df8c10e9869
Author: Karthik A Padmanabhan treadston...@gmail.com
Date:   Tue Apr 3 01:21:16 2012 +0530

Test cases for ScDocFunc::RenameTable()

Rename twice and also check if upon renaming two tables have the same name 
or not

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 245215c..c8bd00c 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -206,6 +206,7 @@ public:
 void testJumpToPrecedentsDependents();
 
 void testSetBackgroundColor();
+void testRenameTable();
 
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testCollator);
@@ -244,6 +245,7 @@ public:
 CPPUNIT_TEST(testUpdateReference);
 CPPUNIT_TEST(testJumpToPrecedentsDependents);
 CPPUNIT_TEST(testSetBackgroundColor);
+CPPUNIT_TEST(testRenameTable);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -3910,6 +3912,53 @@ void Test::testMergedCells()
 m_pDoc-DeleteTab(0);
 }
 
+
+void Test::testRenameTable()
+{
+//test set rename table
+//TODO: set name1 and name2 and do an undo to check if name 1 is set now
+//TODO: also check if new name for table is same as another table
+
+m_pDoc-InsertTab(0, Sheet1);
+m_pDoc-InsertTab(1, Sheet2);
+
+//test case 1 , rename table2 to sheet 1, it should return error
+rtl::OUString nameToSet = Sheet1;
+ScDocFunc rDocFunc = m_xDocShRef-GetDocFunc();
+CPPUNIT_ASSERT_MESSAGE(name same as another table is being set, 
!rDocFunc.RenameTable(1,nameToSet,false,true) );
+
+//test case 2 , simple rename to check name
+nameToSet = test1;
+m_xDocShRef-GetDocFunc().RenameTable(0,nameToSet,false,true);
+rtl::OUString nameJustSet;
+m_pDoc-GetName(0,nameJustSet);
+CPPUNIT_ASSERT_MESSAGE(table not renamed, nameToSet != nameJustSet);
+
+//test case 3 , rename again
+rtl::OUString anOldName;
+m_pDoc-GetName(0,anOldName);
+
+nameToSet = test2;
+rDocFunc.RenameTable(0,nameToSet,false,true);
+m_pDoc-GetName(0,nameJustSet);
+CPPUNIT_ASSERT_MESSAGE(table not renamed, nameToSet != nameJustSet);
+
+//test case 4 , check if  undo works
+SfxUndoAction* pUndo = new 
ScUndoRenameTab(m_xDocShRef,0,anOldName,nameToSet);
+pUndo-Undo();
+m_pDoc-GetName(0,nameJustSet);
+CPPUNIT_ASSERT_MESSAGE(the correct name is not set after undo, 
nameJustSet == anOldName);
+
+pUndo-Redo();
+m_pDoc-GetName(0,nameJustSet);
+CPPUNIT_ASSERT_MESSAGE(the correct color is not set after redo, 
nameJustSet == nameToSet);
+
+m_pDoc-DeleteTab(0);
+m_pDoc-DeleteTab(1);
+}
+
+
+
 void Test::testSetBackgroundColor()
 {
 //test set background color
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits