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
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 -->
14 + <desc>apply char unit to calculate the paragraph's indent</desc>
15 + <label>apply char unit</label>
20 <group oor:name="Zoom">
22 @@ -1654,18 +1666,6 @@
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 -->
33 - <desc>apply char unit to calculate the paragraph's indent</desc>
34 - <label>apply char unit</label>
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()));
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
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())
73 aUseSquaredPageMode.Hide();
74 + aUseCharUnit.Hide();
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),
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());
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
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>
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 );
154 pHRuler->SetUnit( eMetric );
156 eMetric = pUsrPref->GetVScrollMetric();
157 - if ( bApplyCharUnit )
158 + if ( aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit )
159 pVRuler->SetUnit(FUNIT_LINE);
161 pVRuler->SetUnit( eMetric );