summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw/inc/fldbas.hxx8
-rw-r--r--sw/inc/unoprnms.hxx7
-rw-r--r--sw/source/core/fields/docufld.cxx9
-rw-r--r--sw/source/core/fields/expfld.cxx15
-rw-r--r--sw/source/core/fields/fldbas.cxx41
-rw-r--r--sw/source/core/fields/flddat.cxx11
-rw-r--r--sw/source/core/fields/tblcalc.cxx5
-rw-r--r--sw/source/core/fields/usrfld.cxx12
-rw-r--r--sw/source/core/inc/unofldmid.h6
-rw-r--r--sw/source/core/unocore/unofield.cxx16
-rw-r--r--sw/source/core/unocore/unomap.cxx13
-rw-r--r--sw/source/core/unocore/unoprnms.cxx7
-rw-r--r--sw/source/ui/fldui/flddinf.cxx25
-rw-r--r--sw/source/ui/fldui/flddok.cxx31
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx8
-rw-r--r--sw/source/ui/fldui/fldpage.cxx10
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx9
-rw-r--r--sw/source/ui/fldui/fldvar.cxx25
-rw-r--r--sw/source/ui/inc/fldmgr.hxx13
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx14
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx29
21 files changed, 231 insertions, 83 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 323846ee1b3e..4ca48ee2f82e 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldbas.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jp $ $Date: 2001-10-24 18:43:03 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -351,6 +351,7 @@ inline void SwFieldType::UpdateFlds() const
class SwField
{
USHORT nLang; // Immer ueber SetLanguage aendern!
+ BOOL bIsAutomaticLanguage;
ULONG nFormat;
SwFieldType* pType;
@@ -409,6 +410,9 @@ public:
FASTBOOL HasClickHdl() const;
// ist es ein Fix-Feld?
FASTBOOL IsFixed() const;
+
+ BOOL IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
+ void SetAutomaticLanguage(BOOL bSet){bIsAutomaticLanguage = bSet;}
};
inline SwFieldType* SwField::GetTyp() const
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 48f8b01d3d3e..77eddb65b7c7 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoprnms.hxx,v $
*
- * $Revision: 1.79 $
+ * $Revision: 1.80 $
*
- * last change: $Author: tl $ $Date: 2002-10-08 14:20:47 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -715,8 +715,9 @@ enum SwPropNameIds
/* 0635 */ UNO_NAME_HEADER_DYNAMIC_SPACING,
/* 0636 */ UNO_NAME_FOOTER_DYNAMIC_SPACING,
/* 0637 */ UNO_NAME_BASIC_LIBRARIES,
+/* 0638 */ UNO_NAME_IS_FIXED_LANGUAGE,
-/* 0638 */ SW_PROPNAME_END
+/* 0639 */ SW_PROPNAME_END
};
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 860f8b646e5b..8108ddf5527e 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docufld.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: fme $ $Date: 2002-08-05 11:53:10 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1234,6 +1234,7 @@ String SwDocInfoField::GetCntnt(sal_Bool bName) const
SwField* SwDocInfoField::Copy() const
{
SwDocInfoField* pFld = new SwDocInfoField((SwDocInfoFieldType*)GetTyp(), nSubType, GetFormat());
+ pFld->SetAutomaticLanguage(IsAutomaticLanguage());
pFld->aContent = aContent;
return pFld;
@@ -1305,7 +1306,7 @@ BOOL SwDocInfoField::QueryValue( uno::Any& rAny, BYTE nMId ) const
}
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::QueryValue(rAny, nMId);
}
return sal_True;
}
@@ -1356,7 +1357,7 @@ BOOL SwDocInfoField::PutValue( const uno::Any& rAny, BYTE nMId )
nSubType |= DI_SUB_TIME;
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::PutValue(rAny, nMId);
}
return sal_True;
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 113b07761574..9999bbbd3b3e 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: expfld.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: os $ $Date: 2002-10-11 12:18:21 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -423,6 +423,7 @@ SwField* SwGetExpField::Copy() const
pTmp->SwValueField::SetValue(GetValue());
pTmp->sExpand = sExpand;
pTmp->bIsInBodyTxt = bIsInBodyTxt;
+ pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
return pTmp;
}
@@ -537,7 +538,7 @@ BOOL SwGetExpField::QueryValue( uno::Any& rAny, BYTE nMId ) const
rAny <<= rtl::OUString(GetExpStr());
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::QueryValue(rAny, nMId);
}
return TRUE;
}
@@ -580,7 +581,7 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, BYTE nMId )
ChgExpStr(::GetString( rAny, sTmp ));
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::PutValue(rAny, nMId);
}
return TRUE;
}
@@ -946,6 +947,7 @@ SwField* SwSetExpField::Copy() const
GetFormula(), GetFormat());
pTmp->SwValueField::SetValue(GetValue());
pTmp->sExpand = sExpand;
+ pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
pTmp->SetLanguage(GetLanguage());
pTmp->aPText = aPText;
pTmp->bInput = bInput;
@@ -1115,6 +1117,7 @@ SwField* SwInputField::Copy() const
{
SwInputField* pFld = new SwInputField((SwInputFieldType*)GetTyp(), aContent,
aPText, GetSubType(), GetFormat());
+ pFld->SetAutomaticLanguage(IsAutomaticLanguage());
return pFld;
}
@@ -1274,7 +1277,7 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, BYTE nMId ) const
rAny <<= rtl::OUString(GetExpStr());
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::QueryValue(rAny, nMId);
}
return TRUE;
}
@@ -1356,7 +1359,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, BYTE nMId )
ChgExpStr( ::GetString( rAny, sTmp ));
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::PutValue(rAny, nMId);
}
return TRUE;
}
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 1aac5d4f1ef4..6d2a69659d59 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldbas.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: jp $ $Date: 2001-10-24 18:52:34 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,9 @@
#ifndef _UNO_LINGU_HXX
#include <svx/unolingu.hxx>
#endif
+#ifndef _UNOFLDMID_H
+#include <unofldmid.h>
+#endif
#ifndef _DOC_HXX
#include <doc.hxx>
@@ -265,7 +268,8 @@ BOOL SwFieldType::PutValue( const uno::Any& rVal, BYTE nMId )
SwField::SwField(SwFieldType* pTyp, ULONG nFmt, USHORT nLng) :
nFormat(nFmt),
- nLang(nLng)
+ nLang(nLng),
+ bIsAutomaticLanguage(TRUE)
{
ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
pType = pTyp;
@@ -470,11 +474,35 @@ void SwField::SetSubType(USHORT nType)
BOOL SwField::QueryValue( uno::Any& rVal, BYTE nMId ) const
{
- return FALSE;
+ nMId &= ~CONVERT_TWIPS;
+ switch( nMId )
+ {
+ case FIELD_PROP_BOOL4:
+ {
+ BOOL bFixed = !bIsAutomaticLanguage;
+ rVal.setValue(&bFixed, ::getCppuBooleanType());
+ }
+ break;
+ default:
+ DBG_ERROR("illegal property");
+ }
+ return TRUE;
}
BOOL SwField::PutValue( const uno::Any& rVal, BYTE nMId )
{
- return FALSE;
+ nMId &= ~CONVERT_TWIPS;
+ switch( nMId )
+ {
+ case FIELD_PROP_BOOL4:
+ {
+ BOOL bFixed;
+ if(rVal >>= bFixed)
+ bIsAutomaticLanguage = !bFixed;
+ break;
+ default:
+ DBG_ERROR("illegal property");
+ }
+ return TRUE;
}
@@ -869,7 +897,8 @@ ULONG SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, ULONG nFmt)
void SwValueField::SetLanguage( USHORT nLng )
{
- if( ((SwValueFieldType *)GetTyp())->UseFormat() &&
+ if( IsAutomaticLanguage() &&
+ ((SwValueFieldType *)GetTyp())->UseFormat() &&
GetFormat() != ULONG_MAX )
{
// wegen Bug #60010
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index 1a00f48ab182..a82413b860b3 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: flddat.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mba $ $Date: 2002-05-27 14:32:25 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -169,6 +169,7 @@ SwField* SwDateTimeField::Copy() const
pTmp->SetValue(GetValue());
pTmp->SetOffset(nOffset);
+ pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
return pTmp;
}
@@ -340,7 +341,7 @@ BOOL SwDateTimeField::QueryValue( uno::Any& rVal, BYTE nMId ) const
}
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::QueryValue(rVal, nMId);
}
return TRUE;
}
@@ -387,8 +388,8 @@ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, BYTE nMId )
SetDateTime(aDateTime.GetDate(), aDateTime.GetTime());
}
break;
- default:
- DBG_ERROR("illegal property");
+ default:
+ return SwField::PutValue(rVal, nMId);
}
return TRUE;
}
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index ef34db58097b..2b0a1464fecf 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tblcalc.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: mba $ $Date: 2002-05-27 14:32:26 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -141,6 +141,7 @@ SwField* SwTblField::Copy() const
pTmp->sExpand = sExpand;
pTmp->SwValueField::SetValue(GetValue());
pTmp->SwTableFormula::operator=( *this );
+ pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
return pTmp;
}
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 2a59563a92c9..ccce773b269d 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: usrfld.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: mba $ $Date: 2002-05-27 14:32:26 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:08:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -121,7 +121,9 @@ String SwUserField::Expand() const
SwField* SwUserField::Copy() const
{
- return new SwUserField((SwUserFieldType*)GetTyp(), nSubType, GetFormat());
+ SwField* pTmp = new SwUserField((SwUserFieldType*)GetTyp(), nSubType, GetFormat());
+ pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
+ return pTmp;
}
String SwUserField::GetCntnt(sal_Bool bName) const
@@ -205,7 +207,7 @@ BOOL SwUserField::QueryValue( uno::Any& rAny, BYTE nMId ) const
rAny <<= (sal_Int32)GetFormat();
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::QueryValue(rAny, nMId);
}
return sal_True;
}
@@ -237,7 +239,7 @@ sal_Bool SwUserField::PutValue( const uno::Any& rAny, BYTE nMId )
}
break;
default:
- DBG_ERROR("illegal property");
+ return SwField::PutValue(rAny, nMId);
}
return sal_True;
}
diff --git a/sw/source/core/inc/unofldmid.h b/sw/source/core/inc/unofldmid.h
index 6f2104ddc26c..179eaa9b9da1 100644
--- a/sw/source/core/inc/unofldmid.h
+++ b/sw/source/core/inc/unofldmid.h
@@ -2,9 +2,9 @@
*
* $RCSfile: unofldmid.h,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: jp $ $Date: 2001-10-24 18:46:05 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:09:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,7 +88,7 @@ namespace com { namespace sun { namespace star { namespace uno {
#define FIELD_PROP_DATE_TIME 25
#define FIELD_PROP_PROP_SEQ 26
#define FIELD_PROP_LOCALE 27
-
+#define FIELD_PROP_BOOL4 28
String& GetString( const com::sun::star::uno::Any&, String& rStr );
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index b1be24d62a93..25049e2477f3 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unofield.cxx,v $
*
- * $Revision: 1.67 $
+ * $Revision: 1.68 $
*
- * last change: $Author: tl $ $Date: 2002-09-12 13:12:13 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:10:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1214,6 +1214,7 @@ struct SwFieldProperties_Impl
sal_Bool bBool1;
sal_Bool bBool2;
sal_Bool bBool3;
+ sal_Bool bBool4;
SwFieldProperties_Impl():
nSubType(0),
@@ -1226,6 +1227,7 @@ struct SwFieldProperties_Impl
bBool1(sal_False),
bBool2(sal_False),
bBool3(sal_False),
+ bBool4(sal_True), //Automatic language
bFormatIsDefault(sal_True),
pDateTime(0)
{}
@@ -1810,6 +1812,7 @@ void SwXTextField::attachToRange(
}
if(pFld)
{
+ pFld->SetAutomaticLanguage(m_pProps->bBool4);
SwFmtFld aFmt( *pFld );
UnoActionContext aCont(pDoc);
@@ -2001,6 +2004,9 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
case FIELD_PROP_BOOL3 :
pBool = &m_pProps->bBool3;
break;
+ case FIELD_PROP_BOOL4:
+ pBool = &m_pProps->bBool3;
+ break;
case FIELD_PROP_DATE :
{
if(rValue.getValueType() != ::getCppuType((const util::Date*)0))
@@ -2123,6 +2129,12 @@ uno::Any SwXTextField::getPropertyValue(const OUString& rPropertyName)
case FIELD_PROP_BOOL2 :
aRet.setValue(&m_pProps->bBool2, ::getCppuBooleanType());
break;
+ case FIELD_PROP_BOOL3 :
+ aRet.setValue(&m_pProps->bBool3, ::getCppuBooleanType());
+ break;
+ case FIELD_PROP_BOOL4 :
+ aRet.setValue(&m_pProps->bBool4, ::getCppuBooleanType());
+ break;
case FIELD_PROP_DATE :
aRet.setValue(&m_pProps->aDate, ::getCppuType((const util::Date*)0));
break;
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 33b6c6dcaf0f..c4f57b63e4e5 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unomap.cxx,v $
*
- * $Revision: 1.145 $
+ * $Revision: 1.146 $
*
- * last change: $Author: tl $ $Date: 2002-11-07 13:51:59 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:17:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -401,7 +401,6 @@ void SwUnoPropertyMapProvider::Sort( sal_uInt16 nId )
COMMON_HYPERLINK_PROPERTIES \
{ SW_PROP_NMID(UNO_NAME_CHAR_STYLE_NAME), RES_TXTATR_CHARFMT, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, 0},
-
#define COMMON_CRSR_PARA_PROPERTIES_2 \
COMMON_CRSR_PARA_PROPERTIES_FN_ONLY \
COMMON_CRSR_PARA_PROPERTIES_WITHOUT_FN
@@ -1024,7 +1023,6 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{ SW_PROP_NMID(UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS), RES_PARATR_HYPHENZONE, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_LEAD },
{ SW_PROP_NMID(UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS), RES_PARATR_HYPHENZONE, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_TRAIL },
{ SW_PROP_NMID(UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS), RES_PARATR_HYPHENZONE, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MAX_HYPHENS},
- { SW_PROP_NMID(UNO_NAME_NUMBERING_RULES), FN_UNO_NUM_RULES, CPPU_E2T(CPPUTYPE_REFIDXREPL), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
{ SW_PROP_NMID(UNO_NAME_NUMBERING_STYLE_NAME), RES_PARATR_NUMRULE, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, 0},
{ SW_PROP_NMID(UNO_NAME_PARA_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, CPPU_E2T(CPPUTYPE_REFNAMECNT), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_PARA_SHADOW_FORMAT), RES_SHADOW, CPPU_E2T(CPPUTYPE_SHADOWFMT), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS},
@@ -1042,6 +1040,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{ SW_PROP_NMID(UNO_NAME_CHAR_RELIEF), RES_CHRATR_RELIEF, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_RELIEF },
{ SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0 },
+ { SW_PROP_NMID(UNO_NAME_NUMBERING_RULES), FN_UNO_NUM_RULES, CPPU_E2T(CPPUTYPE_REFIDXREPL), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
{0,0,0,0,0}
};
@@ -1759,6 +1758,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{SW_PROP_NMID(UNO_NAME_IS_FIXED), FIELD_PROP_BOOL1, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE,0},
{SW_PROP_NMID(UNO_NAME_IS_DATE), FIELD_PROP_BOOL2, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE,0},
{SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT), FIELD_PROP_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0}
};
aMapArr[nPropertyId] = aDateTimeFieldPropMap;
@@ -1771,6 +1771,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{SW_PROP_NMID(UNO_NAME_IS_SHOW_FORMULA), FIELD_PROP_BOOL2, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_IS_VISIBLE), FIELD_PROP_BOOL1, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT), FIELD_PROP_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0}
};
@@ -1794,6 +1795,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{SW_PROP_NMID(UNO_NAME_SUB_TYPE), FIELD_PROP_SUBTYPE, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_VALUE), FIELD_PROP_DOUBLE, CPPU_E2T(CPPUTYPE_DOUBLE), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_VARIABLE_NAME), FIELD_PROP_PAR1, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::READONLY, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0}
};
aMapArr[nPropertyId] = aSetExpFieldPropMap;
@@ -1810,6 +1812,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{SW_PROP_NMID(UNO_NAME_SUB_TYPE), FIELD_PROP_SUBTYPE, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_VALUE), FIELD_PROP_DOUBLE, CPPU_E2T(CPPUTYPE_DOUBLE), PropertyAttribute::READONLY, 0},
{SW_PROP_NMID(UNO_NAME_VARIABLE_SUBTYPE), FIELD_PROP_USHORT1, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0}
};
aMapArr[nPropertyId] = aGetExpFieldPropMap;
@@ -2137,6 +2140,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{SW_PROP_NMID(UNO_NAME_IS_DATE), FIELD_PROP_BOOL2, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE,0},
{SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT),FIELD_PROP_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_IS_FIXED), FIELD_PROP_BOOL1, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0}
};
aMapArr[nPropertyId] = aDocInfoDateTimePropMap;
@@ -2150,6 +2154,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
{SW_PROP_NMID(UNO_NAME_DATE_TIME_VALUE), FIELD_PROP_DOUBLE, CPPU_E2T(CPPUTYPE_DOUBLE), PropertyAttribute::READONLY, 0},
{SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT),FIELD_PROP_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_IS_FIXED), FIELD_PROP_BOOL1, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0}
};
aMapArr[nPropertyId] = aDocInfoEditTimePropMap;
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 78d8c8cd3e1a..12160bb3e002 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoprnms.cxx,v $
*
- * $Revision: 1.81 $
+ * $Revision: 1.82 $
*
- * last change: $Author: tl $ $Date: 2002-10-08 14:19:28 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:10:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -716,7 +716,8 @@ const SwPropNameTab aPropNameTab = {
/* 0634 UNO_NAME_BACK_COLOR_TRANSPARENCY */ {MAP_CHAR_LEN("BackColorTransparency")},
/* 0635 UNO_NAME_HEADER_DYNAMIC_SPACING */ {MAP_CHAR_LEN("HeaderDynamicSpacing")},
/* 0636 UNO_NAME_FOOTER_DYNAMIC_SPACING */ {MAP_CHAR_LEN("FooterDynamicSpacing")},
-/* 0637 UNO_NAME_BASIC_LIBRARIES */ {MAP_CHAR_LEN("BasicLibraries")}
+/* 0637 UNO_NAME_BASIC_LIBRARIES */ {MAP_CHAR_LEN("BasicLibraries")},
+/* 0638 UNO_NAME_IS_FIXED_LANGUAGE */ {MAP_CHAR_LEN("IsFixedLanguage")}
};
#ifndef PRODUCT
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index ddcf2f9146ce..7f96f6d55d35 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: flddinf.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: gt $ $Date: 2002-07-19 14:52:21 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:12:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,9 @@
#ifndef _VIEW_HXX
#include <view.hxx>
#endif
+#ifndef _ZFORMAT_HXX
+#include <svtools/zformat.hxx>
+#endif
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -135,6 +138,8 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aTypeTLB.SetSpaceBetweenEntries(0);
aTypeTLB.SetNodeDefaultImages();
+ //enable 'active' language selection
+ aFormatLB.SetShowLanguageControl(TRUE);
}
/*--------------------------------------------------------------------
@@ -167,7 +172,15 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& rSet)
USHORT nSubType = USHRT_MAX;
if (IsFldEdit())
- nSubType = ((SwDocInfoField*)GetCurField())->GetSubType() & 0xff;
+ {
+ const SwField* pCurField = GetCurField();
+ nSubType = ((SwDocInfoField*)pCurField)->GetSubType() & 0xff;
+ aFormatLB.SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
+ SwWrtShell &rSh = ::GetActiveView()->GetWrtShell();
+ const SvNumberformat* pFormat = rSh.GetNumberFormatter()->GetEntry(pCurField->GetFormat());
+ if(pFormat)
+ aFormatLB.SetLanguage(pFormat->GetLanguage());
+ }
USHORT nSelEntryData = USHRT_MAX;
String sUserData = GetUserData();
@@ -456,7 +469,8 @@ BOOL __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& rSet)
if (!IsFldEdit() || nOldSel != aSelectionLB.GetSelectEntryPos() ||
nOldFormat != nFormat || aFixedCB.GetState() != aFixedCB.GetSavedValue())
{
- InsertFld(nTypeId, nSubType, aEmptyStr, aEmptyStr, nFormat);
+ InsertFld(nTypeId, nSubType, aEmptyStr, aEmptyStr, nFormat,
+ ' ', aFormatLB.IsAutomaticLanguage());
}
return FALSE;
@@ -497,6 +511,9 @@ void SwFldDokInfPage::FillUserData()
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.2 2002/07/19 14:52:21 gt
+ #101523# node default images for SwFldDokInfPage
+
Revision 1.1.1.1 2000/09/18 17:14:36 hr
initial import
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index dea06a23823e..e6230b7ab06b 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: flddok.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: os $ $Date: 2001-04-23 13:13:57 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:12:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,6 +97,18 @@
#ifndef _FLDDOK_HXX
#include <flddok.hxx>
#endif
+#ifndef _SWMODULE_HXX
+#include <swmodule.hxx>
+#endif
+#ifndef _VIEW_HXX
+#include <view.hxx>
+#endif
+#ifndef _WRTSH_HXX
+#include <wrtsh.hxx>
+#endif
+#ifndef _ZFORMAT_HXX
+#include <svtools/zformat.hxx>
+#endif
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -136,6 +148,8 @@ SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aLevelED.SetMax(MAXLEVEL);
aDateOffsetED.SetMin(LONG_MIN);
aDateOffsetED.SetMax(LONG_MAX);
+ //enable 'active' language selection
+ aNumFormatLB.SetShowLanguageControl(TRUE);
}
/*--------------------------------------------------------------------
@@ -193,13 +207,19 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& rSet)
}
else
{
- nTypeId = GetCurField()->GetTypeId();
+ const SwField* pCurField = GetCurField();
+ nTypeId = pCurField->GetTypeId();
if (nTypeId == TYP_FIXDATEFLD)
nTypeId = TYP_DATEFLD;
if (nTypeId == TYP_FIXTIMEFLD)
nTypeId = TYP_TIMEFLD;
nPos = aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
aTypeLB.SetEntryData(nPos, (void*)nTypeId);
+ aNumFormatLB.SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
+ SwWrtShell &rSh = ::GetActiveView()->GetWrtShell();
+ const SvNumberformat* pFormat = rSh.GetNumberFormatter()->GetEntry(pCurField->GetFormat());
+ if(pFormat)
+ aNumFormatLB.SetLanguage(pFormat->GetLanguage());
}
// alte Pos selektieren
@@ -711,7 +731,7 @@ BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& rSet)
aLevelED.GetText() != aLevelED.GetSavedValue() ||
aDateOffsetED.GetText() != aDateOffsetED.GetSavedValue())
{
- InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat );
+ InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() );
}
return FALSE;
@@ -756,6 +776,9 @@ void SwFldDokPage::FillUserData()
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.3 2001/04/23 13:13:57 os
+ #86144# PageNumberField: selection of format corrected
+
Revision 1.2 2001/02/09 07:44:09 os
TabPage size changed
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 71b99113359e..cebd37585758 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldmgr.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: os $ $Date: 2002-10-18 13:43:44 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:12:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1568,9 +1568,11 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
ASSERT(pFld, "Feld nicht vorhanden");
- USHORT nLang = GetCurrLanguage();
// Language
+ //the auto language flag has to be set prior to the language!
+ pFld->SetAutomaticLanguage(rData.bIsAutomaticLanguage);
+ USHORT nLang = GetCurrLanguage();
pFld->SetLanguage(nLang);
// Einfuegen
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 57bf04a6539f..b7fdebbaf3fc 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldpage.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: os $ $Date: 2002-08-07 09:29:47 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:12:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -220,7 +220,8 @@ void SwFldPage::EditNewField( BOOL bOnlyActivate )
--------------------------------------------------------------------*/
BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
- const String& rPar2, ULONG nFormatId, sal_Unicode cSeparator)
+ const String& rPar2, ULONG nFormatId,
+ sal_Unicode cSeparator, BOOL bIsAutomaticLanguage)
{
BOOL bRet = FALSE;
SwView* pView = GetActiveView();
@@ -228,7 +229,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
if (!IsFldEdit()) // Neues Feld einfuegen
{
- SwInsertFld_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, 0, cSeparator );
+ SwInsertFld_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, 0, cSeparator, bIsAutomaticLanguage );
bRet = aMgr.InsertFld( aData );
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder =
@@ -365,6 +366,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
pSh->StartAllAction();
pCurFld->SetSubType(nSubType);
+ pCurFld->SetAutomaticLanguage(bIsAutomaticLanguage);
aMgr.UpdateCurFld( nFormatId, sPar1, sPar2 );
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index c171b6bb51cd..d5aa6111173c 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldtdlg.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:12:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -388,7 +388,10 @@ void SwFldDlg::ReInitDlg()
Close();
}
- const SwWrtShell& rSh = ::GetActiveView()->GetWrtShell();
+ SwView* pActiveView = ::GetActiveView();
+ if(!pActiveView)
+ return;
+ const SwWrtShell& rSh = pActiveView->GetWrtShell();
GetOKButton().Enable( !rSh.IsReadOnlyAvailable() ||
!rSh.HasReadonlySel() );
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 8375912edd94..8bf0980d1511 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldvar.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: jp $ $Date: 2001-09-20 12:49:58 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:12:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,6 +110,9 @@
#include <calc.hxx>
#endif
+#ifndef _ZFORMAT_HXX
+#include <svtools/zformat.hxx>
+#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -165,6 +168,8 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aChapterLevelLB.InsertEntry(String::CreateFromInt32(i));
aChapterLevelLB.SelectEntryPos(0);
+ //enable 'active' language selection
+ aNumFormatLB.SetShowLanguageControl(TRUE);
}
/*--------------------------------------------------------------------
@@ -210,11 +215,17 @@ void SwFldVarPage::Reset(const SfxItemSet& rSet)
}
else
{
- nTypeId = GetCurField()->GetTypeId();
+ SwField* pCurField = GetCurField();
+ nTypeId = pCurField->GetTypeId();
if (nTypeId == TYP_SETINPFLD)
nTypeId = TYP_INPUTFLD;
nPos = aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
aTypeLB.SetEntryData(nPos, (void*)nTypeId);
+ aNumFormatLB.SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
+ SwWrtShell &rSh = ::GetActiveView()->GetWrtShell();
+ const SvNumberformat* pFormat = rSh.GetNumberFormatter()->GetEntry(pCurField->GetFormat());
+ if(pFormat)
+ aNumFormatLB.SetLanguage(pFormat->GetLanguage());
}
// alte Pos selektieren
@@ -1218,7 +1229,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& rSet)
{
nFormat = aNumFormatLB.GetFormat();
- if (nFormat && nFormat != ULONG_MAX)
+ if (nFormat && nFormat != ULONG_MAX && aNumFormatLB.IsAutomaticLanguage())
{
// Sprache auf Office-Sprache umstellen, da String im Office-
// Format vom Kalkulator erwartet wird und so in den Dlg
@@ -1309,7 +1320,8 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& rSet)
aChapterLevelLB.GetSavedValue() != aChapterLevelLB.GetSelectEntryPos() ||
aSeparatorED.GetSavedValue() != aSeparatorED.GetText())
{
- InsertFld( nTypeId, nSubType, aName, aVal, nFormat, cSeparator );
+ InsertFld( nTypeId, nSubType, aName, aVal, nFormat,
+ cSeparator, aNumFormatLB.IsAutomaticLanguage() );
}
UpdateSubType();
@@ -1397,6 +1409,9 @@ void SwFldVarPage::FillUserData()
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.7 2001/09/20 12:49:58 jp
+ Bug #89582#: handle field dialog activation correct
+
Revision 1.6 2001/08/03 14:37:05 os
#90496# zero is a valid number format
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index 4901a9693973..71e512d0a551 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldmgr.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: os $ $Date: 2001-06-08 13:47:32 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:13:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,23 +135,26 @@ struct SwInsertFld_Data
ULONG nFormatId;
SwWrtShell* pSh;
sal_Unicode cSeparator;
+ BOOL bIsAutomaticLanguage;
::com::sun::star::uno::Any aDBDataSource;
::com::sun::star::uno::Any aDBConnection;
::com::sun::star::uno::Any aDBColumn;
SwInsertFld_Data(USHORT nType, USHORT nSub, const String& rPar1, const String& rPar2,
- ULONG nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ') :
+ ULONG nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', BOOL bIsAutoLanguage = TRUE) :
nTypeId(nType),
nSubType(nSub),
sPar1(rPar1),
sPar2(rPar2),
nFormatId(nFmtId),
pSh(pShell),
- cSeparator(cSep) {}
+ cSeparator(cSep),
+ bIsAutomaticLanguage(bIsAutoLanguage) {}
SwInsertFld_Data() :
pSh(0),
- cSeparator(' '){}
+ cSeparator(' '),
+ bIsAutomaticLanguage(TRUE){}
};
class SwFldMgr
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index 2a050a9e1957..ce6a72b9d302 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: numfmtlb.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:41 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:13:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,6 +80,9 @@ class NumFormatListBox : public ListBox
SwView* pVw;
SvNumberFormatter* pOwnFormatter;
LanguageType eCurLanguage;
+ BOOL bShowLanguageControl; //determine whether the language control has
+ //to be shown in the number format dialog
+ BOOL bUseAutomaticLanguage;//determine whether language is automatically assigned
DECL_LINK( SelectHdl, ListBox * );
@@ -109,6 +112,13 @@ public:
const String& GetFormatStr() const;
inline LanguageType GetCurLanguage() const { return eCurLanguage;}
+ void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;}
+
+ void SetAutomaticLanguage(BOOL bSet){bUseAutomaticLanguage = bSet;}
+ BOOL IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
+
+ void SetShowLanguageControl(BOOL bSet){bShowLanguageControl = bSet;}
+
};
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index dbf682605483..f78b49684bda 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: numfmtlb.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: jp $ $Date: 2001-09-27 17:23:38 $
+ * last change: $Author: os $ $Date: 2002-11-15 11:13:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -154,7 +154,9 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
bOneArea (FALSE),
nDefFormat (nDefFmt),
pVw (0),
- pOwnFormatter (0)
+ pOwnFormatter (0),
+ bUseAutomaticLanguage(TRUE),
+ bShowLanguageControl(FALSE)
{
Init(nFormatType, bUsrFmts);
}
@@ -172,7 +174,9 @@ NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
bOneArea (FALSE),
nDefFormat (nDefFmt),
pVw (pView),
- pOwnFormatter (0)
+ pOwnFormatter (0),
+ bUseAutomaticLanguage(TRUE),
+ bShowLanguageControl(FALSE)
{
Init(nFormatType, bUsrFmts);
}
@@ -488,6 +492,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO,
SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA,
SID_ATTR_NUMBERFORMAT_NOLANGUAGE, SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, SID_ATTR_NUMBERFORMAT_ADD_AUTO,
0 );
double fValue = GetDefValue( pFormatter, nCurrFormatType);
@@ -501,8 +506,8 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
if( (NUMBERFORMAT_DATE | NUMBERFORMAT_TIME) & nCurrFormatType )
aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, bOneArea));
- // Keine Sprachauswahl im Dialog, da Sprache im Textattribut enthalten ist
- aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_NOLANGUAGE, TRUE));
+ aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_NOLANGUAGE, !bShowLanguageControl));
+ aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ADD_AUTO, bUseAutomaticLanguage));
SwNumFmtDlg* pDlg = new SwNumFmtDlg(this, aCoreSet);
@@ -519,10 +524,18 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
pFormatter->DeleteEntry( pDelArr[i] );
}
- if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState(
+ const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
+ if( SFX_ITEM_SET == pOutSet->GetItemState(
SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem ))
{
- SetDefFormat(((SfxUInt32Item*)pItem)->GetValue());
+ UINT32 nFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ SetDefFormat(nFormat);
+ eCurLanguage = pFormatter->GetEntry(nFormat)->GetLanguage();
+ }
+ if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState(
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem ))
+ {
+ bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
}
}
else