diff options
author | Oliver Specht <os@openoffice.org> | 2000-11-08 11:45:24 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2000-11-08 11:45:24 +0000 |
commit | 6115f26201b6488754031f714ac951649195f5fb (patch) | |
tree | c85504e1ccff472993d899d2cd1031b2b81bf7dc | |
parent | 183e87ed97e5b26e9bcaea9c4e7c9ab33114c254 (diff) |
#76423# programmatic names for initially created sequence fields
-rw-r--r-- | sw/source/core/fields/expfld.cxx | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index f7b4f76ead4d..0404152cd372 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.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-24 12:01:31 $ + * last change: $Author: os $ $Date: 2000-11-08 12:45:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,7 +82,9 @@ #ifndef _UNO_LINGU_HXX #include <svx/unolingu.hxx> #endif - +#ifndef _UNOFIELD_HXX +#include <unofield.hxx> +#endif #ifndef _FMTFLD_HXX //autogen #include <fmtfld.hxx> @@ -1186,9 +1188,15 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, const String& rProperty ) const else if( rProperty.EqualsAscii( UNO_NAME_SEQUENCE_VALUE )) rAny <<= (sal_Int16)nSeqNo; else if( rProperty.EqualsAscii( UNO_NAME_VARIABLE_NAME )) - rAny <<= OUString( GetPar1() ); + rAny <<= SwXFieldMaster::GetSetExpProgrammaticName(GetPar1()); else if( rProperty.EqualsAscii( UNO_NAME_CONTENT )) - rAny <<= OUString( GetFormula() ); + { + //I18N - if the formula contains only "TypeName+1" + //and it's one of the initially created sequence fields + //then the localized names has to be replaced by a programmatic name + OUString sFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), TRUE); + rAny <<= OUString( sFormula ); + } else if( rProperty.EqualsAscii( UNO_NAME_VALUE )) rAny <<= (Double)GetValue(); else if( rProperty.EqualsAscii( UNO_NAME_SUB_TYPE )) @@ -1256,13 +1264,18 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, const String& rProperty ) { OUString uTmp; rAny >>= uTmp; + uTmp = SwXFieldMaster::GetSetExpUIName(uTmp); SetPar1( uTmp ); } else if( rProperty.EqualsAscii( UNO_NAME_CONTENT )) { OUString uTmp; rAny >>= uTmp; - SetFormula( uTmp ); + //I18N - if the formula contains only "TypeName+1" + //and it's one of the initially created sequence fields + //then the localized names has to be replaced by a programmatic name + OUString sFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, FALSE); + SetFormula( sFormula ); } else if( rProperty.EqualsAscii( UNO_NAME_VALUE )) { |