update dev300-m58
[ooovba.git] / applied_patches / 0044-cjk-character-units-fix.diff
blobf11a0197281ad492e359db1f7b7c41530c1ea9be
1 --- officecfg/registry/schema/org/openoffice/Office/Writer.xcs.old 2009-04-06 16:41:41.000000000 +0000
2 +++ officecfg/registry/schema/org/openoffice/Office/Writer.xcs 2009-04-06 16:41:41.000000000 +0000
3 @@ -1591,6 +1591,18 @@
4 </info>
5 <value>true</value>
6 </prop>
7 + <!-- added for apply char unit 2006-12-1 -->
8 + <prop oor:name="ApplyCharUnit" oor:type="xs:boolean">
9 + <!-- OldPath: Writer/Layout -->
10 + <!-- OldLocation: Soffice.cfg -->
11 + <!-- UIHints: Tools - Options - Text document - Layout - [Section] Apply char unit -->
12 + <info>
13 + <author>OS</author>
14 + <desc>apply char unit to calculate the paragraph's indent</desc>
15 + <label>apply char unit</label>
16 + </info>
17 + <value>true</value>
18 + </prop>
19 </group>
20 <group oor:name="Zoom">
21 <info>
22 @@ -1654,18 +1666,6 @@
23 </info>
24 <value>false</value>
25 </prop>
26 - <!-- added for apply char unit 2006-12-1 -->
27 - <prop oor:name="ApplyCharUnit" oor:type="xs:boolean">
28 - <!-- OldPath: Writer/Layout -->
29 - <!-- OldLocation: Soffice.cfg -->
30 - <!-- UIHints: Tools - Options - Text document - Layout - [Section] Apply char unit -->
31 - <info>
32 - <author>OS</author>
33 - <desc>apply char unit to calculate the paragraph's indent</desc>
34 - <label>apply char unit</label>
35 - </info>
36 - <value>true</value>
37 - </prop>
38 </group>
39 </group>
40 <group oor:name="Grid">
41 --- sw/source/ui/app/appopt.cxx.old 2009-04-06 16:41:40.000000000 +0000
42 +++ sw/source/ui/app/appopt.cxx 2009-04-06 16:41:41.000000000 +0000
43 @@ -221,6 +221,7 @@ SfxItemSet* SwModule::CreateItemSet( US
44 pAppView->GetVLinealMetric(eUnit);
45 pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) ));
46 pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) ));
47 + pRet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, pPref->IsApplyCharUnit()));
48 if(bTextDialog)
50 if(pAppView)
51 --- sw/source/ui/app/swmodul1.cxx.old 2009-04-06 16:41:40.000000000 +0000
52 +++ sw/source/ui/app/swmodul1.cxx 2009-04-06 16:41:41.000000000 +0000
53 @@ -351,8 +351,10 @@ void SwModule::ApplyUserCharUnit(BOOL bA
55 else
57 - eHScrollMetric = FUNIT_CM;
58 - eVScrollMetric = FUNIT_CM;
59 + if ( eHScrollMetric == FUNIT_CHAR )
60 + eHScrollMetric == FUNIT_CM;
61 + if ( eVScrollMetric == FUNIT_LINE )
62 + eVScrollMetric == FUNIT_CM;
64 SwView* pTmpView = SwModule::GetFirstView();
65 // fuer alle MDI-Fenster das Lineal umschalten
66 --- sw/source/ui/config/optload.cxx.old 2009-04-06 16:41:41.000000000 +0000
67 +++ sw/source/ui/config/optload.cxx 2009-04-06 16:41:41.000000000 +0000
68 @@ -151,7 +151,10 @@ SwLoadOptPage::SwLoadOptPage( Window* pP
70 SvtCJKOptions aCJKOptions;
71 if(!aCJKOptions.IsAsianTypographyEnabled())
72 + {
73 aUseSquaredPageMode.Hide();
74 + aUseCharUnit.Hide();
75 + }
78 /*-----------------18.01.97 12.43-------------------
79 --- sw/source/ui/config/optload.src.old 2009-04-06 16:41:41.000000000 +0000
80 +++ sw/source/ui/config/optload.src 2009-04-06 16:41:41.000000000 +0000
81 @@ -147,8 +147,7 @@ TabPage TP_OPTLOAD_PAGE
83 Pos = MAP_APPFONT ( 12 , 130) ;
84 Size = MAP_APPFONT ( 109 , 10 ) ;
85 - Text [ de ] = "appy char unit" ;
86 - Text [ en-US ] = "apply char unit";
87 + Text [ en-US ] = "Enable char unit";
88 Text [ x-comment ] = " ";
91 --- sw/source/ui/config/usrpref.cxx.old 2009-04-06 16:41:40.000000000 +0000
92 +++ sw/source/ui/config/usrpref.cxx 2009-04-06 16:41:41.000000000 +0000
93 @@ -66,6 +66,7 @@ SwMasterUsrPref::SwMasterUsrPref(BOOL bW
94 bIsVScrollMetricSet(sal_False),
95 nDefTab( MM50 * 4 ),
96 bIsSquaredPageMode(sal_False),
97 + bApplyCharUnit(sal_False),
98 aContentConfig(bWeb, *this),
99 aLayoutConfig(bWeb, *this),
100 aGridConfig(bWeb, *this),
101 @@ -336,7 +337,7 @@ void SwLayoutViewConfig::Commit()
102 case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns",
103 case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode",
104 case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode",
105 - case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/IsApplyCharUnit",
106 + case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit",
108 if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 )
109 pValues[nProp].setValue(&bSet, ::getBooleanCppuType());
110 --- sw/source/ui/misc/pggrid.cxx.old 2009-04-06 16:41:41.000000000 +0000
111 +++ sw/source/ui/misc/pggrid.cxx 2009-04-06 16:41:41.000000000 +0000
112 @@ -326,17 +326,17 @@ void SwTextGridPage::PutGridItem(SfxItem
113 aGridItem.SetColor(aColorLB.GetSelectEntryColor());
114 rSet.Put(aGridItem);
115 /// Amelia
116 + SwView * pView = ::GetActiveView();
117 if ( aGridItem.GetGridType() != GRID_NONE )
119 - SwView * pView = ::GetActiveView();
120 if ( aGridItem.GetGridType() == GRID_LINES_CHARS )
122 - pView->GetHLineal().SetCharWidth((long)(aCharWidthMF.GetValue(FUNIT_TWIP)/56.7));
123 m_bHRulerChanged = sal_True;
125 - pView->GetVLineal().SetLineHeight((long)(aTextSizeMF.GetValue(FUNIT_TWIP)/56.7));
126 m_bVRulerChanged = sal_True;
128 + pView->GetHLineal().SetCharWidth((long)(aCharWidthMF.GetValue(FUNIT_TWIP)/56.7));
129 + pView->GetVLineal().SetLineHeight((long)(aTextSizeMF.GetValue(FUNIT_TWIP)/56.7));
131 /* -----------------------------08.02.2002 10:54------------------------------
133 --- sw/source/ui/uiview/view.cxx.old 2009-04-06 16:41:40.000000000 +0000
134 +++ sw/source/ui/uiview/view.cxx 2009-04-06 16:41:41.000000000 +0000
135 @@ -169,6 +169,9 @@
136 #include <com/sun/star/document/XDocumentProperties.hpp>
137 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
139 +#ifndef _SVTOOLS_CJKOPTIONS_HXX
140 +#include <svtools/cjkoptions.hxx>
141 +#endif
144 using namespace ::com::sun::star;
145 @@ -1013,13 +1016,14 @@ SwView::SwView( SfxViewFrame *_pFrame, S
146 FieldUnit eMetric = pUsrPref->GetHScrollMetric();
148 BOOL bApplyCharUnit = pUsrPref->IsApplyCharUnit();
149 - if ( bApplyCharUnit )
150 + SvtCJKOptions aCJKOptions;
151 + if ( aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit )
152 pHRuler->SetUnit( FUNIT_CHAR );
153 else
154 pHRuler->SetUnit( eMetric );
156 eMetric = pUsrPref->GetVScrollMetric();
157 - if ( bApplyCharUnit )
158 + if ( aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit )
159 pVRuler->SetUnit(FUNIT_LINE);
160 else
161 pVRuler->SetUnit( eMetric );