summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/app/appopt.cxx1
-rw-r--r--sw/source/ui/app/swmodul1.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx3
-rw-r--r--sw/source/ui/config/optload.src3
-rw-r--r--sw/source/ui/config/usrpref.cxx3
-rw-r--r--sw/source/ui/misc/pggrid.cxx6
-rw-r--r--sw/source/ui/uiview/view.cxx6
7 files changed, 18 insertions, 10 deletions
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index 0bc088f06a98..00a96d152b53 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -230,6 +230,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pAppView->GetVLinealMetric(eUnit);
pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) ));
pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) ));
+ pRet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, pPref->IsApplyCharUnit()));
if(bTextDialog)
{
if(pAppView)
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index e4b152257141..f27c89478a8a 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -348,8 +348,10 @@ void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb)
}
else
{
- eHScrollMetric = FUNIT_CM;
- eVScrollMetric = FUNIT_CM;
+ if ( eHScrollMetric == FUNIT_CHAR )
+ eHScrollMetric == FUNIT_CM;
+ if ( eVScrollMetric == FUNIT_LINE )
+ eVScrollMetric == FUNIT_CM;
}
SwView* pTmpView = SwModule::GetFirstView();
// fuer alle MDI-Fenster das Lineal umschalten
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 2dbe2bfabd48..01cfd97b1374 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -148,7 +148,10 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
SvtCJKOptions aCJKOptions;
if(!aCJKOptions.IsAsianTypographyEnabled())
+ {
aUseSquaredPageMode.Hide();
+ aUseCharUnit.Hide();
+ }
}
/*-----------------18.01.97 12.43-------------------
diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src
index cab9d4831f8c..c53234b02d5a 100644
--- a/sw/source/ui/config/optload.src
+++ b/sw/source/ui/config/optload.src
@@ -144,8 +144,7 @@ TabPage TP_OPTLOAD_PAGE
{
Pos = MAP_APPFONT ( 12 , 130) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
- Text [ de ] = "appy char unit" ;
- Text [ en-US ] = "apply char unit";
+ Text [ en-US ] = "Enable char unit";
Text [ x-comment ] = " ";
};
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index 013e7dcfaa94..a08e1eddfe96 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -63,6 +63,7 @@ SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) :
bIsVScrollMetricSet(sal_False),
nDefTab( MM50 * 4 ),
bIsSquaredPageMode(sal_False),
+ bApplyCharUnit(sal_False),
aContentConfig(bWeb, *this),
aLayoutConfig(bWeb, *this),
aGridConfig(bWeb, *this),
@@ -333,7 +334,7 @@ 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",
+ case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit",
}
if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 )
pValues[nProp].setValue(&bSet, ::getBooleanCppuType());
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 9c3972289e15..91102a528d1a 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -323,17 +323,17 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
aGridItem.SetColor(aColorLB.GetSelectEntryColor());
rSet.Put(aGridItem);
/// Amelia
+ SwView * pView = ::GetActiveView();
if ( aGridItem.GetGridType() != GRID_NONE )
{
- SwView * pView = ::GetActiveView();
if ( aGridItem.GetGridType() == GRID_LINES_CHARS )
{
- pView->GetHLineal().SetCharWidth((long)(aCharWidthMF.GetValue(FUNIT_TWIP)/56.7));
m_bHRulerChanged = sal_True;
}
- pView->GetVLineal().SetLineHeight((long)(aTextSizeMF.GetValue(FUNIT_TWIP)/56.7));
m_bVRulerChanged = sal_True;
}
+ 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------------------------------
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 3579cdc952f6..b2458cad9929 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -116,6 +116,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <svl/cjkoptions.hxx>
using namespace ::com::sun::star;
@@ -953,13 +954,14 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
FieldUnit eMetric = pUsrPref->GetHScrollMetric();
BOOL bApplyCharUnit = pUsrPref->IsApplyCharUnit();
- if ( bApplyCharUnit )
+ SvtCJKOptions aCJKOptions;
+ if ( aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit )
pHRuler->SetUnit( FUNIT_CHAR );
else
pHRuler->SetUnit( eMetric );
eMetric = pUsrPref->GetVScrollMetric();
- if ( bApplyCharUnit )
+ if ( aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit )
pVRuler->SetUnit(FUNIT_LINE);
else
pVRuler->SetUnit( eMetric );