You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/11/18 13:54:10 UTC
svn commit: r1543021 [22/29] - in /openoffice/branches/rejuvenate01: ./
main/ main/accessibility/inc/accessibility/extended/
main/accessibility/inc/accessibility/helper/
main/accessibility/inc/accessibility/standard/
main/accessibility/source/extended/...
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/edit/edlingu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/edit/edlingu.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/edit/edlingu.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/edit/edlingu.cxx Mon Nov 18 12:53:58 2013
@@ -1382,13 +1382,13 @@ void SwEditShell::ApplyChangedSentence(c
pDoc->DeleteAndJoin(*pCrsr);
// ... and apply language if necessary
if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
- SetAttr( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
pDoc->InsertString(*pCrsr, aCurrentNewPortion->sText);
}
else if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
{
//apply language
- SetAttr( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
}
else if( aCurrentNewPortion->bIgnoreThisError )
{
@@ -1429,7 +1429,7 @@ void SwEditShell::ApplyChangedSentence(c
GetCurAttr( aSet );
const SvxLanguageItem& rLang = static_cast<const SvxLanguageItem& >(aSet.Get(nLangWhichId));
if(rLang.GetLanguage() != aCurrentNewPortion->eLanguage)
- SetAttr( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
//insert the new string
pDoc->InsertString(*pCrsr, aCurrentNewPortion->sText);
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/edit/ednumber.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/edit/ednumber.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/edit/ednumber.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/edit/ednumber.cxx Mon Nov 18 12:53:58 2013
@@ -209,7 +209,7 @@ sal_Bool SwEditShell::SelectionHasNumber
return bResult;
}
-//Sym3_879 add a new function to determine number on/off status
+//add a new function to determine number on/off status
sal_Bool SwEditShell::SelectionHasBullet() const
{
sal_Bool bResult = HasBullet();
@@ -731,35 +731,30 @@ sal_Bool SwEditShell::IsNoNum( sal_Bool
return bResult;
}
-// --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
sal_uInt8 SwEditShell::GetNumLevel() const
{
- // gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
- //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
- sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
+ // gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
+ //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
+ sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
- SwPaM* pCrsr = GetCrsr();
- const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ SwPaM* pCrsr = GetCrsr();
+ const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
- // --> FME 2005-09-12 #124972# Made code robust:
ASSERT( pTxtNd, "GetNumLevel() without text node" )
if ( !pTxtNd )
return nLevel;
- // <--
- const SwNumRule* pRule = pTxtNd->GetNumRule();
- if(pRule)
- {
- // --> OD 2008-05-09 #refactorlists#
+ const SwNumRule* pRule = pTxtNd->GetNumRule();
+ if(pRule)
+ {
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
{
nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
}
- // <--
- }
+ }
- return nLevel;
+ return nLevel;
}
const SwNumRule* SwEditShell::GetCurNumRule() const
@@ -774,31 +769,26 @@ void SwEditShell::SetCurNumRule( const S
const String sContinuedListId,
const bool bResetIndentAttrs )
{
- StartAllAction();
+ StartAllAction();
GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
- SwPaM* pCrsr = GetCrsr();
- if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
+ SwPaM* pCrsr = GetCrsr();
+ if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
{
- SwPamRanges aRangeArr( *pCrsr );
- SwPaM aPam( *pCrsr->GetPoint() );
- for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
- {
- aRangeArr.SetPam( n, aPam );
- // --> OD 2008-02-08 #newlistlevelattrs#
- // --> OD 2008-03-17 #refactorlists#
+ SwPamRanges aRangeArr( *pCrsr );
+ SwPaM aPam( *pCrsr->GetPoint() );
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
+ {
+ aRangeArr.SetPam( n, aPam );
GetDoc()->SetNumRule( aPam, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
- // <--
- GetDoc()->SetCounted( aPam, true );
- }
+ GetDoc()->SetCounted( aPam, true );
+ }
}
else
{
- // --> OD 2008-02-08 #newlistlevelattrs#
- // --> OD 2008-03-17 #refactorlists#
GetDoc()->SetNumRule( *pCrsr, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
@@ -806,7 +796,7 @@ void SwEditShell::SetCurNumRule( const S
}
GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
- EndAllAction();
+ EndAllAction();
}
String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, sal_Bool bAutoNum ) const
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/edit/edtox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/edit/edtox.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/edit/edtox.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/edit/edtox.cxx Mon Nov 18 12:53:58 2013
@@ -84,8 +84,8 @@ void SwEditShell::Insert(const SwTOXMark
}
else if( *pEnd != *pStt )
{
- GetDoc()->InsertPoolItem( *PCURCRSR, rMark,
- nsSetAttrMode::SETATTR_DONTEXPAND );
+ GetDoc()->InsertPoolItem(
+ *PCURCRSR, rMark, nsSetAttrMode::SETATTR_DONTEXPAND );
}
FOREACHPAM_END()
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/fields/expfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/fields/expfld.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/fields/expfld.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/fields/expfld.cxx Mon Nov 18 12:53:58 2013
@@ -976,29 +976,226 @@ void SwSetExpField::SetPar2(const String
}
}
+
+sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+{
+ sal_Int32 nTmp32 = 0;
+ sal_Int16 nTmp16 = 0;
+ String sTmp;
+ switch( nWhichId )
+ {
+ case FIELD_PROP_BOOL2:
+ if(*(sal_Bool*)rAny.getValue())
+ nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
+ else
+ nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
+ break;
+ case FIELD_PROP_FORMAT:
+ rAny >>= nTmp32;
+ SetFormat(nTmp32);
+ break;
+ case FIELD_PROP_USHORT2:
+ {
+ rAny >>= nTmp16;
+ if(nTmp16 <= SVX_NUMBER_NONE )
+ SetFormat(nTmp16);
+ else {
+ //exception(wrong_value)
+ ;
+ }
+ }
+ break;
+ case FIELD_PROP_USHORT1:
+ rAny >>= nTmp16;
+ nSeqNo = nTmp16;
+ break;
+ case FIELD_PROP_PAR1:
+ SetPar1( SwStyleNameMapper::GetUIName(
+ ::GetString( rAny, sTmp ), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
+ break;
+ case FIELD_PROP_PAR2:
+ {
+ OUString uTmp;
+ rAny >>= 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 sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
+ SetFormula( sMyFormula );
+ }
+ break;
+ case FIELD_PROP_DOUBLE:
+ {
+ double fVal = 0.0;
+ rAny >>= fVal;
+ SetValue(fVal);
+ }
+ break;
+ case FIELD_PROP_SUBTYPE:
+ nTmp32 = lcl_APIToSubType(rAny);
+ if(nTmp32 >= 0)
+ SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
+ break;
+ case FIELD_PROP_PAR3:
+ ::GetString( rAny, aPText );
+ break;
+ case FIELD_PROP_BOOL3:
+ if(*(sal_Bool*) rAny.getValue())
+ nSubType |= nsSwExtendedSubType::SUB_CMD;
+ else
+ nSubType &= (~nsSwExtendedSubType::SUB_CMD);
+ break;
+ case FIELD_PROP_BOOL1:
+ SetInputFlag(*(sal_Bool*) rAny.getValue());
+ break;
+ case FIELD_PROP_PAR4:
+ ChgExpStr( ::GetString( rAny, sTmp ));
+ break;
+ default:
+ return SwField::PutValue(rAny, nWhichId);
+ }
+ return sal_True;
+}
+
+
+sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+{
+ switch( nWhichId )
+ {
+ case FIELD_PROP_BOOL2:
+ {
+ sal_Bool bVal = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ rAny.setValue(&bVal, ::getBooleanCppuType());
+ }
+ break;
+ case FIELD_PROP_FORMAT:
+ rAny <<= (sal_Int32)GetFormat();
+ break;
+ case FIELD_PROP_USHORT2:
+ rAny <<= (sal_Int16)GetFormat();
+ break;
+ case FIELD_PROP_USHORT1:
+ rAny <<= (sal_Int16)nSeqNo;
+ break;
+ case FIELD_PROP_PAR1:
+ rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
+ break;
+ case FIELD_PROP_PAR2:
+ {
+ //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 sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
+ rAny <<= OUString( sMyFormula );
+ }
+ break;
+ case FIELD_PROP_DOUBLE:
+ rAny <<= (double)GetValue();
+ break;
+ case FIELD_PROP_SUBTYPE:
+ {
+ sal_Int16 nRet = 0;
+ nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
+ rAny <<= nRet;
+ }
+ break;
+ case FIELD_PROP_PAR3:
+ rAny <<= OUString( aPText );
+ break;
+ case FIELD_PROP_BOOL3:
+ {
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ rAny.setValue(&bTmp, ::getBooleanCppuType());
+ }
+ break;
+ case FIELD_PROP_BOOL1:
+ {
+ sal_Bool bTmp = GetInputFlag();
+ rAny.setValue(&bTmp, ::getBooleanCppuType());
+ }
+ break;
+ case FIELD_PROP_PAR4:
+ rAny <<= rtl::OUString(GetExpStr());
+ break;
+ default:
+ return SwField::QueryValue(rAny, nWhichId);
+ }
+ return sal_True;
+}
+
+
+
/*--------------------------------------------------------------------
Beschreibung: Eingabefeld Type
---------------------------------------------------------------------*/
SwInputFieldType::SwInputFieldType( SwDoc* pD )
- : SwFieldType( RES_INPUTFLD ), pDoc( pD )
+ : SwFieldType( RES_INPUTFLD )
+ , pDoc( pD )
{
}
SwFieldType* SwInputFieldType::Copy() const
{
- SwInputFieldType* pType = new SwInputFieldType( pDoc );
- return pType;
+ SwInputFieldType* pType = new SwInputFieldType( pDoc );
+ return pType;
}
/*--------------------------------------------------------------------
Beschreibung: Eingabefeld
--------------------------------------------------------------------*/
-SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent,
- const String& rPrompt, sal_uInt16 nSub, sal_uLong nFmt) :
- SwField(pTyp, nFmt), aContent(rContent), aPText(rPrompt), nSubType(nSub)
+SwInputField::SwInputField( SwInputFieldType* pFieldType,
+ const String& rContent,
+ const String& rPrompt,
+ sal_uInt16 nSub,
+ sal_uLong nFmt,
+ bool bIsFormField )
+ : SwField( pFieldType, nFmt, LANGUAGE_SYSTEM, false )
+ , aContent(rContent)
+ , aPText(rPrompt)
+ , nSubType(nSub)
+ , mpFmtFld( NULL )
+ , mbIsFormField( bIsFormField )
+{
+}
+
+SwInputField::~SwInputField()
+{
+}
+
+
+void SwInputField::SetFmtFld( SwFmtFld& rFmtFld )
+{
+ mpFmtFld = &rFmtFld;
+}
+
+SwFmtFld* SwInputField::GetFmtFld()
{
+ return mpFmtFld;
+}
+
+
+const String& SwInputField::getContent() const
+{
+ return aContent;
+}
+
+void SwInputField::applyFieldContent( const String& rNewFieldContent )
+{
+ if ( (nSubType & 0x00ff) == INP_TXT )
+ {
+ aContent = rNewFieldContent;
+ }
+ else if( (nSubType & 0x00ff) == INP_USR )
+ {
+ SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
+ static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->GetFldType( RES_USERFLD, getContent(), false ) );
+ if( pUserTyp )
+ {
+ pUserTyp->SetContent( rNewFieldContent );
+ }
+ }
}
String SwInputField::GetFieldName() const
@@ -1008,18 +1205,24 @@ String SwInputField::GetFieldName() cons
{
aStr += GetTyp()->GetName();
aStr += ' ';
- aStr += aContent;
+ aStr += getContent();
}
return aStr;
}
SwField* SwInputField::Copy() const
{
- SwInputField* pFld = new SwInputField((SwInputFieldType*)GetTyp(), aContent,
- aPText, GetSubType(), GetFormat());
+ SwInputField* pFld =
+ new SwInputField(
+ static_cast<SwInputFieldType*>(GetTyp()),
+ getContent(),
+ aPText,
+ GetSubType(),
+ GetFormat(),
+ mbIsFormField );
- pFld->SetHelp(aHelp);
- pFld->SetToolTip(aToolTip);
+ pFld->SetHelp( aHelp );
+ pFld->SetToolTip( aToolTip );
pFld->SetAutomaticLanguage(IsAutomaticLanguage());
return pFld;
@@ -1027,81 +1230,87 @@ SwField* SwInputField::Copy() const
String SwInputField::Expand() const
{
- String sRet;
- if((nSubType & 0x00ff) == INP_TXT)
- sRet = aContent;
+ String sRet;
+ if ( (nSubType & 0x00ff) == INP_TXT )
+ {
+ sRet = getContent();
+ }
+ else if( (nSubType & 0x00ff) == INP_USR )
+ {
+ SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
+ static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->GetFldType( RES_USERFLD, getContent(), false ) );
+ if( pUserTyp )
+ sRet = pUserTyp->GetContent();
+ }
+ return sRet;
+}
- else if( (nSubType & 0x00ff) == INP_USR )
- {
- SwUserFieldType* pUserTyp = (SwUserFieldType*)
- ((SwInputFieldType*)GetTyp())->GetDoc()->
- GetFldType( RES_USERFLD, aContent, false );
- if( pUserTyp )
- sRet = pUserTyp->GetContent();
- }
- return sRet;
+
+bool SwInputField::isFormField() const
+{
+ return mbIsFormField
+ || aHelp.Len() > 0
+ || aToolTip.Len() > 0;
}
+
sal_Bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
- {
- case FIELD_PROP_PAR1:
- rAny <<= OUString( aContent );
- break;
- case FIELD_PROP_PAR2:
- rAny <<= OUString( aPText );
- break;
+ {
+ case FIELD_PROP_PAR1:
+ rAny <<= OUString( getContent() );
+ break;
+ case FIELD_PROP_PAR2:
+ rAny <<= OUString( aPText );
+ break;
case FIELD_PROP_PAR3:
rAny <<= OUString( aHelp );
break;
case FIELD_PROP_PAR4:
rAny <<= OUString( aToolTip );
break;
- default:
- DBG_ERROR("illegal property");
- }
- return sal_True;
+ default:
+ DBG_ERROR("illegal property");
+ }
+ return sal_True;
}
sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
- {
- case FIELD_PROP_PAR1:
- ::GetString( rAny, aContent );
- break;
- case FIELD_PROP_PAR2:
- ::GetString( rAny, aPText );
- break;
+ {
+ case FIELD_PROP_PAR1:
+ {
+ ::GetString( rAny, aContent );
+ }
+ break;
+ case FIELD_PROP_PAR2:
+ ::GetString( rAny, aPText );
+ break;
case FIELD_PROP_PAR3:
::GetString( rAny, aHelp );
break;
case FIELD_PROP_PAR4:
::GetString( rAny, aToolTip );
break;
- default:
- DBG_ERROR("illegal property");
- }
- return sal_True;
+ default:
+ DBG_ERROR("illegal property");
+ }
+ return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung: Bedingung setzen
- --------------------------------------------------------------------*/
+
void SwInputField::SetPar1(const String& rStr)
{
- aContent = rStr;
+ aContent = rStr;
}
const String& SwInputField::GetPar1() const
{
- return aContent;
+ return getContent();
}
-/*--------------------------------------------------------------------
- Beschreibung: True/False Text
- --------------------------------------------------------------------*/
void SwInputField::SetPar2(const String& rStr)
{
@@ -1133,11 +1342,6 @@ String SwInputField::GetToolTip() const
return aToolTip;
}
-sal_Bool SwInputField::isFormField() const
-{
- return aHelp.Len() > 0 || aToolTip.Len() > 0;
-}
-
sal_uInt16 SwInputField::GetSubType() const
{
return nSubType;
@@ -1148,150 +1352,3 @@ void SwInputField::SetSubType(sal_uInt16
nSubType = nSub;
}
-sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
-{
- switch( nWhichId )
- {
- case FIELD_PROP_BOOL2:
- {
- sal_Bool bVal = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
- rAny.setValue(&bVal, ::getBooleanCppuType());
- }
- break;
- case FIELD_PROP_FORMAT:
- rAny <<= (sal_Int32)GetFormat();
- break;
- case FIELD_PROP_USHORT2:
- rAny <<= (sal_Int16)GetFormat();
- break;
- case FIELD_PROP_USHORT1:
- rAny <<= (sal_Int16)nSeqNo;
- break;
- case FIELD_PROP_PAR1:
- rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
- break;
- case FIELD_PROP_PAR2:
- {
- //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 sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
- rAny <<= OUString( sMyFormula );
- }
- break;
- case FIELD_PROP_DOUBLE:
- rAny <<= (double)GetValue();
- break;
- case FIELD_PROP_SUBTYPE:
- {
- sal_Int16 nRet = 0;
- nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
- rAny <<= nRet;
- }
- break;
- case FIELD_PROP_PAR3:
- rAny <<= OUString( aPText );
- break;
- case FIELD_PROP_BOOL3:
- {
- sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
- rAny.setValue(&bTmp, ::getBooleanCppuType());
- }
- break;
- case FIELD_PROP_BOOL1:
- {
- sal_Bool bTmp = GetInputFlag();
- rAny.setValue(&bTmp, ::getBooleanCppuType());
- }
- break;
- case FIELD_PROP_PAR4:
- rAny <<= rtl::OUString(GetExpStr());
- break;
- default:
- return SwField::QueryValue(rAny, nWhichId);
- }
- return sal_True;
-}
-
-sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
-{
- sal_Int32 nTmp32 = 0;
- sal_Int16 nTmp16 = 0;
- String sTmp;
- switch( nWhichId )
- {
- case FIELD_PROP_BOOL2:
- if(*(sal_Bool*)rAny.getValue())
- nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
- else
- nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
- break;
- case FIELD_PROP_FORMAT:
- rAny >>= nTmp32;
- SetFormat(nTmp32);
- break;
- case FIELD_PROP_USHORT2:
- {
- rAny >>= nTmp16;
- if(nTmp16 <= SVX_NUMBER_NONE )
- SetFormat(nTmp16);
- else {
- //exception(wrong_value)
- ;
- }
- }
- break;
- case FIELD_PROP_USHORT1:
- rAny >>= nTmp16;
- nSeqNo = nTmp16;
- break;
- case FIELD_PROP_PAR1:
- SetPar1( SwStyleNameMapper::GetUIName(
- ::GetString( rAny, sTmp ), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
- break;
- case FIELD_PROP_PAR2:
- {
- OUString uTmp;
- rAny >>= 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 sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
- SetFormula( sMyFormula );
- }
- break;
- case FIELD_PROP_DOUBLE:
- {
- double fVal = 0.0;
- rAny >>= fVal;
- SetValue(fVal);
- }
- break;
- case FIELD_PROP_SUBTYPE:
- nTmp32 = lcl_APIToSubType(rAny);
- if(nTmp32 >= 0)
- SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
- break;
- case FIELD_PROP_PAR3:
- ::GetString( rAny, aPText );
- break;
- case FIELD_PROP_BOOL3:
- if(*(sal_Bool*) rAny.getValue())
- nSubType |= nsSwExtendedSubType::SUB_CMD;
- else
- nSubType &= (~nsSwExtendedSubType::SUB_CMD);
- break;
- case FIELD_PROP_BOOL1:
- SetInputFlag(*(sal_Bool*) rAny.getValue());
- break;
- case FIELD_PROP_PAR4:
- ChgExpStr( ::GetString( rAny, sTmp ));
- break;
- default:
- return SwField::PutValue(rAny, nWhichId);
- }
- return sal_True;
-}
-
-
-
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/fields/fldbas.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/fields/fldbas.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/fields/fldbas.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/fields/fldbas.cxx Mon Nov 18 12:53:58 2013
@@ -180,13 +180,19 @@ sal_Bool SwFieldType::PutValue( const un
Felder sind n-mal vorhanden, Feldtypen nur einmal
--------------------------------------------------------------------*/
-SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, sal_uInt16 nLng) :
- nLang(nLng),
- bIsAutomaticLanguage(sal_True),
- nFormat(nFmt)
+SwField::SwField(
+ SwFieldType* pTyp,
+ sal_uInt32 nFmt,
+ sal_uInt16 nLng,
+ bool bUseFieldValueCache )
+ : m_Cache()
+ , m_bUseFieldValueCache( bUseFieldValueCache )
+ , nLang( nLng )
+ , bIsAutomaticLanguage( sal_True )
+ , nFormat( nFmt )
+ , pType( pTyp )
{
- ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
- pType = pTyp;
+ ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
}
SwField::~SwField()
@@ -425,11 +431,16 @@ sal_Bool SwField::IsFixed() const
String SwField::ExpandField(bool const bCached) const
{
- if (!bCached) // #i85766# do not expand fields in clipboard documents
+ if ( m_bUseFieldValueCache )
{
- m_Cache = Expand();
+ if (!bCached) // #i85766# do not expand fields in clipboard documents
+ {
+ m_Cache = Expand();
+ }
+ return m_Cache;
}
- return m_Cache;
+
+ return Expand();
}
SwField * SwField::CopyField() const
@@ -438,6 +449,8 @@ SwField * SwField::CopyField() const
// #i85766# cache expansion of source (for clipboard)
// use this->cache, not this->Expand(): only text formatting calls Expand()
pNew->m_Cache = m_Cache;
+ pNew->m_bUseFieldValueCache = m_bUseFieldValueCache;
+
return pNew;
}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/fields/reffld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/fields/reffld.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/fields/reffld.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/fields/reffld.cxx Mon Nov 18 12:53:58 2013
@@ -277,20 +277,18 @@ String SwGetRefField::GetFieldName() con
return aStr;
}
-// --> OD 2007-09-07 #i81002# - parameter <pFldTxtAttr> added
void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
{
- sTxt.Erase();
+ sTxt.Erase();
SwDoc* pDoc = ((SwGetRefFieldType*)GetTyp())->GetDoc();
sal_uInt16 nStt = USHRT_MAX;
sal_uInt16 nEnd = USHRT_MAX;
- SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName,
- nSubType, nSeqNo, &nStt, &nEnd );
+ SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName, nSubType, nSeqNo, &nStt, &nEnd );
if ( !pTxtNd )
{
sTxt = ViewShell::GetShellRes()->aGetRefFld_RefItemNotFound;
- return ;
+ return ;
}
switch( GetFormat() )
@@ -314,8 +312,7 @@ void SwGetRefField::UpdateField( const S
case REF_ONLYCAPTION:
{
- const SwTxtAttr* const pTxtAttr =
- pTxtNd->GetTxtAttrForCharAt(nStt, RES_TXTATR_FIELD);
+ const SwTxtAttr* const pTxtAttr = pTxtNd->GetTxtAttrForCharAt(nStt, RES_TXTATR_FIELD);
if( pTxtAttr )
nStt = SwGetExpField::GetReferenceTextPos(
pTxtAttr->GetFmtFld(), *pDoc );
@@ -421,34 +418,31 @@ void SwGetRefField::UpdateField( const S
}
break;
- case REF_UPDOWN:
- {
- // --> OD 2007-09-07 #i81002#
+ case REF_UPDOWN:
+ {
// simplified: use parameter <pFldTxtAttr>
if( !pFldTxtAttr || !pFldTxtAttr->GetpTxtNode() )
- break;
+ break;
- LocaleDataWrapper aLocaleData(
- ::comphelper::getProcessServiceFactory(),
- SvxCreateLocale( GetLanguage() ) );
+ LocaleDataWrapper aLocaleData( ::comphelper::getProcessServiceFactory(), SvxCreateLocale( GetLanguage() ) );
- // erstmal ein "Kurz" - Test - falls beide im selben
- // Node stehen!
+ // erstmal ein "Kurz" - Test - falls beide im selben
+ // Node stehen!
if( pFldTxtAttr->GetpTxtNode() == pTxtNd )
- {
+ {
sTxt = nStt < *pFldTxtAttr->GetStart()
- ? aLocaleData.getAboveWord()
- : aLocaleData.getBelowWord();
- break;
- }
+ ? aLocaleData.getAboveWord()
+ : aLocaleData.getBelowWord();
+ break;
+ }
+
+ sTxt =
+ ::IsFrameBehind( *pFldTxtAttr->GetpTxtNode(), *pFldTxtAttr->GetStart(), *pTxtNd, nStt )
+ ? aLocaleData.getAboveWord()
+ : aLocaleData.getBelowWord();
+ }
+ break;
- sTxt = ::IsFrameBehind( *pFldTxtAttr->GetpTxtNode(), *pFldTxtAttr->GetStart(),
- *pTxtNd, nStt )
- ? aLocaleData.getAboveWord()
- : aLocaleData.getBelowWord();
- }
- break;
- // --> OD 2007-08-24 #i81002#
case REF_NUMBER:
case REF_NUMBER_NO_CONTEXT:
case REF_NUMBER_FULL_CONTEXT:
@@ -459,7 +453,7 @@ void SwGetRefField::UpdateField( const S
}
}
break;
- // <--
+
default:
DBG_ERROR("<SwGetRefField::UpdateField(..)> - unknown format type");
}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/fefly1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/fefly1.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/fefly1.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/fefly1.cxx Mon Nov 18 12:53:58 2013
@@ -120,8 +120,12 @@ sal_Bool lcl_SetNewFlyPos( const SwNode&
return bRet;
}
-sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
- SfxItemSet& rSet )
+sal_Bool lcl_FindAnchorPos(
+ SwEditShell& rEditShell,
+ SwDoc& rDoc,
+ const Point& rPt,
+ const SwFrm& rFrm,
+ SfxItemSet& rSet )
{
sal_Bool bRet = sal_True;
SwFmtAnchor aNewAnch( (SwFmtAnchor&)rSet.Get( RES_ANCHOR ) );
@@ -147,25 +151,32 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc,
break;
}
- SwPosition aPos( *((SwCntntFrm*)pNewAnch)->GetNode() );
+ SwPosition aPos( *((SwCntntFrm*)pNewAnch)->GetNode() );
if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew))
- {
- // es muss ein TextNode gefunden werden, denn nur in diesen
- // ist ein Inhaltsgebundene Frames zu verankern
- SwCrsrMoveState aState( MV_SETONLYTEXT );
- aTmpPnt.X() -= 1; //nicht im Fly landen!!
- if( !pNewAnch->GetCrsrOfst( &aPos, aTmpPnt, &aState ) )
- {
- SwCntntNode* pCNd = ((SwCntntFrm*)pNewAnch)->GetNode();
- if( pNewAnch->Frm().Bottom() < aTmpPnt.Y() )
- pCNd->MakeStartIndex( &aPos.nContent );
- else
- pCNd->MakeEndIndex( &aPos.nContent );
- }
- }
- aNewAnch.SetAnchor( &aPos );
- }
- break;
+ {
+ // es muss ein TextNode gefunden werden, denn nur in diesen
+ // ist ein Inhaltsgebundene Frames zu verankern
+ SwCrsrMoveState aState( MV_SETONLYTEXT );
+ aTmpPnt.X() -= 1; //nicht im Fly landen!!
+ if( !pNewAnch->GetCrsrOfst( &aPos, aTmpPnt, &aState ) )
+ {
+ SwCntntNode* pCNd = ((SwCntntFrm*)pNewAnch)->GetNode();
+ if( pNewAnch->Frm().Bottom() < aTmpPnt.Y() )
+ pCNd->MakeStartIndex( &aPos.nContent );
+ else
+ pCNd->MakeEndIndex( &aPos.nContent );
+ }
+ else
+ {
+ if ( rEditShell.PosInsideInputFld( aPos ) )
+ {
+ aPos.nContent = rEditShell.StartOfInputFldAtPos( aPos );
+ }
+ }
+ }
+ aNewAnch.SetAnchor( &aPos );
+ }
+ break;
case FLY_AT_FLY: // LAYER_IMPL
{
@@ -207,7 +218,10 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc,
//
//! also used in unoframe.cxx
//
-sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet )
+sal_Bool lcl_ChkAndSetNewAnchor(
+ SwEditShell& rEditShell,
+ const SwFlyFrm& rFly,
+ SfxItemSet& rSet )
{
const SwFrmFmt& rFmt = *rFly.GetFmt();
const SwFmtAnchor &rOldAnch = rFmt.GetAnchor();
@@ -227,7 +241,7 @@ sal_Bool lcl_ChkAndSetNewAnchor( const S
"Unerlaubter Ankerwechsel in Head/Foot." );
#endif
- return ::lcl_FindAnchorPos( *pDoc, rFly.Frm().Pos(), rFly, rSet );
+ return ::lcl_FindAnchorPos( rEditShell, *pDoc, rFly.Frm().Pos(), rFly, rSet );
}
void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew )
@@ -441,7 +455,7 @@ Point SwFEShell::FindAnchorPos( const Po
// --> OD 2004-07-16 #i28701#
SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
- RndStdIds nAnchorId = rFmt.GetAnchor().GetAnchorId();
+ const RndStdIds nAnchorId = rFmt.GetAnchor().GetAnchorId();
if ( FLY_AS_CHAR == nAnchorId )
return aRet;
@@ -480,35 +494,35 @@ Point SwFEShell::FindAnchorPos( const Po
pFooterOrHeader = pCntnt->FindFooterOrHeader();
}
- //Ausgehend von der linken oberen Ecke des Fly den
- //dichtesten SwFlyFrm suchen.
- SwCntntFrm *pTxtFrm;
- {
- SwCrsrMoveState aState( MV_SETONLYTEXT );
- SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
- Point aTmpPnt( rAbsPos );
- GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
- pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(),0,&aPos,sal_False );
- }
- const SwFrm *pNewAnch;
- if( pTxtFrm )
- {
+ SwCntntFrm *pTxtFrm = NULL;
+ {
+ SwCrsrMoveState aState( MV_SETONLYTEXT );
+ SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
+ Point aTmpPnt( rAbsPos );
+ GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
+ if ( nAnchorId != FLY_AT_CHAR
+ || !PosInsideInputFld( aPos ) )
+ {
+ pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(),0,&aPos,sal_False );
+ }
+ }
+ const SwFrm *pNewAnch = NULL;
+ if( pTxtFrm != NULL )
+ {
if ( FLY_AT_PAGE == nAnchorId )
{
- pNewAnch = pTxtFrm->FindPageFrm();
+ pNewAnch = pTxtFrm->FindPageFrm();
}
- else
- {
- pNewAnch = ::FindAnchor( pTxtFrm, rAbsPos );
+ else
+ {
+ pNewAnch = ::FindAnchor( pTxtFrm, rAbsPos );
- if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL
+ if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL
{
- pNewAnch = pNewAnch->FindFlyFrm();
+ pNewAnch = pNewAnch->FindFlyFrm();
}
- }
- }
- else
- pNewAnch = 0;
+ }
+ }
if( pNewAnch && !pNewAnch->IsProtected() )
{
@@ -548,6 +562,7 @@ Point SwFEShell::FindAnchorPos( const Po
GetPhyPageNum() );
break;
}
+
case FLY_AT_FLY:
{
SwPosition aPos( *((SwFlyFrm*)pNewAnch)->GetFmt()->
@@ -555,29 +570,32 @@ Point SwFEShell::FindAnchorPos( const Po
aAnch.SetAnchor( &aPos );
break;
}
+
case FLY_AT_CHAR:
- {
- SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
- Point aTmpPnt( rAbsPos );
- if( pTxtFrm->GetCrsrOfst( pPos, aTmpPnt, NULL ) )
- {
- SwRect aTmpRect;
- pTxtFrm->GetCharRect( aTmpRect, *pPos );
- aRet = aTmpRect.Pos();
- }
- else
- {
- pPos->nNode = *pTxtFrm->GetNode();
- pPos->nContent.Assign(0,0);
- }
- break;
- }
+ {
+ SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
+ Point aTmpPnt( rAbsPos );
+ if( pTxtFrm->GetCrsrOfst( pPos, aTmpPnt, NULL ) )
+ {
+ SwRect aTmpRect;
+ pTxtFrm->GetCharRect( aTmpRect, *pPos );
+ aRet = aTmpRect.Pos();
+ }
+ else
+ {
+ pPos->nNode = *pTxtFrm->GetNode();
+ pPos->nContent.Assign(0,0);
+ }
+ break;
+ }
default:
break;
- }
- if( bMoveIt )
- {
- StartAllAction();
+
+ }
+
+ if( bMoveIt )
+ {
+ StartAllAction();
// --> OD 2006-02-28 #125892#
// handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
@@ -944,7 +962,7 @@ void SwFEShell::InsertDrawObj( SdrObject
const Point aRelPos( rInsertPosition.X() - pFrm->Frm().Left(),
rInsertPosition.Y() - pFrm->Frm().Top() );
rDrawObj.SetRelativePos( aRelPos );
- ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet );
+ ::lcl_FindAnchorPos( *this, *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet );
}
// insert drawing object into the document creating a new <SwDrawFrmFmt> instance
SwDrawFrmFmt* pFmt = GetDoc()->Insert( aPam, rDrawObj, &rFlyAttrSet, 0 );
@@ -1142,7 +1160,7 @@ sal_Bool SwFEShell::SetFlyFrmAttr( SfxIt
const Point aPt( pFly->Frm().Pos() );
if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, sal_False ))
- ::lcl_ChkAndSetNewAnchor( *pFly, rSet );
+ ::lcl_ChkAndSetNewAnchor( *this, *pFly, rSet );
SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt();
if( GetDoc()->SetFlyFrmAttr( *pFlyFmt, rSet ))
@@ -1308,7 +1326,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNe
{
pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
- if( !::lcl_ChkAndSetNewAnchor( *pFly, *pSet ))
+ if( !::lcl_ChkAndSetNewAnchor( *this, *pFly, *pSet ))
delete pSet, pSet = 0;
}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/feshview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/feshview.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/feshview.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/feshview.cxx Mon Nov 18 12:53:58 2013
@@ -1020,6 +1020,27 @@ sal_Bool SwFEShell::IsObjSelected( const
->IsObjMarked( const_cast< SdrObject * >( &rObj ) );
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SwFEShell::IsObjSameLevelWithMarked(const SdrObject* pObj) const
+{
+ if (pObj)
+ {
+ const SdrMarkList& aMarkList = Imp()->GetDrawView()->GetMarkedObjectList();
+ if (aMarkList.GetMarkCount() == 0)
+ {
+ return sal_True;
+ }
+ SdrMark* pM=aMarkList.GetMark(0);
+ if (pM)
+ {
+ SdrObject* pMarkObj = pM->GetMarkedSdrObj();
+ if (pMarkObj && pMarkObj->GetUpGroup() == pObj->GetUpGroup())
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* SwFEShell::EndTextEdit()
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/tblsel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/tblsel.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/tblsel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/frmedt/tblsel.cxx Mon Nov 18 12:53:58 2013
@@ -2255,7 +2255,11 @@ inline void UnsetFollow( SwFlowFrm *pTab
pTab->bIsFollow = sal_False;
}
-void _FndBox::DelFrms( SwTable &rTable )
+//IAccessibility2 Implementation 2009-----
+//Solution:When bAccTableDispose is FALSE,the acc table should not be disposed.
+//void _FndBox::DelFrms( SwTable &rTable )
+void _FndBox::DelFrms( SwTable &rTable,sal_Bool bAccTableDispose )
+//-----IAccessibility2 Implementation 2009
{
//Alle Lines zwischen pLineBefore und pLineBehind muessen aus dem
//Layout ausgeschnitten und geloescht werden.
@@ -2373,9 +2377,14 @@ void _FndBox::DelFrms( SwTable &rTable )
// next turn.
((SwTabFrm*)pTabFrm)->SetFollowFlowLine( sal_False );
}
-
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Set acc table dispose state
+ pFrm->SetAccTableDispose( bAccTableDispose );
pFrm->Cut();
+ //Solution:Set acc table dispose state to default value.
+ pFrm->SetAccTableDispose( sal_True );
delete pFrm;
+ //-----IAccessibility2 Implementation 2009
}
}
}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/SwPortionHandler.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/SwPortionHandler.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/SwPortionHandler.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/SwPortionHandler.hxx Mon Nov 18 12:53:58 2013
@@ -92,6 +92,10 @@ public:
* paragraph's portions have been processed.
*/
virtual void Finish() = 0;
+ //IAccessibility2 Implementation 2009-----
+ virtual void SetAttrFieldType( sal_uInt16 )
+ { return; }
+ //-----IAccessibility2 Implementation 2009
};
#endif
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/docfld.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/docfld.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/docfld.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/docfld.hxx Mon Nov 18 12:53:58 2013
@@ -80,10 +80,7 @@ public:
_SetGetExpFld( const SwFlyFrmFmt& rFlyFmt, const SwPosition* pPos = 0 );
- sal_Bool operator==( const _SetGetExpFld& rFld ) const
- { return nNode == rFld.nNode && nCntnt == rFld.nCntnt &&
- ( !CNTNT.pTxtFld || !rFld.CNTNT.pTxtFld ||
- CNTNT.pTxtFld == rFld.CNTNT.pTxtFld ); }
+ sal_Bool operator==( const _SetGetExpFld& rFld ) const;
sal_Bool operator<( const _SetGetExpFld& rFld ) const;
const SwTxtFld* GetTxtFld() const
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/doctxm.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/doctxm.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/doctxm.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/doctxm.hxx Mon Nov 18 12:53:58 2013
@@ -102,6 +102,9 @@ public:
const bool _bNewTOX = false ); // Formatieren
void UpdatePageNum(); // Seitennummern einfuegen
TYPEINFO(); // fuers rtti
+//IAccessibility2 Implementation 2009-----
+ SwTOXSortTabBases* GetTOXSortTabBases() { return &aSortArr; }
+//-----IAccessibility2 Implementation 2009
sal_Bool SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart = sal_True ) const;
};
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/frame.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/frame.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/frame.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/frame.hxx Mon Nov 18 12:53:58 2013
@@ -29,6 +29,11 @@
#include "calbck.hxx" // fuer SwClient
#include <svl/brdcst.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/style/TabStop.hpp>
+#include <comphelper/stlunosequence.hxx>
+using namespace ::com::sun::star;
+//-----IAccessibility2 Implementation 2009
class SwLayoutFrm;
class SwRootFrm;
class SwPageFrm;
@@ -292,6 +297,10 @@ class SwFrm: public SwClient, public Sfx
//Cache fuer (Umrandungs-)Attribute.
static SwCache *pCache;
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Member to identify if acc table should be disposed
+ sal_Bool bIfAccTableShouldDisposing;
+ //-----IAccessibility2 Implementation 2009
// --> OD 2006-05-10 #i65250#
// frame ID is now in general available - used for layout loop control
@@ -415,6 +424,12 @@ protected:
sal_Bool bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
//wenn sal_True.
public:
+ //IAccessibility2 Implementation 2009-----
+ virtual uno::Sequence< style::TabStop > GetTabStopInfo( SwTwips )
+ {
+ return uno::Sequence< style::TabStop >();
+ }
+ //-----IAccessibility2 Implementation 2009
sal_Bool bUnUsed2: 1;
protected:
sal_Bool bInfInvalid: 1; //InfoFlags sind Invalid.
@@ -769,6 +784,10 @@ public:
virtual Size ChgSize( const Size& aNewSize );
virtual void Cut() = 0;
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a method to change the acc table dispose state.
+ void SetAccTableDispose( sal_Bool bDispose){ bIfAccTableShouldDisposing = bDispose;}
+ //-----IAccessibility2 Implementation 2009
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
void ValidateLineNum() { bValidLineNum = sal_True; }
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/rolbck.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/rolbck.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/rolbck.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/rolbck.hxx Mon Nov 18 12:53:58 2013
@@ -403,11 +403,14 @@ public:
// helper methods for recording attribute in History
// used by Undo classes (Delete/Overwrite/Inserts)
- void CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx, xub_StrLen nStart,
- xub_StrLen nEnd, bool bFields );
- // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ void CopyAttr(
+ SwpHints* pHts,
+ const sal_uLong nNodeIdx,
+ const xub_StrLen nStart,
+ const xub_StrLen nEnd,
+ const bool bCopyFields );
+
void CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx );
- // <--
};
#ifndef ROLBCK_HISTORY_ONLY
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/rootfrm.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/rootfrm.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/rootfrm.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/rootfrm.hxx Mon Nov 18 12:53:58 2013
@@ -268,8 +268,9 @@ public:
// next page border
const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
- //Der Crsr moechte die zu selektierenden Bereiche wissen.
- void CalcFrmRects( SwShellCrsr&, sal_Bool bIsTblSel );
+ void CalcFrmRects(
+ SwShellCrsr&,
+ const sal_Bool bIsTblSel );
// Calculates the cells included from the current selection
// false: There was no result because of an invalid layout
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/swfont.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/swfont.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/swfont.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/swfont.hxx Mon Nov 18 12:53:58 2013
@@ -126,16 +126,20 @@ public:
#define SW_SCRIPTS 3
class SwFont
-{ // CJK == Chinese, Japanese, Korean
- // CTL == Complex text layout ( Hebrew, Arabic )
- SwSubFont aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font
- Color* pBackColor; // background color (i.e. at character styles)
- Color aUnderColor; // color of the underlining
- Color aOverColor; // color of the overlining
- sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
- sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
- sal_uInt8 m_nMetaCount; // count META/METAFIELD
- sal_uInt8 nActual; // actual font (Latin, CJK or CTL)
+{ // CJK == Chinese, Japanese, Korean
+ // CTL == Complex text layout ( Hebrew, Arabic )
+ SwSubFont aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font
+
+ Color* pBackColor; // background color (i.e. at character styles)
+ Color aUnderColor; // color of the underlining
+ Color aOverColor; // color of the overlining
+
+ sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
+ sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
+ sal_uInt8 m_nMetaCount; // count META/METAFIELD
+ sal_uInt8 m_nInputFieldCount; // count INPUTFIELD
+
+ sal_uInt8 nActual; // actual font (Latin, CJK or CTL)
// Schalter fuer die Font-Extensions
sal_Bool bNoHyph :1; // SwTxtNoHyphenHere: keine Trennstelle
@@ -242,6 +246,9 @@ public:
inline sal_uInt8 &GetMeta() { return m_nMetaCount; }
inline sal_uInt8 GetMeta() const { return m_nMetaCount; }
inline bool IsMeta() const { return (0 != m_nMetaCount); }
+ inline sal_uInt8 &GetInputField() { return m_nInputFieldCount; }
+ inline sal_uInt8 GetInputField() const { return m_nInputFieldCount; }
+ inline bool IsInputField() const { return (0 != m_nInputFieldCount); }
inline void SetURL( const sal_Bool bURL );
inline sal_Bool IsURL() const { return bURL; }
inline void SetGreyWave( const sal_Bool bNew );
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/txtfrm.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/txtfrm.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/txtfrm.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/txtfrm.hxx Mon Nov 18 12:53:58 2013
@@ -26,7 +26,9 @@
#include <tools/mempool.hxx>
#include <tools/string.hxx>
#include "cntfrm.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include "com/sun/star/uno/Sequence.hxx"
+//-----IAccessibility2 Implementation 2009
#define STRSIZE(x) (sizeof(x)-1)
class SwCharRange;
@@ -229,6 +231,9 @@ protected:
public:
+ //IAccessibility2 Implementation 2009-----
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > GetTabStopInfo( SwTwips CurrentPos );
+ //-----IAccessibility2 Implementation 2009
//public, weil der eine oder andere die Methode rufen darf um das
//Prepare zu sparen - mit Vorsicht zu geniessen!
void Init();
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/txttypes.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/txttypes.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/txttypes.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/txttypes.hxx Mon Nov 18 12:53:58 2013
@@ -51,6 +51,7 @@
#define POR_PARA 0x8002
#define POR_URL 0x8003
#define POR_HNG 0x8004
+#define POR_INPUTFLD 0x8005
#define POR_DROP 0x8080
#define POR_TOX 0x8089
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/inc/viewimp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/inc/viewimp.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/inc/viewimp.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/inc/viewimp.hxx Mon Nov 18 12:53:58 2013
@@ -286,6 +286,12 @@ public:
inline void AddAccessibleObj( const SdrObject *pObj );
+ //IAccessibility2 Implementation 2009-----
+ void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
+ void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
+ void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
+ //-----IAccessibility2 Implementation 2009
+
// Invalidate accessible frame's frame's content
void InvalidateAccessibleFrmContent( const SwFrm *pFrm );
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/layout/atrfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/layout/atrfrm.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/layout/atrfrm.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/layout/atrfrm.cxx Mon Nov 18 12:53:58 2013
@@ -3294,3 +3294,19 @@ IMapObject* SwFrmFmt::GetIMapObject( con
return 0;
}
+sal_Bool SwFrmFmt::HasCaption() const
+{
+ if(pCaptionFmt != NULL && pCaptionFmt->GetDepends())
+ return sal_True;
+ return sal_False;
+}
+
+void SwFrmFmt::SetCaptionFmt(SwFrmFmt * pFmt)
+{
+ pCaptionFmt = pFmt;
+}
+
+SwFrmFmt* SwFrmFmt::GetCaptionFmt() const
+{
+ return pCaptionFmt;
+}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/layout/flycnt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/layout/flycnt.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/layout/flycnt.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/layout/flycnt.cxx Mon Nov 18 12:53:58 2013
@@ -47,26 +47,19 @@
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
+#include <txatbase.hxx>
#include "tabfrm.hxx"
#include "flyfrms.hxx"
#include "crstate.hxx"
#include "sectfrm.hxx"
-// OD 29.10.2003 #113049#
#include <tocntntanchoredobjectposition.hxx>
-// OD 2004-05-24 #i28701#
#include <dcontact.hxx>
#include <sortedobjs.hxx>
-// --> OD 2005-09-29 #125370#,#125957#
#include <layouter.hxx>
-// <--
-// --> OD 2005-11-17 #i56300#
#include <objectformattertxtfrm.hxx>
-// <--
-// --> OD 2006-03-06 #125892#
#include <HandleAnchorNodeChg.hxx>
-// <--
using namespace ::com::sun::star;
@@ -1467,36 +1460,44 @@ void SwFlyAtCntFrm::SetAbsPos( const Poi
if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTxtFrm() &&
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE)) )
- {
- //Das Ankerattribut auf den neuen Cnt setzen.
- SwFmtAnchor aAnch( pFmt->GetAnchor() );
- SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
- if( IsAutoPos() && pCnt->IsTxtFrm() )
- {
- SwCrsrMoveState eTmpState( MV_SETONLYTEXT );
- Point aPt( rNew );
- if( pCnt->GetCrsrOfst( pPos, aPt, &eTmpState )
- && pPos->nNode == *pCnt->GetNode() )
- {
+ {
+ //Das Ankerattribut auf den neuen Cnt setzen.
+ SwFmtAnchor aAnch( pFmt->GetAnchor() );
+ SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
+ if( IsAutoPos() && pCnt->IsTxtFrm() )
+ {
+ SwCrsrMoveState eTmpState( MV_SETONLYTEXT );
+ Point aPt( rNew );
+ if( pCnt->GetCrsrOfst( pPos, aPt, &eTmpState )
+ && pPos->nNode == *pCnt->GetNode() )
+ {
+ if ( pCnt->GetNode()->GetTxtNode() != NULL )
+ {
+ const SwTxtAttr* pTxtInputFld =
+ pCnt->GetNode()->GetTxtNode()->GetTxtAttrAt( pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTxtNode::PARENT );
+ if ( pTxtInputFld != NULL )
+ {
+ pPos->nContent = *(pTxtInputFld->GetStart());
+ }
+ }
ResetLastCharRectHeight();
if( text::RelOrientation::CHAR == pFmt->GetVertOrient().GetRelationOrient() )
- nY = LONG_MAX;
+ nY = LONG_MAX;
if( text::RelOrientation::CHAR == pFmt->GetHoriOrient().GetRelationOrient() )
- nX = LONG_MAX;
- }
- else
- {
- pPos->nNode = *pCnt->GetNode();
- pPos->nContent.Assign( pCnt->GetNode(), 0 );
- }
- }
- else
- {
- pPos->nNode = *pCnt->GetNode();
- pPos->nContent.Assign( pCnt->GetNode(), 0 );
- }
+ nX = LONG_MAX;
+ }
+ else
+ {
+ pPos->nNode = *pCnt->GetNode();
+ pPos->nContent.Assign( pCnt->GetNode(), 0 );
+ }
+ }
+ else
+ {
+ pPos->nNode = *pCnt->GetNode();
+ pPos->nContent.Assign( pCnt->GetNode(), 0 );
+ }
- // --> OD 2006-02-27 #125892#
// handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
// re-created. Thus, delete all fly frames except the <this> before the
@@ -1505,21 +1506,18 @@ void SwFlyAtCntFrm::SetAbsPos( const Poi
SwHandleAnchorNodeChg aHandleAnchorNodeChg( *pFmt, aAnch, this );
pFmt->GetDoc()->SetAttr( aAnch, *pFmt );
}
- // <--
- }
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ }
else if ( pTmpPage && pTmpPage != GetPageFrm() )
GetPageFrm()->MoveFly( this, pTmpPage );
const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY );
- ChgRelPos( aRelPos );
+ ChgRelPos( aRelPos );
GetFmt()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
- if ( pOldPage != FindPageFrm() )
- ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
- sal_False );
+ if ( pOldPage != FindPageFrm() )
+ ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, sal_False );
}
// OD 2004-08-12 #i32795# - Note: method no longer used in <flyincnt.cxx>
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/layout/laycache.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/layout/laycache.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/layout/laycache.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/layout/laycache.cxx Mon Nov 18 12:53:58 2013
@@ -726,8 +726,8 @@ void lcl_ApplyWorkaroundForB6375613( SwF
SwDoc* pDoc( pFirstTextFrmOnNewPage->GetTxtNode()->GetDoc() );
IDocumentContentOperations* pIDCO = pFirstTextFrmOnNewPage->GetTxtNode()->getIDocumentContentOperations();
const SwPaM aTmpPaM( *(pFirstTextFrmOnNewPage->GetTxtNode()) );
- pIDCO->InsertPoolItem( aTmpPaM,
- SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0 );
+ pIDCO->InsertPoolItem(
+ aTmpPaM, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0 );
pFirstTextFrmOnNewPage->GetTxtNode()->UnlockModify();
uno::Reference< document::XDocumentInfoSupplier > xDoc(
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/layout/trvlfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/layout/trvlfrm.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/layout/trvlfrm.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/layout/trvlfrm.cxx Mon Nov 18 12:53:58 2013
@@ -2005,7 +2005,9 @@ inline void Sub( SwRegionRects& rRegion,
rRegion -= rRect;
}
-void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
+void SwRootFrm::CalcFrmRects(
+ SwShellCrsr &rCrsr,
+ const sal_Bool bIsTblMode )
{
SwPosition *pStartPos = rCrsr.Start(),
*pEndPos = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : rCrsr.GetPoint();
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/layout/wsfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/layout/wsfrm.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/layout/wsfrm.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/layout/wsfrm.cxx Mon Nov 18 12:53:58 2013
@@ -96,6 +96,10 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSi
pNext( 0 ),
pPrev( 0 ),
pDrawObjs( 0 )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a member to identify if the acc table should dispose
+ , bIfAccTableShouldDisposing( sal_False )
+ //-----IAccessibility2 Implementation 2009
, bInfBody( sal_False )
, bInfTab ( sal_False )
, bInfFly ( sal_False )
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/ole/ndole.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/ole/ndole.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/ole/ndole.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/ole/ndole.cxx Mon Nov 18 12:53:58 2013
@@ -794,6 +794,15 @@ void SwOLEObj::SetNode( SwOLENode* pNode
}
}
+//IAccessibility2 Implementation 2009-----
+String SwOLEObj::GetStyleString()
+{
+ String strStyle;
+ if (xOLERef.is() && xOLERef.IsChart())
+ strStyle = xOLERef.GetChartType();
+ return strStyle;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool SwOLEObj::IsOleRef() const
{
return xOLERef.is();
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/atrhndl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/atrhndl.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/atrhndl.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/atrhndl.hxx Mon Nov 18 12:53:58 2013
@@ -25,7 +25,7 @@
#define _ATRHNDL_HXX
#define INITIAL_NUM_ATTR 3
-#define NUM_ATTRIBUTE_STACKS 40
+#define NUM_ATTRIBUTE_STACKS 41
#include <txatbase.hxx>
#include <swfntcch.hxx>
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/atrstck.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/atrstck.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/atrstck.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/atrstck.cxx Mon Nov 18 12:53:58 2013
@@ -132,7 +132,7 @@ const sal_uInt8 StackPos[ static_cast<sa
0, // RES_TXTATR_CHARFMT, // 49
39, // RES_TXTATR_CJK_RUBY, // 50
0, // RES_TXTATR_UNKNOWN_CONTAINER, // 51
- 0, // RES_TXTATR_DUMMY5 // 52
+ 40, // RES_TXTATR_INPUTFIELD // 52
};
/*************************************************************************
@@ -525,20 +525,21 @@ sal_Bool SwAttrHandler::Push( const SwTx
if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
return sal_False;
- sal_uInt16 nStack = StackPos[ rItem.Which() ];
+ const sal_uInt16 nStack = StackPos[ rItem.Which() ];
// attributes originating from redlining have highest priority
// second priority are hyperlink attributes, which have a color replacement
const SwTxtAttr* pTopAttr = aAttrStack[ nStack ].Top();
- if ( !pTopAttr || rAttr.IsPriorityAttr() ||
- ( !pTopAttr->IsPriorityAttr() &&
- !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
+ if ( !pTopAttr
+ || rAttr.IsPriorityAttr()
+ || ( !pTopAttr->IsPriorityAttr()
+ && !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
{
aAttrStack[ nStack ].Push( rAttr );
return sal_True;
}
- sal_uInt16 nPos = aAttrStack[ nStack ].Count();
+ const sal_uInt16 nPos = aAttrStack[ nStack ].Count();
ASSERT( nPos, "empty stack?" );
aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
return sal_False;
@@ -688,6 +689,8 @@ void SwAttrHandler::ActivateTop( SwFont&
bVertLayout
);
}
+ else if ( RES_TXTATR_INPUTFIELD == nAttr )
+ rFnt.GetInputField()--;
}
/*************************************************************************
@@ -935,6 +938,12 @@ void SwAttrHandler::FontChg(const SfxPoo
else
rFnt.GetMeta()--;
break;
+ case RES_TXTATR_INPUTFIELD :
+ if ( bPush )
+ rFnt.GetInputField()++;
+ else
+ rFnt.GetInputField()--;
+ break;
}
}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/frmform.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/frmform.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/frmform.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/frmform.cxx Mon Nov 18 12:53:58 2013
@@ -57,6 +57,11 @@
#include <frmfmt.hxx> // SwFrmFmt
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <portab.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/tstpitem.hxx>
+//-----IAccessibility2 Implementation 2009
class FormatLevel
{
@@ -556,6 +561,47 @@ void SwTxtFrm::AdjustFrm( const SwTwips
UNDO_SWAP( this )
}
+//IAccessibility2 Implementation 2009-----
+com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTxtFrm::GetTabStopInfo( SwTwips CurrentPos )
+{
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs(1);
+ ::com::sun::star::style::TabStop ts;
+
+ SwTxtFormatInfo aInf( this );
+ SwTxtFormatter aLine( this, &aInf );
+ SwTxtCursor TxtCursor( this, &aInf );
+ const Point aCharPos( TxtCursor.GetTopLeft() );
+
+
+ SwTwips nRight = aLine.Right();
+ CurrentPos -= aCharPos.X();
+
+ // get current tab stop information stored in the Frm
+ const SvxTabStop *pTS = aLine.GetLineInfo().GetTabStop( CurrentPos, nRight );
+
+ if( !pTS )
+ {
+ return com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop >();
+ }
+
+ // copy tab stop information into a Sequence, which only contains one element.
+ ts.Position = pTS->GetTabPos();
+ ts.DecimalChar = pTS->GetDecimal();
+ ts.FillChar = pTS->GetFill();
+ switch( pTS->GetAdjustment() )
+ {
+ case SVX_TAB_ADJUST_LEFT : ts.Alignment = ::com::sun::star::style::TabAlign_LEFT; break;
+ case SVX_TAB_ADJUST_CENTER : ts.Alignment = ::com::sun::star::style::TabAlign_CENTER; break;
+ case SVX_TAB_ADJUST_RIGHT : ts.Alignment = ::com::sun::star::style::TabAlign_RIGHT; break;
+ case SVX_TAB_ADJUST_DECIMAL: ts.Alignment = ::com::sun::star::style::TabAlign_DECIMAL; break;
+ case SVX_TAB_ADJUST_DEFAULT: ts.Alignment = ::com::sun::star::style::TabAlign_DEFAULT; break;
+ default: break; // prevent warning
+ }
+
+ tabs[0] = ts;
+ return tabs;
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
* SwTxtFrm::AdjustFollow()
*************************************************************************/
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/inftxt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/inftxt.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/inftxt.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/inftxt.cxx Mon Nov 18 12:53:58 2013
@@ -1271,42 +1271,52 @@ void SwTxtPaintInfo::_DrawBackBrush( con
*************************************************************************/
void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
- const MSHORT nWhich ) const
+ const MSHORT nWhich ) const
{
- if( OnWin() && !IsMulti() )
- {
- sal_Bool bDraw = sal_False;
- switch( nWhich )
- {
- case POR_FTN:
- case POR_QUOVADIS:
- case POR_NUMBER:
- case POR_FLD:
- case POR_URL:
- case POR_HIDDEN:
- case POR_TOX:
- case POR_REF:
- case POR_META:
- case POR_CONTROLCHAR:
- if ( !GetOpt().IsPagePreview() &&
- !GetOpt().IsReadonly() &&
- SwViewOption::IsFieldShadings() &&
- (POR_NUMBER != nWhich ||
- pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
- bDraw = sal_True;
+ if( OnWin() && !IsMulti() )
+ {
+ sal_Bool bDraw = sal_False;
+ switch( nWhich )
+ {
+ case POR_FTN:
+ case POR_QUOVADIS:
+ case POR_NUMBER:
+ case POR_FLD:
+ case POR_URL:
+ case POR_HIDDEN:
+ case POR_TOX:
+ case POR_REF:
+ case POR_META:
+ case POR_CONTROLCHAR:
+ if ( !GetOpt().IsPagePreview()
+ && !GetOpt().IsReadonly()
+ && SwViewOption::IsFieldShadings()
+ && ( POR_NUMBER != nWhich
+ || pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
+ {
+ bDraw = sal_True;
+ }
break;
- case POR_TAB: if ( GetOpt().IsTab() ) bDraw = sal_True; break;
- case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = sal_True; break;
- case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
- default:
- {
- ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
- break;
- }
- }
- if ( bDraw )
- DrawBackground( rPor );
- }
+ case POR_INPUTFLD:
+ // input field shading also in read-only mode
+ if ( !GetOpt().IsPagePreview()
+ && SwViewOption::IsFieldShadings() )
+ {
+ bDraw = sal_True;
+ }
+ break;
+ case POR_TAB: if ( GetOpt().IsTab() ) bDraw = sal_True; break;
+ case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = sal_True; break;
+ case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
+ default:
+ {
+ ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
+ break;
+ }
+ }
+ if ( bDraw )
+ DrawBackground( rPor );
+ }
}
/*************************************************************************
@@ -1750,8 +1760,12 @@ sal_Bool SwTxtFormatInfo::LastKernPortio
* class SwTxtSlot
*************************************************************************/
-SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
- bool bTxtLen, bool bExgLists, const sal_Char *pCh )
+SwTxtSlot::SwTxtSlot(
+ const SwTxtSizeInfo *pNew,
+ const SwLinePortion *pPor,
+ bool bTxtLen,
+ bool bExgLists,
+ const sal_Char *pCh )
: pOldTxt( 0 ),
pOldSmartTagList( 0 ),
pOldGrammarCheckList( 0 ),
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/itrform2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/itrform2.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/itrform2.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/itrform2.cxx Mon Nov 18 12:53:58 2013
@@ -863,21 +863,27 @@ void SwMetaPortion::Paint( const SwTxtPa
SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
- SwTxtPortion *pPor = 0;
- if( GetFnt()->IsTox() )
- pPor = new SwToxPortion;
- else
- {
- if( GetFnt()->IsRef() )
- pPor = new SwRefPortion;
+ SwTxtPortion *pPor = 0;
+ if( GetFnt()->IsTox() )
+ {
+ pPor = new SwToxPortion;
+ }
+ else if ( GetFnt()->IsInputField() )
+ {
+ pPor = new SwTxtInputFldPortion();
+ }
+ else
+ {
+ if( GetFnt()->IsRef() )
+ pPor = new SwRefPortion;
else if (GetFnt()->IsMeta())
{
pPor = new SwMetaPortion;
}
- else
- {
- // Erst zum Schluss !
- // Wenn pCurr keine Breite hat, kann sie trotzdem schon Inhalt haben,
+ else
+ {
+ // Erst zum Schluss !
+ // Wenn pCurr keine Breite hat, kann sie trotzdem schon Inhalt haben,
// z.B. bei nicht darstellbaren Zeichen.
if( rInf.GetLen() > 0 )
{
@@ -895,8 +901,10 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPo
else
{
pPor = new SwTxtPortion;
- if( GetFnt()->IsURL() )
+ if ( GetFnt()->IsURL() )
+ {
pPor->SetWhichPor( POR_URL );
+ }
}
}
}
@@ -1302,39 +1310,37 @@ SwLinePortion *SwTxtFormatter::NewPortio
cChar = rInf.GetChar( rInf.GetIdx() );
}
- switch( cChar )
- {
+ switch( cChar )
+ {
case CH_TAB:
pPor = NewTabPortion( rInf, false ); break;
case CH_BREAK:
pPor = new SwBreakPortion( *rInf.GetLast() ); break;
- case CHAR_SOFTHYPHEN: // soft hyphen
- pPor = new SwSoftHyphPortion; break;
+ case CHAR_SOFTHYPHEN: // soft hyphen
+ pPor = new SwSoftHyphPortion; break;
- case CHAR_HARDBLANK: // no-break space
- pPor = new SwBlankPortion( ' ' ); break;
+ case CHAR_HARDBLANK: // no-break space
+ pPor = new SwBlankPortion( ' ' ); break;
case CHAR_HARDHYPHEN: // non-breaking hyphen
- pPor = new SwBlankPortion( '-' ); break;
+ pPor = new SwBlankPortion( '-' ); break;
case CHAR_ZWSP: // zero width space
case CHAR_ZWNBSP : // word joiner
-// case CHAR_RLM : // right to left mark
-// case CHAR_LRM : // left to right mark
pPor = new SwControlCharPortion( cChar ); break;
- case CH_TXTATR_BREAKWORD:
- case CH_TXTATR_INWORD:
- if( rInf.HasHint( rInf.GetIdx() ) )
- {
- pPor = NewExtraPortion( rInf );
- break;
- }
- // No break
- default :
- {
+ case CH_TXTATR_BREAKWORD:
+ case CH_TXTATR_INWORD:
+ if( rInf.HasHint( rInf.GetIdx() ) )
+ {
+ pPor = NewExtraPortion( rInf );
+ break;
+ }
+ // No break
+ default :
+ {
SwTabPortion* pLastTabPortion = rInf.GetLastTab();
if ( pLastTabPortion && cChar == rInf.GetTabDecimal() )
{
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.cxx Mon Nov 18 12:53:58 2013
@@ -68,10 +68,7 @@ SwFldPortion *SwFldPortion::Clone( const
{
pNewFnt = new SwFont( *pFnt );
}
- // --> OD 2009-11-25 #i107143#
- // pass placeholder property to created <SwFldPortion> instance.
SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder );
- // <--
pClone->SetNextOffset( nNextOffset );
pClone->m_bNoLength = this->m_bNoLength;
return pClone;
@@ -91,6 +88,9 @@ SwFldPortion::SwFldPortion( const XubStr
, m_bNoLength( sal_False )
{
SetWhichPor( POR_FLD );
+ //IAccessibility2 Implementation 2009-----
+ m_nAttrFldType = 0;
+ //-----IAccessibility2 Implementation 2009
}
SwFldPortion::SwFldPortion( const SwFldPortion& rFld )
@@ -394,20 +394,10 @@ sal_Bool SwFldPortion::Format( SwTxtForm
case CHAR_HARDHYPHEN: // non-breaking hyphen
case CHAR_SOFTHYPHEN:
case CHAR_HARDBLANK:
- // --> FME 2006-01-11 #i59759# Erase additional control
- // characters from field string, otherwise we get stuck in
- // a loop.
case CHAR_ZWSP :
case CHAR_ZWNBSP :
- // case CHAR_RLM :
- // case CHAR_LRM :
- // <--
- // --> OD 2010-06-03 #i111750#
- // - Erasing further control characters from field string in
- // to avoid loop.
case CH_TXTATR_BREAKWORD:
case CH_TXTATR_INWORD:
- // <--
{
aNew.Erase( 0, 1 );
++nNextOfst;
@@ -481,6 +471,12 @@ sal_Bool SwFldPortion::GetExpTxt( const
void SwFldPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Special( GetLen(), aExpand, GetWhichPor() );
+ //IAccessibility2 Implementation 2009-----
+ if( GetWhichPor() == POR_FLD )
+ {
+ rPH.SetAttrFieldType(m_nAttrFldType);
+ }
+ //-----IAccessibility2 Implementation 2009
}
/*************************************************************************
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/porfld.hxx Mon Nov 18 12:53:58 2013
@@ -65,6 +65,9 @@ public:
SwFldPortion( const XubString &rExpand, SwFont *pFnt = 0, sal_Bool bPlaceHolder = sal_False );
~SwFldPortion();
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 m_nAttrFldType;
+ //-----IAccessibility2 Implementation 2009
void TakeNextOffset( const SwFldPortion* pFld );
void CheckScript( const SwTxtSizeInfo &rInf );
inline sal_Bool HasFont() const { return 0 != pFnt; }
@@ -174,7 +177,6 @@ public:
class SwBulletPortion : public SwNumberPortion
{
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwBulletPortion( const xub_Unicode cCh,
const XubString& rBulletFollowedBy,
SwFont *pFnt,
@@ -182,7 +184,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
OUTPUT_OPERATOR
};
@@ -198,7 +199,6 @@ class SwGrfNumPortion : public SwNumberP
SwTwips nGrfHeight;
sal_Int16 eOrient;
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwGrfNumPortion( SwFrm *pFrm,
const XubString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
@@ -208,7 +208,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
~SwGrfNumPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/porlay.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/porlay.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/porlay.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/porlay.cxx Mon Nov 18 12:53:58 2013
@@ -2398,8 +2398,8 @@ void SwScriptInfo::CalcHiddenRanges( con
const SvxCharHiddenItem* pHiddenItem = static_cast<const SvxCharHiddenItem*>( CharFmt::GetItem( *pTxtAttr, RES_CHRATR_HIDDEN ) );
if( pHiddenItem )
{
- xub_StrLen nSt = *pTxtAttr->GetStart();
- xub_StrLen nEnd = *pTxtAttr->GetEnd();
+ const xub_StrLen nSt = *pTxtAttr->GetStart();
+ const xub_StrLen nEnd = *pTxtAttr->End();
if( nEnd > nSt )
{
Range aTmp( nSt, nEnd - 1 );
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/pormulti.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/pormulti.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/pormulti.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/pormulti.cxx Mon Nov 18 12:53:58 2013
@@ -992,7 +992,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
if( pRuby )
{ // The winner is ... a ruby attribute and so
// the end of the multiportion is the end of the ruby attribute.
- rPos = *pRuby->GetEnd();
+ rPos = *pRuby->End();
SwMultiCreator *pRet = new SwMultiCreator;
pRet->pItem = NULL;
pRet->pAttr = pRuby;
@@ -1018,7 +1018,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[n2Lines];
- aEnd.push_front( *pRet->pAttr->GetEnd() );
+ aEnd.push_front( *pRet->pAttr->End() );
if( pItem )
{
aEnd.front() = GetTxt().Len();
@@ -1094,8 +1094,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
if( bTwo == bOn )
{ // .. with the same state, so the last attribute could
// be continued.
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{ // .. with a different state.
@@ -1103,12 +1103,12 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
// If this is smaller than the last on the stack, we put
// it on the stack. If it has the same endposition, the last
// could be removed.
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
@@ -1166,18 +1166,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
if( bTwo == bOn )
{
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{
bOn = bTwo;
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
@@ -1192,7 +1192,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[nRotate];
- aEnd.push_front( *pRet->pAttr->GetEnd() );
+ aEnd.push_front( *pRet->pAttr->End() );
if( pRotItem )
{
aEnd.front() = GetTxt().Len();
@@ -1237,18 +1237,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
if( bTwo == bOn )
{
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{
bOn = bTwo;
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.cxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.cxx Mon Nov 18 12:53:58 2013
@@ -715,6 +715,124 @@ void SwTxtPortion::HandlePortion( SwPort
rPH.Text( GetLen(), GetWhichPor() );
}
+
+SwTxtInputFldPortion::SwTxtInputFldPortion()
+ : SwTxtPortion()
+ , mbContainsInputFieldStart( false )
+ , mbContainsInputFieldEnd( false )
+{
+ SetWhichPor( POR_INPUTFLD );
+}
+
+
+sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
+{
+ mbContainsInputFieldStart =
+ rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART;
+ mbContainsInputFieldEnd =
+ rInf.GetChar( rInf.GetIdx() + rInf.GetLen() - 1 ) == CH_TXT_ATR_INPUTFIELDEND;
+
+ sal_Bool bRet = sal_False;
+ if ( rInf.GetLen() == 1
+ && ( mbContainsInputFieldStart || mbContainsInputFieldEnd ) )
+ {
+ Width( 0 );
+ }
+ else
+ {
+ SwTxtSlot aFormatTxt( &rInf, this, true, true, 0 );
+ if ( rInf.GetLen() == 0 )
+ {
+ Width( 0 );
+ }
+ else
+ {
+ bRet = SwTxtPortion::Format( rInf );
+
+ if ( mbContainsInputFieldEnd )
+ {
+ // adjust portion length accordingly, if complete text fits into the portion
+ if ( GetLen() == rInf.GetLen() )
+ {
+ SetLen( GetLen() + 1 );
+ }
+ }
+
+ if ( mbContainsInputFieldStart )
+ {
+ // adjust portion length accordingly
+ SetLen( GetLen() + 1 );
+ }
+ }
+ }
+
+ return bRet;
+}
+
+void SwTxtInputFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
+{
+ if ( Width() )
+ {
+ rInf.DrawViewOpt( *this, POR_INPUTFLD );
+ static sal_Char sSpace = ' ';
+ SwTxtSlot aPaintTxt( &rInf, this, true, true,
+ ContainsOnlyDummyChars() ? &sSpace : 0 );
+ SwTxtPortion::Paint( rInf );
+ }
+}
+
+sal_Bool SwTxtInputFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const
+{
+ xub_StrLen nIdx = rInf.GetIdx();
+ xub_StrLen nLen = rInf.GetLen();
+ if ( rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART )
+ {
+ ++nIdx;
+ --nLen;
+ }
+ if ( rInf.GetChar( rInf.GetIdx() + rInf.GetLen() - 1 ) == CH_TXT_ATR_INPUTFIELDEND )
+ {
+ --nLen;
+ }
+ rTxt = rInf.GetTxt().Copy( nIdx, nLen );
+
+ return sal_True;
+}
+
+
+SwPosSize SwTxtInputFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+{
+ SwTxtSlot aFormatTxt( &rInf, this, true, false, 0 );
+ if ( rInf.GetLen() == 0 )
+ {
+ return SwPosSize( 0, 0 );
+ }
+
+ return rInf.GetTxtSize();
+}
+
+
+KSHORT SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+{
+ if( !Width()
+ && ContainsOnlyDummyChars()
+ && !rInf.GetOpt().IsPagePreview()
+ && !rInf.GetOpt().IsReadonly()
+ && SwViewOption::IsFieldShadings() )
+ {
+ return rInf.GetTxtSize( ' ' ).Width();
+ }
+
+ return SwTxtPortion::GetViewWidth( rInf );
+}
+
+bool SwTxtInputFldPortion::ContainsOnlyDummyChars() const
+{
+ return GetLen() <= 2
+ && mbContainsInputFieldStart
+ && mbContainsInputFieldEnd;
+}
+
/*************************************************************************
* class SwHolePortion
*************************************************************************/
Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx?rev=1543021&r1=1543020&r2=1543021&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx Mon Nov 18 12:53:58 2013
@@ -63,6 +63,24 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtPortion)
};
+
+class SwTxtInputFldPortion : public SwTxtPortion
+{
+public:
+ SwTxtInputFldPortion();
+
+ virtual sal_Bool Format( SwTxtFormatInfo &rInf );
+ virtual void Paint( const SwTxtPaintInfo &rInf ) const;
+ virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const;
+ virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
+ virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
+
+private:
+ bool mbContainsInputFieldStart;
+ bool mbContainsInputFieldEnd;
+ bool ContainsOnlyDummyChars() const;
+};
+
/*************************************************************************
* class SwHolePortion
*************************************************************************/