ooo-build r15331 - in trunk: . patches/dev300 patches/mono patches/unittesting



Author: pmladek
Date: Fri Feb 13 16:56:54 2009
New Revision: 15331
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15331&view=rev

Log:
2009-02-13  Petr Mladek  <pmladek suse cz>

	* patches/dev300/buildfix-fmtargs.diff:
	* patches/dev300/buildfix-fmtargs-m0.diff:
	* patches/mono/climaker-csharp-win.diff:
	* patches/mono/climaker-csharp-win-m0.diff:
	* patches/dev300/redirect-extensions.diff:
	* patches/dev300/redirect-extensions-m0.diff:
	* patches/dev300/buildfix-enable-debug.diff:
	* patches/dev300/buildfix-enable-debug-m0.diff:
	* patches/dev300/cjk-character-units-imp.diff:
	* patches/dev300/cjk-character-units-imp-m0.diff:
	* patches/unittesting/unittesting-build-pl.diff:
	* patches/unittesting/unittesting-build-pl-m0.diff:
	* patches/dev300/wizards-source-importwizard-filesmodul-xba.diff:
	* patches/dev300/wizards-source-importwizard-filesmodul-xba-m0.diff:
	* patches/dev300/apply: update for ooo310-m1
	
	* patches/dev300/apply: the following patches are already applied
	  in ooo310-m1:

	    * jvmfwk-libjvm-path-ibm-java-1.6.0.diff
	    * variant-property.diff
	    * i97038-dateserial-fix.diff
	    * speed-registry-links.diff
	    * sw-ww8-fieldandcharstyle.diff
	    * sw-updateindex-crash.diff

	* patches/dev300/apply: temporary disabled
	  split-icons-search-usr-share.diff on ooo310-m1

	I think that the same patches should apply also in dev300-m42 once
	it is available; anyway, we will not support dev300 the following
	frew weeks until we do the ooo-build-3-1 branch



Added:
   trunk/patches/dev300/buildfix-enable-debug-m0.diff   (props changed)
      - copied unchanged from r15330, /trunk/patches/dev300/buildfix-enable-debug.diff
   trunk/patches/dev300/buildfix-fmtargs-m0.diff   (props changed)
      - copied unchanged from r15330, /trunk/patches/dev300/buildfix-fmtargs.diff
   trunk/patches/dev300/cjk-character-units-imp-m0.diff
      - copied unchanged from r15325, /trunk/patches/dev300/cjk-character-units-imp.diff
   trunk/patches/dev300/cjk-character-units-imp.diff
   trunk/patches/dev300/redirect-extensions-m0.diff
      - copied unchanged from r15330, /trunk/patches/dev300/redirect-extensions.diff
   trunk/patches/dev300/wizards-source-importwizard-filesmodul-xba-m0.diff
      - copied unchanged from r15330, /trunk/patches/dev300/wizards-source-importwizard-filesmodul-xba.diff
   trunk/patches/mono/climaker-csharp-win-m0.diff   (props changed)
      - copied unchanged from r15330, /trunk/patches/mono/climaker-csharp-win.diff
   trunk/patches/mono/mono-climaker-m0.diff   (props changed)
      - copied unchanged from r15330, /trunk/patches/mono/mono-climaker.diff
   trunk/patches/unittesting/unittesting-build-pl-m0.diff
      - copied unchanged from r15330, /trunk/patches/unittesting/unittesting-build-pl.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/buildfix-enable-debug.diff
   trunk/patches/dev300/buildfix-fmtargs.diff
   trunk/patches/dev300/redirect-extensions.diff
   trunk/patches/dev300/wizards-source-importwizard-filesmodul-xba.diff
   trunk/patches/mono/climaker-csharp-win.diff
   trunk/patches/unittesting/unittesting-build-pl.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Feb 13 16:56:54 2009
@@ -1,4 +1,4 @@
-
+\
 #
 # The format of this file is: not documented except by example
 #
@@ -275,6 +275,13 @@
 # don't lstat() that much while creating absolute URLs
 speed-sal-fewer-lstats.diff, i#89730, jholesov
 
+[ CJK <= dev300-m41 <= ooo310-m0 ]
+# add a new unit 'character unit'
+cjk-character-units-imp-m0.diff, Amelia Wang
+
+[ CJK > dev300-m41 > ooo310-m0 ]
+# add a new unit 'character unit'
+cjk-character-units-imp.diff, Amelia Wang
 
 [ CJK ]
 #set default CJK font fontsize as 10.5pt
@@ -282,7 +289,6 @@
 
 # add a new unit 'character unit'
 cjk-character-units-ui.diff, Amelia Wang
-cjk-character-units-imp.diff, Amelia Wang
 cjk-character-units-rulers-sync-with-pggrid-fix.diff, Amelia Wang
 cjk-character-units-fix.diff, i#356101, Amelia Wang
 cjk-character-units-fix-376788.diff, i#376788, Amelia Wang
@@ -358,15 +364,20 @@
 # Tell the desktop we support the VFS
 uses-vfs.diff, i#43504, michael
 
-# re-direct to plugins via http://extensions.go-oo.org/
-redirect-extensions.diff
-
 # FIXME: disabled since we need the dep here right now
 # (until the reportbuilderext changed get transferred to DEV300).
 # But then maybe it'll include this fix..
 #[ BuildBits ]
 #reportdesign-useless-jfreereport-dep.diff
 
+[ FixesNotForUpstream <= dev300-m41 <= ooo310-m0 ]
+# re-direct to plugins via http://extensions.go-oo.org/
+redirect-extensions-m0.diff 
+
+[ FixesNotForUpstream  > dev300-m41 > ooo310-m0 ]
+# re-direct to plugins via http://extensions.go-oo.org/
+redirect-extensions.diff
+
 [ FixesNotForUpstream ]
 #upload a new libwpd + fix an exception with condensed paragraphs
 libwpd.diff, fridrich
@@ -407,14 +418,19 @@
 # IMPORTANT: the second part of the patch is build-ant-1.6-swext.diff
 build-ant-1.6.diff, i#90830, pmladek
 
+[ Fixes <= dev300-m41 <= ooo310-m0 ]
+# printf arguments cleanup
+buildfix-fmtargs-m0.diff, cabral
+
+[ Fixes  > dev300-m41 > ooo310-m0 ]
+# printf arguments cleanup
+buildfix-fmtargs.diff, cabral
+
 [ Fixes ]
 # FIXME: Was fixed in m1 as masterfix. I'd bet it will be in m30, too, but...
 # more intelligent nsplugin seeking
 nsplugin-path.diff, i#49590, michael
 
-# printf argumetns cleanup
-buildfix-fmtargs.diff, cabral
-
 # some versions of neon report DAV:Collection instead of Collection
 # thanks Caolan for the fix
 ucb-neon-different-name.diff, i#98288, pmladek
@@ -433,9 +449,16 @@
 # disable font management dialog in padmin
 padmin-nofontconfig.diff, michael
 
+[ Fixes <= dev300-m41 <= ooo310-m0 ]
+# Fix for n#113235
+wizards-source-importwizard-filesmodul-xba-m0.diff, i#56633, noelpwer
+
+[ Fixes > dev300-m41 > ooo310-m0 ]
 # Fix for n#113235
 wizards-source-importwizard-filesmodul-xba.diff, i#56633, noelpwer
 
+[ Fixes ]
+
 # testtool doesn't like oobuild basic compatability defaults
 # ooo-build only fix n#145906#
 automation-testtool-oobuildfix.diff, n#145906, noelpwer
@@ -518,9 +541,6 @@
 # OOo and Java libraries
 shell-senddoc-library-path.diff, i#95873, pmladek
 
-# prefer the "/lib/<arch>/classic/libjvm.so" over /jre/bin/classic/libjvm.so
-# the second causes problems with IBM Java 1.6.0
-jvmfwk-libjvm-path-ibm-java-1.6.0.diff, n#440459, i#95838, pmladek
 
 # fix truncated localized text on sslwarndlg in uui module
 i97329-sslwarndlg-truncation.diff, i#97329, atimar
@@ -531,6 +551,11 @@
 sw-dialogs-resize.diff, i#98164, atimar
 svx-dialogs-resize.diff, i#98164, atimar
 
+[ Fixes < dev300-m42 < ooo310-m1 ]
+# prefer the "/lib/<arch>/classic/libjvm.so" over /jre/bin/classic/libjvm.so
+# the second causes problems with IBM Java 1.6.0
+jvmfwk-libjvm-path-ibm-java-1.6.0.diff, n#440459, i#95838, pmladek
+
 [ TemporaryHacks ]
 # FIXME 2008-11-26: partly applies to dev300-m35 with several "fuzz 2", partly not at all
 #xmloff-field-patch.diff, flr, n#248354
@@ -1018,14 +1043,18 @@
 # Push fonts into the ps stream always
 pushfont-psstream.diff, i#84481, michael
 
+# try autodetection if it is allowed and the current java has been removed
+# crazy hack, I am looking forward for the clean upstream fix
+jvmfwk-detect-removed-java.diff, i#83140, n#336242, pmladek
+
+[ NovellOnlyUnix < dev300-m42 < ooo310-m1 ]
+
 # search also /usr/share for icons
 # it is a temporary hack; we should do more clean FHS compliant installation
 # we need a good plan before, though ;-)
+# FIXME: ooo310-m1 includes another implementation => it needs to rewrite
 split-icons-search-usr-share.diff, n#296502, pmladek
 
-# try autodetection if it is allowed and the current java has been removed
-# crazy hack, I am looking forward for the clean upstream fix
-jvmfwk-detect-removed-java.diff, i#83140, n#336242, pmladek
 
 [ BrokenSystemNSS ]
 
@@ -1490,7 +1519,18 @@
 # the versioned assemblies into the system Global Assembly Cache  (GAC)
 mono-build-keyfile.diff, rodo
 mono-climaker.diff, rodo
+
+[ Mono <= dev300-m41 <= ooo310-m0 ]
+climaker-csharp-win-m0.diff, rodo
+
+[ Mono > dev300-m41 > ooo310-m0 ]
+# FIXME: ooo310-m1: the makefile is quite rewritten;
+#        the pieces removed by the older version of this diff are missing now
+#        it is possible that we would need another change, though
+#        => need to check on Windows
 climaker-csharp-win.diff, rodo
+
+[ Mono ]
 buildfix-climaker-disabled.diff, rodo
 mono-bootstrap-config-and-policy.diff, rodo
 mono-bridge-version.diff, n#361463, rodo
@@ -1640,8 +1680,6 @@
 fix-vba-NOT-trigger-update.diff
 # variant + string
 vba-variant-fix.diff, Fong
-# fix for variant get/set properties
-variant-property.diff, i#93214
 # fix for image import for userform
 userform-image-import-fix.diff
 # spinbutton change wasn't imported correctly
@@ -1664,9 +1702,13 @@
 
 vba-servicemacros-rework.diff
 
-i97038-dateserial-fix.diff, Fong
 forms-imageurl-fix.diff, n#446637, i#97892
 
+[ VBAObjects < dev300-m42 < ooo310-m1 ]
+# fix for variant get/set properties
+variant-property.diff, i#93214
+i97038-dateserial-fix.diff, Fong
+
 [ VBAObjects ]
 # vba for word support
 #vba-word-support.diff, Fong
@@ -2087,6 +2129,8 @@
 speed-store.diff, i#78495, michael
 # don't do a load of locking we don't need to 1% of startup
 speed-store-lck.diff, i#78526, michael
+
+[ Store < dev300-m42 < ooo310-m1 ]
 # don't burn CPU cycles lookup links that are not there
 speed-registry-links.diff, i#96284, michael
 
@@ -2142,14 +2186,19 @@
 autocorrect-accidental-caps-lock-vcl.diff
 
 
+[ UnitTesting <= dev300-m41 <= ooo310-m0 ]
+# teach build.pl what to do with prj/tests.lst's
+unittesting-build-pl-m0.diff
+
+[ UnitTesting > dev300-m41 > ooo310-m0 ]
+# teach build.pl what to do with prj/tests.lst's
+unittesting-build-pl.diff
+
 [ UnitTesting ]
 SectionOwner => jholesov
 SectionIssue => i#87469
 # FIXME: file more issuses when ready
 
-# teach build.pl what to do with prj/tests.lst's
-unittesting-build-pl.diff
-
 # the tests
 unittesting-basebmp.diff
 unittesting-basegfx.diff
@@ -2500,6 +2549,11 @@
 
 sw-do-not-capture-surround-through-objs-patch.diff, n#367341, i#18732, flr
 
+
+[ Fixes < dev300-m42 < ooo310-m1 ]
+sw-ww8-fieldandcharstyle.diff, n#414471, i#93105, fridrich
+sw-updateindex-crash.diff, n#388069, fridrich
+
 [ Fixes ]
 cppcanvas-fix-roundcorners.diff, rodo
 
@@ -2509,12 +2563,8 @@
 slideshow-colorspace-fix.diff, thorsten
 slideshow-cutblack.diff, thorsten
 
-sw-ww8-fieldandcharstyle.diff, n#414471, i#93105, fridrich
-
 unoxml-boost-workaround.diff, thorsten
 
-sw-updateindex-crash.diff, n#388069, fridrich
-
 sw-source-filter-xml-xmltbli-uninitializedvalue.diff, fridrich
 
 # FIXME 2008-11-26: fails for dev300-m35
@@ -2679,6 +2729,11 @@
 # stroke width)
 slideshow-configurable-paintoverlay.diff, i#97972, fredus
 
+[ Fixes <= dev300-m41 <= ooo310-m0 ]
+# several compile fixes for --enable-debug.
+buildfix-enable-debug-m0.diff
+
+[ Fixes > dev300-m41 > ooo310-m0 ]
 # several compile fixes for --enable-debug.
 buildfix-enable-debug.diff
 

Modified: trunk/patches/dev300/buildfix-enable-debug.diff
==============================================================================
--- trunk/patches/dev300/buildfix-enable-debug.diff	(original)
+++ trunk/patches/dev300/buildfix-enable-debug.diff	Fri Feb 13 16:56:54 2009
@@ -1,16 +1,3 @@
-diff --git automation/source/testtool/objtest.cxx automation/source/testtool/objtest.cxx
-index 5a49c7d..ef6c6c0 100644
---- automation/source/testtool/objtest.cxx
-+++ automation/source/testtool/objtest.cxx
-@@ -2581,7 +2581,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
-                                 long aMS = long( aDiff.GetMSFromTime() );
-                                 if ( Abs( aMS - nWait ) > 100 )
-                                 {
--                                    DBG_ERROR1("Wait was off limit by %i", aDiff.GetMSFromTime() - nWait )
-+                                    DBG_ERROR1("Wait was off limit by %i", aDiff.GetMSFromTime() - nWait );
-                                 }
- #endif
- 	                        }
 diff --git basic/source/app/brkpnts.cxx basic/source/app/brkpnts.cxx
 index 79f702b..66cf563 100644
 --- basic/source/app/brkpnts.cxx
@@ -51,16 +38,3 @@
  #endif
  		ULONG nLine = pBrk->nLine-1;
  		ULONG nY = nLine*nLineHeight - nCurYOffset;
-diff --git starmath/source/dialog.cxx starmath/source/dialog.cxx
-index 0fc29fd..413cf89 100644
---- starmath/source/dialog.cxx
-+++ starmath/source/dialog.cxx
-@@ -1874,7 +1874,7 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
-     sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
- 
- #if OSL_DEBUG_LEVEL > 1
--    DBG_ASSERT( pSubsetMap, "SubsetMap missing" )
-+    DBG_ASSERT( pSubsetMap, "SubsetMap missing" );
- #endif
-     if (pSubsetMap)
-     {

Modified: trunk/patches/dev300/buildfix-fmtargs.diff
==============================================================================
--- trunk/patches/dev300/buildfix-fmtargs.diff	(original)
+++ trunk/patches/dev300/buildfix-fmtargs.diff	Fri Feb 13 16:56:54 2009
@@ -1,140 +1,3 @@
---- jvmfwk/source/framework.cxx	2008-06-06 04:37:46.000000000 -0400
-+++ jvmfwk/source/framework.cxx	2009-01-13 13:02:04.000000000 -0500
-@@ -242,7 +242,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         retVal = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return retVal;
-@@ -420,7 +420,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr,"%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-  
-@@ -629,7 +629,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-  
-@@ -718,7 +718,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -846,7 +846,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-  
-@@ -880,7 +880,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -913,7 +913,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -935,7 +935,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -960,7 +960,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
- 
-@@ -985,7 +985,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -1008,7 +1008,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -1031,7 +1031,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -1055,7 +1055,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-  
-@@ -1081,7 +1081,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     return errcode;
-@@ -1106,7 +1106,7 @@
-     catch (jfw::FrameworkException& e)
-     {
-         errcode = e.errorCode;
--        fprintf(stderr, e.message.getStr());
-+        fprintf(stderr, "%s", e.message.getStr());
-         OSL_ENSURE(0, e.message.getStr());
-     }
-     
 --- setup_native/source/ulfconv/ulfconv.cxx	2008-04-10 06:07:37.000000000 -0400
 +++ setup_native/source/ulfconv/ulfconv.cxx	2009-01-15 15:15:23.000000000 -0500
 @@ -348,7 +348,7 @@
@@ -308,15 +171,15 @@
 
 --- fpicker/source/unx/gnome/SalGtkFilePicker.cxx 2009-01-20 10:40:09.000000000 -0500
 +++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx      2009-01-20 17:43:26.000000000 -0500
-@@ -1024,7 +1024,7 @@
+@@ -1061,7 +1061,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::exe
                                  GTK_DIALOG_MODAL,
-                                                                GTK_MESSAGE_QUESTION,
-                                                                GTK_BUTTONS_YES_NO,
+ 								GTK_MESSAGE_QUESTION,
+ 								GTK_BUTTONS_YES_NO,
 -                                  OUStringToOString(
 +                                  "\"%s\"", OUStringToOString(
                                      aResProvider.getResString( FILE_PICKER_OVERWRITE ),
                                      RTL_TEXTENCODING_UTF8 ).getStr() );
-
+ 
 diff -p -up ./icc/mdv-fmtargs-buildfix.patch.orig0 ./icc/mdv-fmtargs-buildfix.patch
 --- /dev/null     2009-01-20 13:40:58.000000000 -0500
 +++ icc/mdv-fmtargs-buildfix.patch    2009-01-20 13:37:59.000000000 -0500

Added: trunk/patches/dev300/cjk-character-units-imp.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/cjk-character-units-imp.diff	Fri Feb 13 16:56:54 2009
@@ -0,0 +1,599 @@
+diff -purN svtools.old/inc/ruler.hxx svtools/inc/ruler.hxx
+--- svtools.old/inc/ruler.hxx	2009-02-12 14:57:50.000000000 +0100
++++ svtools/inc/ruler.hxx	2009-02-13 11:11:54.000000000 +0100
+@@ -693,6 +693,10 @@ private:
+     USHORT              mnExtraStyle;
+     USHORT              mnExtraClicks;
+     USHORT              mnExtraModifier;
++// Amelia
++    long                mnCharWidth;
++    long                mnLineHeight;
++
+     RulerExtra          meExtraType;
+     RulerType           meDragType;
+     MapUnit             meSourceUnit;
+@@ -872,6 +876,9 @@ public:
+ 
+     //set text direction right-to-left
+     void                SetTextRTL(BOOL bRTL);
++
++    void                SetCharWidth( long nWidth ) { mnCharWidth = nWidth ; }
++    void                SetLineHeight( long nHeight ) { mnLineHeight = nHeight ; }
+ };
+ 
+ #endif  // _RULER_HXX
+diff -purN svtools.old/source/control/ruler.cxx svtools/source/control/ruler.cxx
+--- svtools.old/source/control/ruler.cxx	2009-02-12 14:57:43.000000000 +0100
++++ svtools/source/control/ruler.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -470,6 +470,25 @@ void Ruler::ImplDrawTicks( long nMin, lo
+     long    nY;
+     BOOL    bNoTicks = FALSE;
+ 
++    //Amelia
++    long    nTickUnit ;
++    long    nTick2 ;
++    if ( mnUnitIndex == RULER_UNIT_CHAR )
++    {
++        nTick3 = mnCharWidth;
++        nTickCount = mnCharWidth;
++        nTickUnit = mnCharWidth;
++        nTick2 = mnCharWidth;
++    }
++    else if ( mnUnitIndex == RULER_UNIT_LINE )
++    {
++        nTick3 = mnLineHeight;
++        nTickCount = mnLineHeight;
++        nTickUnit = mnLineHeight;
++        nTick2 = mnLineHeight;
++    }
++    aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode );
++
+     // Groessenvorberechnung
+     BOOL bVertRight = FALSE;
+ 	if ( mnWinStyle & WB_HORZ )
+@@ -490,7 +509,11 @@ void Ruler::ImplDrawTicks( long nMin, lo
+     long nMaxWidth = maVirDev.PixelToLogic( Size( mpData->nPageWidth, 0 ), maMapMode ).Width();
+     if ( nMaxWidth < 0 )
+         nMaxWidth *= -1;
+-    nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit;
++// Amelia
++    if (( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE ))
++        nMaxWidth /= nTickUnit; 
++    else
++        nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit;
+     UniString aNumStr( UniString::CreateFromInt32( nMaxWidth ) );
+     long nTxtWidth = GetTextWidth( aNumStr );
+     if ( (nTxtWidth*2) > nTickWidth )
+@@ -570,7 +593,11 @@ void Ruler::ImplDrawTicks( long nMin, lo
+                 // Tick3 - Ausgabe (Text)
+                 if ( !(nTick % nTick3) )
+                 {
+-                    aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit );
++                    //aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit );
++                    if ( ( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE ) )
++                        aNumStr = UniString::CreateFromInt32( nTick / nTickUnit );
++                    else 
++                        aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit );
+                     nTxtWidth2 = GetTextWidth( aNumStr )/2;
+ 
+                     nX = nStart+n;
+@@ -597,7 +624,10 @@ void Ruler::ImplDrawTicks( long nMin, lo
+                 // Tick/Tick2 - Ausgabe (Striche)
+                 else
+                 {
+-                    if ( !(nTick % aImplRulerUnitTab[mnUnitIndex].nTick2) )
++		/// Amelia
++                    if ( ( mnUnitIndex != RULER_UNIT_CHAR ) && ( mnUnitIndex != RULER_UNIT_LINE ) )
++                        nTick2 = aImplRulerUnitTab[mnUnitIndex].nTick2;
++                    if ( !(nTick % nTick2 ) )
+                         nTickWidth = RULER_TICK2_WIDTH;
+                     else
+                         nTickWidth = RULER_TICK1_WIDTH;
+@@ -2807,6 +2837,12 @@ void Ruler::SetUnit( FieldUnit eNewUnit
+             case FUNIT_PICA:
+                 mnUnitIndex = RULER_UNIT_PICA;
+                 break;
++            case FUNIT_CHAR:
++                mnUnitIndex = RULER_UNIT_CHAR;
++                break;
++            case FUNIT_LINE:
++                mnUnitIndex = RULER_UNIT_LINE;
++                break;
+             default:
+ #ifdef DBG_UTIL
+                 DBG_ERRORFILE( "Ruler::SetUnit() - Wrong Unit" );
+diff -purN svx.old/inc/dlgutil.hxx svx/inc/dlgutil.hxx
+--- svx.old/inc/dlgutil.hxx	2009-02-12 14:57:31.000000000 +0100
++++ svx/inc/dlgutil.hxx	2009-02-13 11:11:54.000000000 +0100
+@@ -58,6 +58,7 @@ SVX_DLLPUBLIC void SetFieldUnit( MetricB
+ 				   FieldUnit eUnit, BOOL bAll = FALSE );
+ 
+ SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet = NULL );
++SVX_DLLPUBLIC  BOOL GetApplyCharUnit( const SfxItemSet* pSet = NULL );
+ 
+ // Metriken umrechnen
+ SVX_DLLPUBLIC long 		CalcToUnit( float nIn, SfxMapUnit eUnit );
+diff -purN svx.old/source/dialog/dlgutil.cxx svx/source/dialog/dlgutil.cxx
+--- svx.old/source/dialog/dlgutil.cxx	2009-02-12 14:57:23.000000000 +0100
++++ svx/source/dialog/dlgutil.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -43,6 +43,10 @@
+ #include <sfx2/viewfrm.hxx>
+ #include <sfx2/objsh.hxx>
+ 
++#ifndef _SFXENUMITEM_HXX
++#include <svtools/eitem.hxx>
++#endif
++
+ #include <svx/dialogs.hrc>
+ 
+ #include "dlgutil.hxx"
+@@ -112,6 +116,9 @@ void SetFieldUnit( MetricField& rField,
+ 	rField.SetUnit( eUnit );
+ 	switch( eUnit )
+ 	{
++		// Amelia : sets the step of "char" and "line" unit , they are same as FUNIT_MM
++		case FUNIT_CHAR:
++		case FUNIT_LINE:
+ 		case FUNIT_MM:
+ 			rField.SetSpinSize( 50 );
+ 			break;
+@@ -209,6 +216,36 @@ FieldUnit GetModuleFieldUnit( const SfxI
+ 	}
+ 	return eUnit;
+ }
++// -----------------------------------------------------------------------
++BOOL GetApplyCharUnit( const SfxItemSet* pSet )
++{
++	BOOL  bUseCharUnit = FALSE;
++	const SfxPoolItem* pItem = NULL;
++	if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_APPLYCHARUNIT, FALSE, &pItem ) )
++		bUseCharUnit = (BOOL)( (const SfxBoolItem*)pItem )->GetValue();
++	else
++	{
++		SfxViewFrame* pFrame = SfxViewFrame::Current();
++		SfxObjectShell* pSh = NULL;
++		if ( pFrame )
++		pSh = pFrame->GetObjectShell();
++ 		if ( pSh )  // #93209# the object shell is not always available during reload
++ 		{
++			SfxModule* pModule = pSh->GetModule();
++			if ( pModule )
++			{
++				const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_APPLYCHARUNIT );
++				if ( pItem )
++					bUseCharUnit = (BOOL)( (SfxBoolItem*)pItem )->GetValue();
++			}
++			else
++			{
++				DBG_ERRORFILE( "GetApplyCharUnit(): no module found" );
++			}
++		}
++	}
++	return bUseCharUnit;
++}
+ 
+ // -----------------------------------------------------------------------
+ void SetMetricValue( MetricField& rField, long nCoreValue, SfxMapUnit eUnit )
+diff -purN svx.old/source/dialog/paragrph.cxx svx/source/dialog/paragrph.cxx
+--- svx.old/source/dialog/paragrph.cxx	2009-02-12 14:57:23.000000000 +0100
++++ svx/source/dialog/paragrph.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -460,11 +460,20 @@ void SvxStdParagraphTabPage::Reset( cons
+ 
+ 	// Metrik einstellen
+ 	FieldUnit eFUnit = GetModuleFieldUnit( &rSet );
++
++	BOOL bApplyCharUnit = sal_False ;
++	bApplyCharUnit = GetApplyCharUnit( &rSet );
++
++	if ( bApplyCharUnit )
++		eFUnit = FUNIT_CHAR;  // Amelia
+ 	SetFieldUnit( aLeftIndent, eFUnit );
+ 	SetFieldUnit( aRightIndent, eFUnit );
+ 	SetFieldUnit( aFLineIndent, eFUnit );
++	if ( bApplyCharUnit )
++		eFUnit = FUNIT_LINE;   // Amelia
+ 	SetFieldUnit( aTopDist, eFUnit );
+ 	SetFieldUnit( aBottomDist, eFUnit );
++	eFUnit = FUNIT_POINT;
+ 	SetFieldUnit( aLineDistAtMetricBox, eFUnit );
+ 
+     USHORT _nWhich = GetWhich( SID_ATTR_LRSPACE );
+diff -purN sw.old/inc/swmodule.hxx sw/inc/swmodule.hxx
+--- sw.old/inc/swmodule.hxx	2009-02-12 14:53:46.000000000 +0100
++++ sw/inc/swmodule.hxx	2009-02-13 11:11:54.000000000 +0100
+@@ -169,6 +169,8 @@ public:
+     //default page mode for text grid 
+     void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode);
+ 
++	void ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb);  // apply_char_unit
++
+ 	// ConfigItems erzeugen
+ 	SwModuleOptions*    GetModuleConfig()		{ return pModuleConfig;}
+ 	SwPrintOptions* 	GetPrtOptions(sal_Bool bWeb);
+diff -purN sw.old/source/ui/app/appopt.cxx sw/source/ui/app/appopt.cxx
+--- sw.old/source/ui/app/appopt.cxx	2009-02-12 14:53:36.000000000 +0100
++++ sw/source/ui/app/appopt.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -139,6 +139,7 @@ SfxItemSet*	 SwModule::CreateItemSet( US
+ 									FN_PARAM_WRTSHELL,		FN_PARAM_WRTSHELL,
+ 									FN_PARAM_ADDPRINTER, 	FN_PARAM_ADDPRINTER,
+ 									SID_ATTR_METRIC,		SID_ATTR_METRIC,
++									SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
+ 									SID_ATTR_DEFTABSTOP, 	SID_ATTR_DEFTABSTOP,
+ 									RES_BACKGROUND,			RES_BACKGROUND,
+ 									SID_HTML_MODE,			SID_HTML_MODE,
+@@ -370,6 +371,15 @@ void SwModule::ApplyItemSet( USHORT nId,
+ 		const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
+ 		::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog);
+ 	}
++
++	if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT,
++													FALSE, &pItem ) )
++	{
++		SFX_APP()->SetOptions(rSet);
++		const SfxBoolItem* pCharItem = (const SfxBoolItem*)pItem;
++		::SetApplyCharUnit(pCharItem->GetValue(), !bTextDialog);
++	}
++
+     if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC,
+ 													FALSE, &pItem ) )
+ 	{
+diff -purN sw.old/source/ui/app/swmodul1.cxx sw/source/ui/app/swmodul1.cxx
+--- sw.old/source/ui/app/swmodul1.cxx	2009-02-12 14:53:36.000000000 +0100
++++ sw/source/ui/app/swmodul1.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -311,6 +311,63 @@ void SwModule::ApplyRulerMetric( FieldUn
+         pTmpView = SwModule::GetNextView(pTmpView);
+     }
+ }
++
++/*-------------------------------------------------
++set the usrpref 's char unit attribute and set ruler
++'s unit as char if the "apply char unit" is checked
++--------------------------------------------------*/
++void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb)
++{
++	SwMasterUsrPref* pPref;
++	if(bWeb)
++	{
++		if(!pWebUsrPref)
++		GetUsrPref(sal_True);
++		pPref = pWebUsrPref;
++	}
++	else
++	{
++		if(!pUsrPref)
++		GetUsrPref(sal_False);
++		pPref = pUsrPref;
++	}
++	BOOL  bOldApplyCharUnit = pPref->IsApplyCharUnit();
++	BOOL    bHasChanged = FALSE;
++	if(bOldApplyCharUnit != bApplyChar)
++	{
++		pPref->SetApplyCharUnit(bApplyChar);
++		bHasChanged = TRUE;
++	}
++
++	if( !bHasChanged )
++		return;
++
++	FieldUnit eHScrollMetric = pPref->IsHScrollMetric() ? pPref->GetHScrollMetric() : pPref->GetMetric();
++	FieldUnit eVScrollMetric = pPref->IsVScrollMetric() ? pPref->GetVScrollMetric() : pPref->GetMetric();
++	if(bApplyChar)
++	{
++		eHScrollMetric = FUNIT_CHAR;
++		eVScrollMetric = FUNIT_LINE;
++	}
++	else
++	{
++		eHScrollMetric = FUNIT_CM;
++		eVScrollMetric = FUNIT_CM;
++	}
++	SwView* pTmpView = SwModule::GetFirstView();
++	// fuer alle MDI-Fenster das Lineal umschalten
++	while(pTmpView)
++	{
++		if(bWeb == (0 != PTR_CAST(SwWebView, pTmpView)))
++		{
++			pTmpView->ChangeVLinealMetric(eVScrollMetric);
++			pTmpView->ChangeTabMetric(eHScrollMetric);
++		}
++
++		pTmpView = SwModule::GetNextView(pTmpView);
++	}
++}
++
+ /*-----------------13.11.96 11.57-------------------
+ 
+ --------------------------------------------------*/
+diff -purN sw.old/source/ui/config/optload.cxx sw/source/ui/config/optload.cxx
+--- sw.old/source/ui/config/optload.cxx	2009-02-12 14:53:43.000000000 +0100
++++ sw/source/ui/config/optload.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -222,6 +222,12 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet
+ 					(USHORT)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
+         bRet = TRUE;
+     }
++
++	if(aUseCharUnit.IsChecked() != aUseCharUnit.GetSavedValue())
++	{
++		rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, aUseCharUnit.IsChecked()));
++		bRet = TRUE;
++	}
+     
+     sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked();
+     if ( bIsSquaredPageModeFlag != aUseSquaredPageMode.GetSavedValue() )
+@@ -309,6 +315,17 @@ void __EXPORT SwLoadOptPage::Reset( cons
+ 		aUseSquaredPageMode.Check( bSquaredPageMode );
+    	 	aUseSquaredPageMode.SaveValue();
+ 	}
++
++	if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, FALSE, &pItem))
++	{
++		BOOL bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue();
++		aUseCharUnit.Check(bUseCharUnit);
++	}
++	else
++	{
++		aUseCharUnit.Check(pUsrPref->IsApplyCharUnit());
++	}
++	aUseCharUnit.SaveValue();
+ }
+ /*-----------------13.01.97 14.44-------------------
+ 	Metric des Deftabstops umschalten
+diff -purN sw.old/source/ui/config/usrpref.cxx sw/source/ui/config/usrpref.cxx
+--- sw.old/source/ui/config/usrpref.cxx	2009-02-12 14:53:43.000000000 +0100
++++ sw/source/ui/config/usrpref.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -266,9 +266,10 @@ Sequence<OUString> SwLayoutViewConfig::G
+         "Window/IsVerticalRulerRight",      //15
+         "ViewLayout/Columns",               //16
+         "ViewLayout/BookMode",              //17
+-        "Other/IsSquaredPageMode"           //18
++        "Other/IsSquaredPageMode",        //18
++        "Other/ApplyCharUnit"               //19
+     };
+-    const int nCount = bWeb ? 14 : 19;
++    const int nCount = bWeb ? 14 : 20;
+     Sequence<OUString> aNames(nCount);
+ 	OUString* pNames = aNames.getArray();
+ 	for(int i = 0; i < nCount; i++)
+@@ -335,8 +336,9 @@ void SwLayoutViewConfig::Commit()
+             case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns",
+             case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode",
+             case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode",
++            case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/IsApplyCharUnit",
+         }
+-        if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 )
++        if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 )
+ 			pValues[nProp].setValue(&bSet, ::getBooleanCppuType());
+ 	}
+ 	PutProperties(aNames, aValues);
+@@ -356,7 +358,7 @@ void SwLayoutViewConfig::Load()
+ 		{
+ 			if(pValues[nProp].hasValue())
+ 			{
+-                sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False;
++                sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 || nProp == 19 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False;
+                 switch(nProp)
+ 				{
+                     case  0: rParent.SetCrossHair(bSet); break;// "Line/Guide",
+@@ -422,6 +424,7 @@ void SwLayoutViewConfig::Load()
+                     break;// "ViewLayout/Columns",
+                     case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
+                     case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode",
++                    case 19: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar"
+                 }
+ 			}
+ 		}
+diff -purN sw.old/source/ui/inc/pggrid.hxx sw/source/ui/inc/pggrid.hxx
+--- sw.old/source/ui/inc/pggrid.hxx	2009-02-12 14:53:45.000000000 +0100
++++ sw/source/ui/inc/pggrid.hxx	2009-02-13 11:11:54.000000000 +0100
+@@ -79,7 +79,7 @@ class SwTextGridPage: public SfxTabPage
+     FixedText       aColorFT;
+     ColorListBox    aColorLB;
+ 
+-    Window*         aControls[18];
++    Window*         aControls[20];
+ 
+     sal_Int32       m_nRubyUserValue;
+     sal_Bool        m_bRubyUserValue;
+diff -purN sw.old/source/ui/inc/uitool.hxx sw/source/ui/inc/uitool.hxx
+--- sw.old/source/ui/inc/uitool.hxx	2009-02-12 14:53:45.000000000 +0100
++++ sw/source/ui/inc/uitool.hxx	2009-02-13 11:11:54.000000000 +0100
+@@ -76,6 +76,9 @@ void SfxToSwPageDescAttr( const SwWrtShe
+ SW_DLLPUBLIC FieldUnit	GetDfltMetric(BOOL bWeb);
+ void		SetDfltMetric(FieldUnit	eMetric, BOOL bWeb);
+ 
++SW_DLLPUBLIC BOOL HasCharUnit( BOOL bWeb );
++void SetApplyCharUnit(BOOL bApplyChar, BOOL bWeb);
++
+ // ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
+ SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted = FALSE, BOOL bWithDefault = FALSE);
+ 
+diff -purN sw.old/source/ui/inc/usrpref.hxx sw/source/ui/inc/usrpref.hxx
+--- sw.old/source/ui/inc/usrpref.hxx	2009-02-12 14:53:45.000000000 +0100
++++ sw/source/ui/inc/usrpref.hxx	2009-02-13 11:11:54.000000000 +0100
+@@ -152,6 +152,7 @@ class SwMasterUsrPref : public SwViewOpt
+     SwCursorConfig      aCursorConfig;
+     SwWebColorConfig*   pWebColorConfig;
+ 
++    sal_Bool bApplyCharUnit; // apply_char_unit
+ public:
+ 	SwMasterUsrPref(BOOL bWeb);
+ 	~SwMasterUsrPref();
+@@ -253,6 +254,17 @@ public:
+                         aLayoutConfig.SetModified();
+                 }
+ 
++    sal_Bool    IsApplyCharUnit() const
++    {
++        return bApplyCharUnit;
++    }
++    void   SetApplyCharUnit(BOOL bSet, sal_Bool bNoModify = sal_False)
++    {
++        bApplyCharUnit = bSet;
++        if(!bNoModify)
++            aLayoutConfig.SetModified();
++    }
++
+     sal_Int32   GetDefTab() const { return nDefTab;}
+     void        SetDefTab( sal_Int32  nSet, sal_Bool bNoModify = sal_False )
+                 {
+diff -purN sw.old/source/ui/misc/pggrid.cxx sw/source/ui/misc/pggrid.cxx
+--- sw.old/source/ui/misc/pggrid.cxx	2009-02-12 14:53:41.000000000 +0100
++++ sw/source/ui/misc/pggrid.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -116,7 +116,9 @@ SwTextGridPage::SwTextGridPage(Window *p
+     aControls[14] =&aPrintCB;
+     aControls[15] =&aColorFT;
+     aControls[16] =&aColorLB;
+-    aControls[17] =0;
++    aControls[17] =&aLinesRangeFT;
++    aControls[18] =&aCharsRangeFT;
++    aControls[19] =0;
+ 
+     Link aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
+     aCharsPerLineNF.SetUpHdl(aLink);
+@@ -312,6 +314,10 @@ void SwTextGridPage::PutGridItem(SfxItem
+         aGridItem.SetPrintGrid(aPrintCB.IsChecked());
+         aGridItem.SetColor(aColorLB.GetSelectEntryColor());
+         rSet.Put(aGridItem);
++/// Amelia
++        SwView * pView = ::GetActiveView();
++        pView->GetHLineal().SetCharWidth((long)(aCharWidthMF.GetValue(FUNIT_TWIP)/56.7));
++        pView->GetVLineal().SetLineHeight((long)(aTextSizeMF.GetValue(FUNIT_TWIP)/56.7));
+ }
+ /* -----------------------------08.02.2002 10:54------------------------------
+ 
+@@ -416,6 +422,10 @@ IMPL_LINK(SwTextGridPage, CharorLineChan
+             long nHeight = static_cast< sal_Int32 >(m_aPageSize.Height() / aLinesPerPageNF.GetValue());
+             aTextSizeMF.SetValue(aTextSizeMF.Normalize(nHeight), FUNIT_TWIP);
+             aRubySizeMF.SetValue(0, FUNIT_TWIP);
++            String aMaxLinesFTStr = String::CreateFromAscii("( 1 - ");
++            aMaxLinesFTStr += String::CreateFromInt32(aLinesPerPageNF.GetValue());
++            aMaxLinesFTStr += String::CreateFromAscii(" )");
++            aLinesRangeFT.SetText( aMaxLinesFTStr );
+             
+             m_nRubyUserValue = nHeight;
+             m_bRubyUserValue = sal_True;
+@@ -424,6 +434,10 @@ IMPL_LINK(SwTextGridPage, CharorLineChan
+         {
+             long nWidth = static_cast< sal_Int32 >(m_aPageSize.Width() / aCharsPerLineNF.GetValue());
+             aCharWidthMF.SetValue(aCharWidthMF.Normalize(nWidth), FUNIT_TWIP);
++            String aMaxCharsFTStr = String::CreateFromAscii("( 1 - ");
++            aMaxCharsFTStr += String::CreateFromInt32(aCharsPerLineNF.GetValue());
++            aMaxCharsFTStr += String::CreateFromAscii(" )");
++            aCharsRangeFT.SetText( aMaxCharsFTStr );
+         }
+     }
+     GridModifyHdl(0);
+@@ -439,7 +453,6 @@ IMPL_LINK(SwTextGridPage, TextSizeChange
+         if (&aTextSizeMF == pField)
+         {
+             sal_Int32 nTextSize = static_cast< sal_Int32 >(aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP)));
+-            aCharsPerLineNF.SetValue(m_aPageSize.Width() / nTextSize);
+             m_bRubyUserValue = sal_False;
+         }
+ 		//set maximum line per page
+@@ -457,14 +470,22 @@ IMPL_LINK(SwTextGridPage, TextSizeChange
+             sal_Int32 nTextSize = static_cast< sal_Int32 >(aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP)));
+             aLinesPerPageNF.SetValue(m_aPageSize.Height() / nTextSize);
+             m_bRubyUserValue = sal_False;
++            String aRangesStr = String::CreateFromAscii("( 1 - ");
++            aRangesStr += String::CreateFromInt32( m_aPageSize.Height() / nTextSize );
++            aRangesStr += String::CreateFromAscii(" )");
++            aLinesRangeFT.SetText( aRangesStr );
+         }
+         else if (&aCharWidthMF == pField)
+         {
+             sal_Int32 nTextWidth = static_cast< sal_Int32 >(aCharWidthMF.Denormalize(aCharWidthMF.GetValue(FUNIT_TWIP)));
++            sal_Int32 nMaxChar = 45 ;
+             if (nTextWidth)
+-                aCharsPerLineNF.SetValue(m_aPageSize.Width() / nTextWidth); 
+-            else
+-                aCharsPerLineNF.SetValue( 45 );
++                nMaxChar = m_aPageSize.Width() / nTextWidth;
++            aCharsPerLineNF.SetValue( nMaxChar );
++            String aCharRangeStr = String::CreateFromAscii("( 1 - ");
++            aCharRangeStr += String::CreateFromInt32( nMaxChar );
++            aCharRangeStr += String::CreateFromAscii(" )");
++            aCharsRangeFT.SetText( aCharRangeStr );
+         }
+         //rubySize is disabled
+     }
+@@ -492,6 +513,7 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, R
+ 	{
+ 		aCharsPerLineFT.Enable(sal_False);
+ 		aCharsPerLineNF.Enable(sal_False);
++		aCharsRangeFT.Enable(sal_False);
+ 		aCharWidthFT.Enable(sal_False);
+ 		aCharWidthMF.Enable(sal_False);
+ 	}
+diff -purN sw.old/source/ui/shells/textsh1.cxx sw/source/ui/shells/textsh1.cxx
+--- sw.old/source/ui/shells/textsh1.cxx	2009-02-12 14:53:41.000000000 +0100
++++ sw/source/ui/shells/textsh1.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -854,6 +854,10 @@ void SwTextShell::Execute(SfxRequest &rR
+ 		{
+             FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
+             SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
++
++            BOOL bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
++            SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit));
++
+             SfxItemSet aCoreSet( GetPool(),
+                             RES_PARATR_BEGIN,           RES_PARATR_END - 1,
+                             // --> OD 2008-02-25 #refactorlists#
+diff -purN sw.old/source/ui/uiview/view.cxx sw/source/ui/uiview/view.cxx
+--- sw.old/source/ui/uiview/view.cxx	2009-02-12 14:53:44.000000000 +0100
++++ sw/source/ui/uiview/view.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -170,6 +170,7 @@
+ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+ 
+ 
++
+ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::lang;
+@@ -1009,9 +1010,21 @@ SwView::SwView( SfxViewFrame *_pFrame, S
+     pVRuler->SetZoom( aZoomFract );
+     pHRuler->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick ));
+     FieldUnit eMetric = pUsrPref->GetHScrollMetric();
+-    pHRuler->SetUnit( eMetric );
++
++    BOOL bApplyCharUnit = pUsrPref->IsApplyCharUnit();
++    if ( bApplyCharUnit )
++        pHRuler->SetUnit( FUNIT_CHAR );
++    else
++        pHRuler->SetUnit( eMetric );
++
+     eMetric = pUsrPref->GetVScrollMetric();
+-    pVRuler->SetUnit( eMetric );
++    if ( bApplyCharUnit )
++        pVRuler->SetUnit(FUNIT_LINE);
++    else
++        pVRuler->SetUnit( eMetric );
++
++        pHRuler->SetCharWidth( 371 );  // default character width
++        pVRuler->SetLineHeight( 551 );  // default line height
+ 
+ 	// DocShell setzen
+ 	pDocSh->SetView( this );
+diff -purN sw.old/source/ui/utlui/uitool.cxx sw/source/ui/utlui/uitool.cxx
+--- sw.old/source/ui/utlui/uitool.cxx	2009-02-12 14:53:42.000000000 +0100
++++ sw/source/ui/utlui/uitool.cxx	2009-02-13 11:11:54.000000000 +0100
+@@ -738,6 +738,19 @@ String GetAppLangDateTimeString( const D
+ 	return sRet;
+ }
+ 
++/*----------------------------------------------------------------------------
++ * add a new function which can get and set the current "SID_ATTR_APPLYCHARUNIT" value
++ *---------------------------------------------------------------------------*/
++BOOL HasCharUnit( BOOL bWeb)
++{
++    return SW_MOD()->GetUsrPref(bWeb)->IsApplyCharUnit();
++}
++
++void SetApplyCharUnit(BOOL bApplyChar, BOOL bWeb)
++{
++    SW_MOD()->ApplyUserCharUnit(bApplyChar, bWeb);
++}
++
+ /*-- 26.01.2006 08:06:33---------------------------------------------------
+ 
+   -----------------------------------------------------------------------*/

Modified: trunk/patches/dev300/redirect-extensions.diff
==============================================================================
--- trunk/patches/dev300/redirect-extensions.diff	(original)
+++ trunk/patches/dev300/redirect-extensions.diff	Fri Feb 13 16:56:54 2009
@@ -18,15 +18,15 @@
 ===================================================================
 --- reportdesign/registry/schema/org/openoffice/Office/ReportDesign.xcs
 +++ reportdesign/registry/schema/org/openoffice/Office/ReportDesign.xcs
-@@ -61,7 +61,7 @@
-                         <author>LLA</author>
-                         <desc>Direct download URL to the Sun(tm) Report Builder extension.</desc>
-                     </info>
--                    <value>http://extensions.services.openoffice.org</value>
-+                    <value>http://extensions.go-oo.org</value>
-                 </prop>
-                 <prop oor:name="Name" oor:type="xs:string">
-                     <info>
+@@ -55,7 +55,7 @@
+                     <author>LLA</author>
+                     <desc>Direct download URL to the Sun(tm) Report Builder extension.</desc>
+                 </info>
+-                <value>http://extensions.services.openoffice.org</value>
++                <value>http://extensions.go-oo.org</value>
+             </prop>
+             <prop oor:name="Name" oor:type="xs:string">
+                 <info>
 Index: officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
 ===================================================================
 RCS file: /cvs/util/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu,v
@@ -93,16 +93,15 @@
 diff -u -p -r1.82 templwin.cxx
 --- svtools/source/contnr/templwin.cxx	4 Jun 2008 10:50:40 -0000	1.82
 +++ svtools/source/contnr/templwin.cxx	13 Aug 2008 15:58:57 -0000
-@@ -1732,7 +1738,7 @@ void SvtDocumentTemplateDialog::InitImpl
+@@ -1743,7 +1743,7 @@ void SvtDocumentTemplateDialog::InitImpl
  	pImpl->aTitle = GetText();
  
      aMoreTemplatesLink.SetURL( String(
--        RTL_CONSTASCII_STRINGPARAM( "http://extensions.services.openoffice.org/templates?cid=923508"; ) ) );
-+        RTL_CONSTASCII_STRINGPARAM( "http://extensions.go-oo.org/templates?cid=923508"; ) ) );
+-        RTL_CONSTASCII_STRINGPARAM( "http://templates.services.openoffice.org/?cid=923508"; ) ) );
++        RTL_CONSTASCII_STRINGPARAM( "http://templates.go-oo.org/?cid=923508"; ) ) );
      aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) );
  
      aManageBtn.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OrganizerHdl_Impl ) );
-
 Index: instsetoo_native/util/openoffice.lst
 ===================================================================
 RCS file: /cvs/installation/instsetoo_native/util/openoffice.lst,v

Modified: trunk/patches/dev300/wizards-source-importwizard-filesmodul-xba.diff
==============================================================================
--- trunk/patches/dev300/wizards-source-importwizard-filesmodul-xba.diff	(original)
+++ trunk/patches/dev300/wizards-source-importwizard-filesmodul-xba.diff	Fri Feb 13 16:56:54 2009
@@ -1,11 +1,10 @@
 --- wizards.orig/source/importwizard/FilesModul.xba	2005-05-13 10:43:43.000000000 +0100
 +++ wizards/source/importwizard/FilesModul.xba	2005-10-24 15:49:21.000000000 +0100
-@@ -41,6 +41,8 @@
+@@ -41,6 +41,7 @@ Dim NewContentList() as String
  Dim XMLTemplateContentString as String
  Dim ApplIndex as Integer
  Dim bAssignFileName as Boolean
-+Dim oDocInfo as Object
 +Dim bInterruptSearch as Boolean
- 	oDocInfo = CreateUnoService(&quot;com.sun.star.document.StandaloneDocumentInfo&quot;)
  	bInterruptSearch = False
  	For i = 0 To MaxCollectIndex
+ 		SearchDir = PathCollection(i,0)

Modified: trunk/patches/mono/climaker-csharp-win.diff
==============================================================================
--- trunk/patches/mono/climaker-csharp-win.diff	(original)
+++ trunk/patches/mono/climaker-csharp-win.diff	Fri Feb 13 16:56:54 2009
@@ -307,77 +307,3 @@
                               float *tFloat, double *tDouble)
      {
          reflection::XConstantTypeDescription* xtd = (reflection::XConstantTypeDescription*) ptr;
-diff -rup cli_ure-bak/source/climaker/makefile.mk cli_ure/source/climaker/makefile.mk
---- cli_ure-bak/source/climaker/makefile.mk	2007-03-29 16:22:58.000000000 +0200
-+++ cli_ure/source/climaker/makefile.mk	2007-03-29 16:26:16.000000000 +0200
-@@ -103,47 +103,29 @@ UNOTYPES = \
- 	com.sun.star.reflection.XSingletonTypeDescription2		\
- 	com.sun.star.reflection.XStructTypeDescription
- 
--CFLAGSCXX +=-AI$(BIN)
--
--
--# When compiling for CLR, disable "warning C4339: use of undefined type detected
--# in CLR meta-data - use of this type may lead to a runtime exception":
--.IF "$(COMEX)"=="10"
--CFLAGSCXX += -clr:noAssembly -wd4339
--.ELSE
--CFLAGSCXX += -clr:oldSyntax -LN -wd4339 -wd4715
--.ENDIF
--
--OBJFILES = \
--	$(OBJ)$/climaker_app.obj	\
--	$(OBJ)$/climaker_emit.obj
--
--APP1TARGET = $(TARGET)
--APP1OBJS = $(OBJFILES)
--
--
--APP1STDLIBS = \
--	$(CPPUHELPERLIB)		\
--	$(CPPULIB)			\
--	$(SALLIB)			\
--	mscoree.lib
--
--.IF "$(CCNUMVER)" >= "001399999999"
--APP1STDLIBS += \
--	msvcmrt.lib
--.ENDIF
--
--.ENDIF
--
--
--
--.INCLUDE : $(PRJ)$/util$/target.pmk
--.INCLUDE :  target.mk
--
--.IF "$(BUILD_FOR_CLI)" != ""
--
--$(OBJFILES): $(BIN)$/cli_basetypes.dll
--
-+
-+# Comment out - it seems this is no longer necessary (?)
-+
-+#SLOFILES = $(SLO)$/climaker_mono.obj
-+#SHL1OBJS=$(SLOFILES)
-+#SHL1STDLIBS=$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB)
-+#SHL1TARGET=$(TARGET)
-+#SHL1IMPLIB=i$(TARGET).lib
-+#SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-+#SHL1VERSIONMAP=climaker.map
-+#
-+#DEF1NAME=$(SHL1TARGET)
-+#
-+#ALLTAR : $(BIN)/climaker.exe $(BIN)$/climaker.exe.config
-+#
-+#CSFILES = climaker_csharp.cs
-+#
-+#$(BIN)/climaker.exe:   $(CSFILES)
-+#        +$(CSC) $(CSCFLAGS) -debug:full \
-+#                -out:$@ \
-+#                -reference:$(OUT)$/bin$/cli_basetypes.dll \
-+#                -reference:System.dll \
-+#                $(CSFILES)
- 
- .ENDIF
- 

Modified: trunk/patches/unittesting/unittesting-build-pl.diff
==============================================================================
--- trunk/patches/unittesting/unittesting-build-pl.diff	(original)
+++ trunk/patches/unittesting/unittesting-build-pl.diff	Fri Feb 13 16:56:54 2009
@@ -3,9 +3,9 @@
 --- solenv/bin/build.pl
 +++ solenv/bin/build.pl
 @@ -196,6 +196,10 @@
+                             # the server considered as an error/client crash 
      my %lost_client_jobs = (); # hash containing lost jobs
      my %job_jobdir = (); # hash containing job-dir pairs
-     my $is_svn = 0; 
 +
 +    $unit_tests = 0;  # use tests.lst in addition to build.lst & build with 'dmake check' there - for unit testing
 +    %unit_tests_dirs; # directories that should be built with 'dmake check'



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]