You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ja...@apache.org on 2013/11/20 01:50:01 UTC
svn commit: r1543679 [27/32] - in /openoffice/branches/capstone2013: ./
main/ main/accessibility/inc/accessibility/extended/
main/accessibility/inc/accessibility/helper/
main/accessibility/inc/accessibility/standard/
main/accessibility/source/extended/...
Modified: openoffice/branches/capstone2013/main/sw/source/core/txtnode/swfont.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/txtnode/swfont.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/txtnode/swfont.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/txtnode/swfont.cxx Wed Nov 20 00:49:46 2013
@@ -441,6 +441,7 @@ SwFont::SwFont( const SwFont &rFont )
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
+ m_nInputFieldCount = 0;
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
@@ -459,6 +460,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSe
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
+ m_nInputFieldCount = 0;
bPaintBlank = sal_False;
bPaintWrong = sal_False;
bURL = sal_False;
@@ -590,6 +592,7 @@ SwFont& SwFont::operator=( const SwFont
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
+ m_nInputFieldCount = 0;
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
Modified: openoffice/branches/capstone2013/main/sw/source/core/txtnode/thints.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/txtnode/thints.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/txtnode/thints.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/txtnode/thints.cxx Wed Nov 20 00:49:46 2013
@@ -123,7 +123,7 @@ struct TxtAttrContains
TxtAttrContains( const xub_StrLen nPos ) : m_nPos( nPos ) { }
bool operator() (SwTxtAttrEnd * const pAttr)
{
- return (*pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->GetEnd());
+ return (*pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->End());
}
};
@@ -167,7 +167,8 @@ static
bool isSelfNestable(const sal_uInt16 nWhich)
{
if ((RES_TXTATR_INETFMT == nWhich) ||
- (RES_TXTATR_CJK_RUBY == nWhich))
+ (RES_TXTATR_CJK_RUBY == nWhich) ||
+ (RES_TXTATR_INPUTFIELD == nWhich))
return false;
ASSERT((RES_TXTATR_META == nWhich) ||
(RES_TXTATR_METAFIELD == nWhich), "???");
@@ -181,7 +182,8 @@ bool isSplittable(const sal_uInt16 nWhic
(RES_TXTATR_CJK_RUBY == nWhich))
return true;
ASSERT((RES_TXTATR_META == nWhich) ||
- (RES_TXTATR_METAFIELD == nWhich), "???");
+ (RES_TXTATR_METAFIELD == nWhich) ||
+ (RES_TXTATR_INPUTFIELD == nWhich), "???");
return false;
}
@@ -202,8 +204,10 @@ splitPolicy(const sal_uInt16 nWhichNew,
}
else
{
- if ((RES_TXTATR_INETFMT == nWhichNew) &&
- (RES_TXTATR_CJK_RUBY == nWhichOther))
+ if ( RES_TXTATR_INPUTFIELD == nWhichNew )
+ return FAIL;
+ else if ( (RES_TXTATR_INETFMT == nWhichNew) &&
+ (RES_TXTATR_CJK_RUBY == nWhichOther) )
return SPLIT_NEW;
else
return SPLIT_OTHER;
@@ -362,14 +366,14 @@ SwpHints::TryInsertNesting( SwTxtNode &
const sal_uInt16 nNewWhich( rNewHint.Which() );
const xub_StrLen nNewStart( *rNewHint.GetStart() );
const xub_StrLen nNewEnd ( *rNewHint.GetEnd() );
-//??? const bool bNoLengthAttribute( nNewStart == nNewEnd );
const bool bNewSelfNestable( isSelfNestable(nNewWhich) );
ASSERT( (RES_TXTATR_INETFMT == nNewWhich) ||
(RES_TXTATR_CJK_RUBY == nNewWhich) ||
(RES_TXTATR_META == nNewWhich) ||
- (RES_TXTATR_METAFIELD == nNewWhich),
- "TryInsertNesting: Expecting INETFMT or RUBY or META or METAFIELD" );
+ (RES_TXTATR_METAFIELD == nNewWhich) ||
+ (RES_TXTATR_INPUTFIELD == nNewWhich),
+ "TryInsertNesting: Expecting INETFMT or RUBY or META or METAFIELD or INPUTFIELD" );
NestList_t OverlappingExisting; // existing hints to be split
NestList_t OverwrittenExisting; // existing hints to be replaced
@@ -681,7 +685,7 @@ void SwpHints::BuildPortions( SwTxtNode&
continue;
const xub_StrLen nOtherStart = *pOther->GetStart();
- const xub_StrLen nOtherEnd = *pOther->GetEnd();
+ const xub_StrLen nOtherEnd = *pOther->End();
aBounds.insert( nOtherStart );
aBounds.insert( nOtherEnd );
@@ -989,9 +993,13 @@ SwTxtAttr* MakeRedlineTxtAttr( SwDoc & r
}
// create new text attribute
-SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
- xub_StrLen const nStt, xub_StrLen const nEnd,
- CopyOrNew_t const bIsCopy, SwTxtNode *const pTxtNode)
+SwTxtAttr* MakeTxtAttr(
+ SwDoc & rDoc,
+ SfxPoolItem& rAttr,
+ xub_StrLen const nStt,
+ xub_StrLen const nEnd,
+ CopyOrNew_t const bIsCopy,
+ SwTxtNode *const pTxtNode )
{
if ( isCHRATR(rAttr.Which()) )
{
@@ -1038,9 +1046,12 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, Sf
case RES_TXTATR_INETFMT:
pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd );
break;
- case RES_TXTATR_FIELD:
+ case RES_TXTATR_FIELD:
pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt );
- break;
+ break;
+ case RES_TXTATR_INPUTFIELD:
+ pNew = new SwTxtInputFld( static_cast<SwFmtFld &>(rNew), nStt, nEnd );
+ break;
case RES_TXTATR_FLYCNT:
{
// erst hier wird das Frame-Format kopiert (mit Inhalt) !!
@@ -1126,6 +1137,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr*
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
if( !pDoc->IsInDtor() )
{
// Wenn wir ein HiddenParaField sind, dann muessen wir
@@ -1228,7 +1240,7 @@ SwTxtNode::InsertItem( SfxPoolItem& rAtt
// take ownership of pAttr; if insertion fails, delete pAttr
bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
- sal_Bool bHiddenPara = sal_False;
+ bool bHiddenPara = false;
ASSERT( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
ASSERT( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
@@ -1247,52 +1259,52 @@ bool SwTxtNode::InsertHint( SwTxtAttr *
const bool bDummyChar( pAttr->HasDummyChar() );
if (bDummyChar)
{
- sal_uInt16 nInsMode = nMode;
- switch( pAttr->Which() )
- {
- case RES_TXTATR_FLYCNT:
- {
- SwTxtFlyCnt *pFly = (SwTxtFlyCnt *)pAttr;
- SwFrmFmt* pFmt = pAttr->GetFlyCnt().GetFrmFmt();
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
- {
- // Wir muessen zuerst einfuegen, da in SetAnchor()
- // dem FlyFrm GetStart() uebermittelt wird.
- //JP 11.05.98: falls das Anker-Attribut schon richtig
- // gesetzt ist, dann korrigiere dieses nach dem Einfuegen
- // des Zeichens. Sonst muesste das immer ausserhalb
- // erfolgen (Fehleranfaellig !)
- const SwFmtAnchor* pAnchor = 0;
- pFmt->GetItemState( RES_ANCHOR, sal_False,
- (const SfxPoolItem**)&pAnchor );
+ sal_uInt16 nInsMode = nMode;
+ switch( pAttr->Which() )
+ {
+ case RES_TXTATR_FLYCNT:
+ {
+ SwTxtFlyCnt *pFly = (SwTxtFlyCnt *)pAttr;
+ SwFrmFmt* pFmt = pAttr->GetFlyCnt().GetFrmFmt();
+ if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
+ {
+ // Wir muessen zuerst einfuegen, da in SetAnchor()
+ // dem FlyFrm GetStart() uebermittelt wird.
+ //JP 11.05.98: falls das Anker-Attribut schon richtig
+ // gesetzt ist, dann korrigiere dieses nach dem Einfuegen
+ // des Zeichens. Sonst muesste das immer ausserhalb
+ // erfolgen (Fehleranfaellig !)
+ const SwFmtAnchor* pAnchor = 0;
+ pFmt->GetItemState( RES_ANCHOR, sal_False,
+ (const SfxPoolItem**)&pAnchor );
- SwIndex aIdx( this, *pAttr->GetStart() );
+ SwIndex aIdx( this, *pAttr->GetStart() );
const sal_Unicode c = GetCharOfTxtAttr(*pAttr);
InsertText( c, aIdx, nInsertFlags );
- nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
+ nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
if (pAnchor &&
(FLY_AS_CHAR == pAnchor->GetAnchorId()) &&
- pAnchor->GetCntntAnchor() &&
- pAnchor->GetCntntAnchor()->nNode == *this &&
- pAnchor->GetCntntAnchor()->nContent == aIdx )
+ pAnchor->GetCntntAnchor() &&
+ pAnchor->GetCntntAnchor()->nNode == *this &&
+ pAnchor->GetCntntAnchor()->nContent == aIdx )
{
const_cast<SwIndex&>(
pAnchor->GetCntntAnchor()->nContent)--;
}
- }
- pFly->SetAnchor( this );
+ }
+ pFly->SetAnchor( this );
- // Format-Pointer kann sich im SetAnchor geaendert haben!
- // (Kopieren in andere Docs!)
- pFmt = pAttr->GetFlyCnt().GetFrmFmt();
- SwDoc *pDoc = pFmt->GetDoc();
+ // Format-Pointer kann sich im SetAnchor geaendert haben!
+ // (Kopieren in andere Docs!)
+ pFmt = pAttr->GetFlyCnt().GetFrmFmt();
+ SwDoc *pDoc = pFmt->GetDoc();
// OD 26.06.2003 #108784# - allow drawing objects in header/footer.
// But don't allow control objects in header/footer
if( RES_DRAWFRMFMT == pFmt->Which() &&
pDoc->IsInHeaderFooter( pFmt->GetAnchor().GetCntntAnchor()->nNode ) )
- {
+ {
SwDrawContact* pDrawContact =
static_cast<SwDrawContact*>(pFmt->FindContactObj());
if ( pDrawContact &&
@@ -1322,132 +1334,133 @@ bool SwTxtNode::InsertHint( SwTxtAttr *
return false;
}
}
- break;
- }
-
- case RES_TXTATR_FTN :
- {
- // Fussnoten, man kommt an alles irgendwie heran.
- // CntntNode erzeugen und in die Inserts-Section stellen
- SwDoc *pDoc = GetDoc();
- SwNodes &rNodes = pDoc->GetNodes();
+ break;
+ }
- // FussNote in nicht Content-/Redline-Bereich einfuegen ??
- if( StartOfSectionIndex() < rNodes.GetEndOfAutotext().GetIndex() )
- {
- // das soll nicht meoglich sein; hier verhindern
- // Der Dtor des TxtHints loescht nicht das Zeichen.
- // Wenn ein CH_TXTATR_.. vorliegt, dann muss man
- // dieses explizit loeschen
- if( nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode )
- {
- // loesche das Zeichen aus dem String !
- ASSERT( ( CH_TXTATR_BREAKWORD ==
- m_Text.GetChar(*pAttr->GetStart() ) ||
- CH_TXTATR_INWORD ==
- m_Text.GetChar(*pAttr->GetStart())),
- "where is my attribute character?" );
+ case RES_TXTATR_FTN :
+ {
+ // Fussnoten, man kommt an alles irgendwie heran.
+ // CntntNode erzeugen und in die Inserts-Section stellen
+ SwDoc *pDoc = GetDoc();
+ SwNodes &rNodes = pDoc->GetNodes();
+
+ // FussNote in nicht Content-/Redline-Bereich einfuegen ??
+ if( StartOfSectionIndex() < rNodes.GetEndOfAutotext().GetIndex() )
+ {
+ // das soll nicht meoglich sein; hier verhindern
+ // Der Dtor des TxtHints loescht nicht das Zeichen.
+ // Wenn ein CH_TXTATR_.. vorliegt, dann muss man
+ // dieses explizit loeschen
+ if( nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode )
+ {
+ // loesche das Zeichen aus dem String !
+ ASSERT( ( CH_TXTATR_BREAKWORD ==
+ m_Text.GetChar(*pAttr->GetStart() ) ||
+ CH_TXTATR_INWORD ==
+ m_Text.GetChar(*pAttr->GetStart())),
+ "where is my attribute character?" );
m_Text.Erase( *pAttr->GetStart(), 1 );
- // Indizies Updaten
- SwIndex aTmpIdx( this, *pAttr->GetStart() );
- Update( aTmpIdx, 1, sal_True );
- }
- DestroyAttr( pAttr );
+ // Indizies Updaten
+ SwIndex aTmpIdx( this, *pAttr->GetStart() );
+ Update( aTmpIdx, 1, sal_True );
+ }
+ DestroyAttr( pAttr );
return false;
}
- // wird eine neue Fussnote eingefuegt ??
- sal_Bool bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
- if( bNewFtn )
+ // wird eine neue Fussnote eingefuegt ??
+ sal_Bool bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
+ if( bNewFtn )
{
- ((SwTxtFtn*)pAttr)->MakeNewTextSection( GetNodes() );
+ ((SwTxtFtn*)pAttr)->MakeNewTextSection( GetNodes() );
SwRegHistory* pHist = GetpSwpHints()
? GetpSwpHints()->GetHistory() : 0;
if( pHist )
pHist->ChangeNodeIndex( GetIndex() );
}
- else if ( !GetpSwpHints() || !GetpSwpHints()->IsInSplitNode() )
- {
- // loesche alle Frames der Section, auf die der StartNode zeigt
- sal_uLong nSttIdx =
- ((SwTxtFtn*)pAttr)->GetStartNode()->GetIndex();
- sal_uLong nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex();
- SwCntntNode* pCNd;
- for( ; nSttIdx < nEndIdx; ++nSttIdx )
- if( 0 != ( pCNd = rNodes[ nSttIdx ]->GetCntntNode() ))
- pCNd->DelFrms();
- }
-
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
- {
- // Wir muessen zuerst einfuegen, da sonst gleiche Indizes
- // entstehen koennen und das Attribut im _SortArr_ am
- // Dokument nicht eingetrage wird.
- SwIndex aNdIdx( this, *pAttr->GetStart() );
+ else if ( !GetpSwpHints() || !GetpSwpHints()->IsInSplitNode() )
+ {
+ // loesche alle Frames der Section, auf die der StartNode zeigt
+ sal_uLong nSttIdx =
+ ((SwTxtFtn*)pAttr)->GetStartNode()->GetIndex();
+ sal_uLong nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex();
+ SwCntntNode* pCNd;
+ for( ; nSttIdx < nEndIdx; ++nSttIdx )
+ if( 0 != ( pCNd = rNodes[ nSttIdx ]->GetCntntNode() ))
+ pCNd->DelFrms();
+ }
+
+ if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
+ {
+ // Wir muessen zuerst einfuegen, da sonst gleiche Indizes
+ // entstehen koennen und das Attribut im _SortArr_ am
+ // Dokument nicht eingetrage wird.
+ SwIndex aNdIdx( this, *pAttr->GetStart() );
const sal_Unicode c = GetCharOfTxtAttr(*pAttr);
InsertText( c, aNdIdx, nInsertFlags );
- nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
- }
+ nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
+ }
- // Wir tragen uns am FtnIdx-Array des Docs ein ...
- SwTxtFtn* pTxtFtn = 0;
- if( !bNewFtn )
- {
- // eine alte Ftn wird umgehaengt (z.B. SplitNode)
- for( sal_uInt16 n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
- if( pAttr == pDoc->GetFtnIdxs()[n] )
- {
- // neuen Index zuweisen, dafuer aus dem SortArray
- // loeschen und neu eintragen
- pTxtFtn = pDoc->GetFtnIdxs()[n];
- pDoc->GetFtnIdxs().Remove( n );
- break;
- }
- // wenn ueber Undo der StartNode gesetzt wurde, kann
- // der Index noch gar nicht in der Verwaltung stehen !!
- }
- if( !pTxtFtn )
- pTxtFtn = (SwTxtFtn*)pAttr;
+ // Wir tragen uns am FtnIdx-Array des Docs ein ...
+ SwTxtFtn* pTxtFtn = 0;
+ if( !bNewFtn )
+ {
+ // eine alte Ftn wird umgehaengt (z.B. SplitNode)
+ for( sal_uInt16 n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
+ if( pAttr == pDoc->GetFtnIdxs()[n] )
+ {
+ // neuen Index zuweisen, dafuer aus dem SortArray
+ // loeschen und neu eintragen
+ pTxtFtn = pDoc->GetFtnIdxs()[n];
+ pDoc->GetFtnIdxs().Remove( n );
+ break;
+ }
+ // wenn ueber Undo der StartNode gesetzt wurde, kann
+ // der Index noch gar nicht in der Verwaltung stehen !!
+ }
+ if( !pTxtFtn )
+ pTxtFtn = (SwTxtFtn*)pAttr;
- // fuers Update der Nummern und zum Sortieren
- // muss der Node gesetzt sein.
- ((SwTxtFtn*)pAttr)->ChgTxtNode( this );
+ // fuers Update der Nummern und zum Sortieren
+ // muss der Node gesetzt sein.
+ ((SwTxtFtn*)pAttr)->ChgTxtNode( this );
- // FussNote im Redline-Bereich NICHT ins FtnArray einfuegen!
- if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() )
- {
+ // FussNote im Redline-Bereich NICHT ins FtnArray einfuegen!
+ if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() )
+ {
#ifdef DBG_UTIL
- const sal_Bool bSuccess =
+ const sal_Bool bSuccess =
#endif
- pDoc->GetFtnIdxs().Insert( pTxtFtn );
+ pDoc->GetFtnIdxs().Insert( pTxtFtn );
#ifdef DBG_UTIL
- ASSERT( bSuccess, "FtnIdx nicht eingetragen." );
+ ASSERT( bSuccess, "FtnIdx nicht eingetragen." );
#endif
- }
- SwNodeIndex aTmpIndex( *this );
- pDoc->GetFtnIdxs().UpdateFtn( aTmpIndex);
- ((SwTxtFtn*)pAttr)->SetSeqRefNo();
- }
- break;
+ }
+ SwNodeIndex aTmpIndex( *this );
+ pDoc->GetFtnIdxs().UpdateFtn( aTmpIndex);
+ ((SwTxtFtn*)pAttr)->SetSeqRefNo();
+ }
+ break;
- case RES_TXTATR_FIELD:
- {
- // fuer HiddenParaFields Benachrichtigungsmechanismus
- // anwerfen
- if( RES_HIDDENPARAFLD ==
- pAttr->GetFmtFld().GetField()->GetTyp()->Which() )
- bHiddenPara = sal_True;
- }
- break;
+ case RES_TXTATR_FIELD:
+ {
+ // fuer HiddenParaFields Benachrichtigungsmechanismus
+ // anwerfen
+ if( RES_HIDDENPARAFLD == pAttr->GetFmtFld().GetField()->GetTyp()->Which() )
+ {
+ bHiddenPara = true;
+ }
+ }
+ break;
- }
- // Fuer SwTxtHints ohne Endindex werden CH_TXTATR_..
- // eingefuegt, aStart muss danach um einen zurueckgesetzt werden.
- // Wenn wir im SwTxtNode::Copy stehen, so wurde das Zeichen bereits
- // mitkopiert. In solchem Fall ist SETATTR_NOTXTATRCHR angegeben worden.
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
- {
- SwIndex aIdx( this, *pAttr->GetStart() );
+ }
+ // Fuer SwTxtHints ohne Endindex werden CH_TXTATR_..
+ // eingefuegt, aStart muss danach um einen zurueckgesetzt werden.
+ // Wenn wir im SwTxtNode::Copy stehen, so wurde das Zeichen bereits
+ // mitkopiert. In solchem Fall ist SETATTR_NOTXTATRCHR angegeben worden.
+ if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
+ {
+ SwIndex aIdx( this, *pAttr->GetStart() );
InsertText( GetCharOfTxtAttr(*pAttr), aIdx, nInsertFlags );
// adjust end of hint to account for inserted CH_TXTATR
@@ -1459,25 +1472,144 @@ bool SwTxtNode::InsertHint( SwTxtAttr *
}
}
+ // handle attributes which provide content
+ xub_StrLen nEnd = nStart;
+ bool bInputFieldStartCharInserted = false;
+ bool bInputFieldEndCharInserted = false;
+ const bool bHasContent( pAttr->HasContent() );
+ if ( bHasContent )
+ {
+ switch( pAttr->Which() )
+ {
+ case RES_TXTATR_INPUTFIELD:
+ {
+ SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pAttr);
+ if ( pTxtInputFld )
+ {
+ if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
+ {
+ SwIndex aIdx( this, *pAttr->GetStart() );
+ InsertText( CH_TXT_ATR_INPUTFIELDSTART, aIdx, nInsertFlags );
+ const String aContent = pTxtInputFld->GetFieldContent();
+ InsertText( aContent, aIdx, nInsertFlags );
+ InsertText( CH_TXT_ATR_INPUTFIELDEND, aIdx, nInsertFlags );
+
+ xub_StrLen * const pEnd(pAttr->GetEnd());
+ ASSERT( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != NULL )
+ {
+ *pEnd = *pEnd + 2 + aContent.Len();
+ nEnd = *pEnd;
+ }
+ }
+ else
+ {
+ // assure that CH_TXT_ATR_INPUTFIELDSTART and CH_TXT_ATR_INPUTFIELDEND are inserted.
+ if ( m_Text.GetChar( *(pAttr->GetStart()) ) != CH_TXT_ATR_INPUTFIELDSTART )
+ {
+ SwIndex aIdx( this, *pAttr->GetStart() );
+ InsertText( CH_TXT_ATR_INPUTFIELDSTART, aIdx, nInsertFlags );
+ bInputFieldStartCharInserted = true;
+ xub_StrLen * const pEnd(pAttr->GetEnd());
+ ASSERT( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != NULL )
+ {
+ *pEnd = *pEnd + 1;
+ nEnd = *pEnd;
+ }
+ }
+
+ xub_StrLen * const pEnd(pAttr->GetEnd());
+ ASSERT( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != NULL
+ && m_Text.GetChar( *(pEnd) - 1 ) != CH_TXT_ATR_INPUTFIELDEND )
+ {
+ SwIndex aIdx( this, *(pEnd) );
+ InsertText( CH_TXT_ATR_INPUTFIELDEND, aIdx, nInsertFlags );
+ bInputFieldEndCharInserted = true;
+ *pEnd = *pEnd + 1;
+ nEnd = *pEnd;
+ }
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
GetOrCreateSwpHints();
- // 4263: AttrInsert durch TextInsert => kein Adjust
- const bool bRet = m_pSwpHints->TryInsertHint( pAttr, *this, nMode );
+ // handle overlap with an existing InputField
+ bool bInsertHint = true;
+ {
+ const SwTxtInputFld* pTxtInputFld = GetOverlappingInputFld( *pAttr );
+ if ( pTxtInputFld != NULL )
+ {
+ if ( pAttr->End() == NULL )
+ {
+ bInsertHint = false;
+ }
+ else
+ {
+ if ( *(pAttr->GetStart()) > *(pTxtInputFld->GetStart()) )
+ {
+ *(pAttr->GetStart()) = *(pTxtInputFld->GetStart());
+ }
+ if ( *(pAttr->End()) < *(pTxtInputFld->End()) )
+ {
+ *(pAttr->GetEnd()) = *(pTxtInputFld->End());
+ }
+ }
+ }
+ }
+
+ // 4263: AttrInsert durch TextInsert => kein Adjust
+ const bool bRet = bInsertHint
+ ? m_pSwpHints->TryInsertHint( pAttr, *this, nMode )
+ : false;
- if (!bRet && bDummyChar)
+ if ( !bRet )
{
- // undo insertion of dummy character
- // N.B. cannot insert the dummy character after inserting the hint,
- // because if the hint has no extent it will be moved in InsertText,
- // resulting in infinite recursion
- if ( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
+ if ( bDummyChar
+ && !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
{
+ // undo insertion of dummy character
+ // N.B. cannot insert the dummy character after inserting the hint,
+ // because if the hint has no extent it will be moved in InsertText,
+ // resulting in infinite recursion
ASSERT( ( CH_TXTATR_BREAKWORD == m_Text.GetChar(nStart) ||
- CH_TXTATR_INWORD == m_Text.GetChar(nStart) ),
- "where is my attribute character?" );
+ CH_TXTATR_INWORD == m_Text.GetChar(nStart) ),
+ "where is my attribute character?" );
SwIndex aIdx( this, nStart );
EraseText( aIdx, 1 );
}
+
+ if ( bHasContent )
+ {
+ if ( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode)
+ && (nEnd - nStart) > 0 )
+ {
+ SwIndex aIdx( this, nStart );
+ EraseText( aIdx, (nEnd - nStart) );
+ }
+ else
+ {
+ if ( bInputFieldEndCharInserted
+ && (nEnd - nStart) > 0 )
+ {
+ SwIndex aIdx( this, nEnd - 1 );
+ EraseText( aIdx, 1 );
+ }
+
+ if ( bInputFieldStartCharInserted )
+ {
+ SwIndex aIdx( this, nStart );
+ EraseText( aIdx, 1 );
+ }
+ }
+ }
}
if ( bHiddenPara )
@@ -1508,6 +1640,12 @@ void SwTxtNode::DeleteAttribute( SwTxtAt
// erase the CH_TXTATR, which will also delete pAttr
EraseText( aIdx, 1 );
}
+ else if ( pAttr->HasContent() )
+ {
+ const SwIndex aIdx( this, *pAttr->GetStart() );
+ ASSERT( pAttr->End() != NULL, "<SwTxtNode::DeleteAttribute(..)> - missing End() at <SwTxtAttr> instance which has content" );
+ EraseText( aIdx, *pAttr->End() - *pAttr->GetStart() );
+ }
else
{
// create MsgHint before start/end become invalid
@@ -1526,8 +1664,10 @@ void SwTxtNode::DeleteAttribute( SwTxtAt
*************************************************************************/
//FIXME: this does NOT respect SORT NUMBER (for CHARFMT)!
-void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
- const xub_StrLen nStart, const xub_StrLen nEnd )
+void SwTxtNode::DeleteAttributes(
+ const sal_uInt16 nWhich,
+ const xub_StrLen nStart,
+ const xub_StrLen nEnd )
{
if ( !HasHints() )
return;
@@ -1555,7 +1695,7 @@ void SwTxtNode::DeleteAttributes( const
if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
SetCalcHiddenCharFlags();
}
- // --> FME 2007-03-16 #i75430# Recalc hidden flags if necessary
+ // Recalc hidden flags if necessary
else if ( nWhich == RES_TXTATR_AUTOFMT )
{
// Check if auto style contains hidden attribute:
@@ -1563,30 +1703,35 @@ void SwTxtNode::DeleteAttributes( const
if ( pHiddenItem )
SetCalcHiddenCharFlags();
}
- // <--
xub_StrLen const * const pEndIdx = pTxtHt->GetEnd();
if ( pTxtHt->HasDummyChar() )
{
- // Unbedingt Copy-konstruieren!
+ // Unbedingt Copy-konstruieren!
const SwIndex aIdx( this, nStart );
// erase the CH_TXTATR, which will also delete pTxtHt
EraseText( aIdx, 1 );
- }
- else if( *pEndIdx == nEnd )
- {
- // den MsgHint jetzt fuettern, weil gleich sind
- // Start und End weg.
- // Das CalcVisibleFlag bei HiddenParaFields entfaellt,
- // da dies das Feld im Dtor selbst erledigt.
+ }
+ else if ( pTxtHt->HasContent() )
+ {
+ const SwIndex aIdx( this, nStart );
+ ASSERT( pTxtHt->End() != NULL, "<SwTxtNode::DeleteAttributes(..)> - missing End() at <SwTxtAttr> instance which has content" );
+ EraseText( aIdx, *pTxtHt->End() - nStart );
+ }
+ else if( *pEndIdx == nEnd )
+ {
+ // den MsgHint jetzt fuettern, weil gleich sind
+ // Start und End weg.
+ // Das CalcVisibleFlag bei HiddenParaFields entfaellt,
+ // da dies das Feld im Dtor selbst erledigt.
SwUpdateAttr aHint( nStart, *pEndIdx, nWhich );
m_pSwpHints->DeleteAtPos( nPos ); // gefunden, loeschen,
SwTxtAttr::Destroy( pTxtHt, GetDoc()->GetAttrPool() );
- NotifyClients( 0, &aHint );
- }
- }
- }
+ NotifyClients( 0, &aHint );
+ }
+ }
+ }
TryDeleteSwpHints();
}
@@ -1681,8 +1826,11 @@ bool SwTxtNode::TryCharSetExpandToNum(co
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
-sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
- xub_StrLen nEnd, const SetAttrMode nMode )
+sal_Bool SwTxtNode::SetAttr(
+ const SfxItemSet& rSet,
+ const xub_StrLen nStt,
+ const xub_StrLen nEnd,
+ const SetAttrMode nMode )
{
if( !rSet.Count() )
return sal_False;
@@ -1760,7 +1908,7 @@ sal_Bool SwTxtNode::SetAttr( const SfxIt
static_cast<const SwFmtCharFmt*>(pItem)->GetCharFmt()))
{
SwIndex aIndex( this, nStt );
- RstAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT, 0 );
+ RstTxtAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT, 0 );
DontExpandFmt( aIndex );
}
else
@@ -1947,7 +2095,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet&
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
- const xub_StrLen* pAttrEnd = pHt->GetEnd();
+ const xub_StrLen* pAttrEnd = pHt->End();
if ( ! pAttrEnd ) // no attributes without end
continue;
@@ -1975,7 +2123,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet&
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
- const xub_StrLen* pAttrEnd = pHt->GetEnd();
+ const xub_StrLen* pAttrEnd = pHt->End();
if ( ! pAttrEnd ) // no attributes without end
continue;
@@ -2208,7 +2356,7 @@ lcl_CollectHintSpans(const SwpHints& i_r
const sal_uInt16 nWhich(pHint->Which());
if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
{
- const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->GetEnd());
+ const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->End());
o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint));
// < not != because there may be multiple CHARFMT at same range
@@ -2555,7 +2703,7 @@ bool SwpHints::MergePortions( SwTxtNode&
{
const SwTxtAttr* p1 = (*aIter1).second;
const SwTxtAttr* p2 = (*aIter2).second;
- if ( *p1->GetEnd() < *p2->GetStart() || p1->Which() != p2->Which() || !(*p1 == *p2) )
+ if ( *p1->End() < *p2->GetStart() || p1->Which() != p2->Which() || !(*p1 == *p2) )
{
bMerge = false;
break;
@@ -2632,7 +2780,7 @@ void lcl_CheckSortNumber( const SwpHints
if ( RES_TXTATR_CHARFMT == pOtherHt->Which() )
{
- const xub_StrLen nOtherEnd = *pOtherHt->GetEnd();
+ const xub_StrLen nOtherEnd = *pOtherHt->End();
if ( nOtherStart == nHtStart && nOtherEnd == nHtEnd )
{
@@ -2702,6 +2850,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr*
static_cast<SwTxtINetFmt*>(pHint)->InitINetFmt(rNode);
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
{
sal_Bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
((SwTxtFld*)pHint)->ChgTxtNode( &rNode );
@@ -3023,6 +3172,7 @@ void SwTxtNode::ClearSwpHintsArr( bool b
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
if( bDelFields )
bDel = true;
break;
@@ -3071,7 +3221,7 @@ sal_uInt16 SwTxtNode::GetLang( const xub
if( nWhichId == nWhich ||
( ( pHt->IsCharFmtAttr() || RES_TXTATR_AUTOFMT == nWhich ) && CharFmt::IsItemIncluded( nWhichId, pHt ) ) )
{
- const xub_StrLen *pEndIdx = pHt->GetEnd();
+ const xub_StrLen *pEndIdx = pHt->End();
// Ueberlappt das Attribut den Bereich?
if( pEndIdx &&
Modified: openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatbase.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatbase.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatbase.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatbase.cxx Wed Nov 20 00:49:46 2013
@@ -42,6 +42,7 @@ SwTxtAttr::SwTxtAttr( SfxPoolItem& rAttr
, m_bDontExpandStart( false )
, m_bNesting( false )
, m_bHasDummyChar( false )
+ , m_bHasContent( false )
{
}
@@ -51,7 +52,7 @@ SwTxtAttr::~SwTxtAttr( )
xub_StrLen* SwTxtAttr::GetEnd()
{
- return 0;
+ return 0;
}
void SwTxtAttr::Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool )
Modified: openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatritr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatritr.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatritr.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/txtnode/txatritr.cxx Wed Nov 20 00:49:46 2013
@@ -123,7 +123,7 @@ sal_Bool SwTxtAttrIterator::Next()
{
do {
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- sal_uInt16 nEndPos = *pHt->GetEnd();
+ const sal_uInt16 nEndPos = *pHt->End();
if( nChgPos >= nEndPos )
aStack.Remove( 0 );
else
@@ -138,7 +138,7 @@ sal_Bool SwTxtAttrIterator::Next()
if( aStack.Count() )
{
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- sal_uInt16 nEndPos = *pHt->GetEnd();
+ const sal_uInt16 nEndPos = *pHt->End();
if( nChgPos >= nEndPos )
{
nChgPos = nEndPos;
@@ -167,7 +167,7 @@ sal_Bool SwTxtAttrIterator::Next()
void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr )
{
void* pAdd = (void*)&rAttr;
- sal_uInt16 nIns = 0, nEndPos = *rAttr.GetEnd();
+ sal_uInt16 nIns = 0, nEndPos = *rAttr.End();
for( ; nIns < aStack.Count(); ++nIns )
if( *((SwTxtAttr*)aStack[ nIns ] )->GetEnd() > nEndPos )
break;
@@ -213,7 +213,7 @@ void SwTxtAttrIterator::SearchNextChg()
for( ; nAttrPos < pHts->Count(); ++nAttrPos )
{
const SwTxtAttr* pHt = (*pHts)[ nAttrPos ];
- const sal_uInt16* pEnd = pHt->GetEnd();
+ const sal_uInt16* pEnd = pHt->End();
const sal_uInt16 nHtStt = *pHt->GetStart();
if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
continue;
Modified: openoffice/branches/capstone2013/main/sw/source/core/txtnode/txtedt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/txtnode/txtedt.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/txtnode/txtedt.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/txtnode/txtedt.cxx Wed Nov 20 00:49:46 2013
@@ -394,7 +394,7 @@ inline sal_Bool InRange(xub_StrLen nIdx,
* -> nothing to do
*/
-void SwTxtNode::RstAttr(
+void SwTxtNode::RstTxtAttr(
const SwIndex &rIdx,
const xub_StrLen nLen,
const sal_uInt16 nWhich,
@@ -404,8 +404,27 @@ void SwTxtNode::RstAttr(
if ( !GetpSwpHints() )
return;
- const xub_StrLen nStt = rIdx.GetIndex();
- const xub_StrLen nEnd = nStt + nLen;
+ xub_StrLen nStt = rIdx.GetIndex();
+ xub_StrLen nEnd = nStt + nLen;
+ {
+ // enlarge range for the reset of text attributes in case of an overlapping input field
+ const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( nStt, RES_TXTATR_INPUTFIELD, PARENT ));
+ if ( pTxtInputFld == NULL )
+ {
+ pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt(nEnd, RES_TXTATR_INPUTFIELD, PARENT ));
+ }
+ if ( pTxtInputFld != NULL )
+ {
+ if ( nStt > *(pTxtInputFld->GetStart()) )
+ {
+ nStt = *(pTxtInputFld->GetStart());
+ }
+ if ( nEnd < *(pTxtInputFld->End()) )
+ {
+ nEnd = *(pTxtInputFld->End());
+ }
+ }
+ }
bool bChanged = false;
@@ -419,13 +438,13 @@ void SwTxtNode::RstAttr(
// They may not be forgotten inside the "Forget" function
//std::vector< const SwTxtAttr* > aNewAttributes;
- // iterate over attribute array until start of attribute is behind
- // deletion range
+ // iterate over attribute array until start of attribute is behind deletion range
sal_uInt16 i = 0;
xub_StrLen nAttrStart;
SwTxtAttr *pHt = NULL;
- while ((i < m_pSwpHints->Count()) &&
- ((( nAttrStart = *(*m_pSwpHints)[i]->GetStart()) < nEnd ) || nLen==0) )
+ while ( (i < m_pSwpHints->Count())
+ && ( ( ( nAttrStart = *(*m_pSwpHints)[i]->GetStart()) < nEnd )
+ || nLen==0 ) )
{
pHt = m_pSwpHints->GetTextHint(i);
@@ -445,6 +464,12 @@ void SwTxtNode::RstAttr(
i++;
continue;
}
+ // attributes with content stay in
+ if ( pHt->HasContent() )
+ {
+ ++i;
+ continue;
+ }
// Default behavior is to process all attributes:
bool bSkipAttr = false;;
@@ -626,12 +651,12 @@ void SwTxtNode::RstAttr(
{
m_pSwpHints->Resort();
}
- //TxtFrm's reagieren auf aHint, andere auf aNew
- SwUpdateAttr aHint( nMin, nMax, 0 );
- NotifyClients( 0, &aHint );
- SwFmtChg aNew( GetFmtColl() );
- NotifyClients( 0, &aNew );
- }
+ //TxtFrm's reagieren auf aHint, andere auf aNew
+ SwUpdateAttr aHint( nMin, nMax, 0 );
+ NotifyClients( 0, &aHint );
+ SwFmtChg aNew( GetFmtColl() );
+ NotifyClients( 0, &aNew );
+ }
}
Modified: openoffice/branches/capstone2013/main/sw/source/core/undo/SwUndoField.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/undo/SwUndoField.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/undo/SwUndoField.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/undo/SwUndoField.cxx Wed Nov 20 00:49:46 2013
@@ -84,7 +84,7 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc(
void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
{
- SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
+ SwTxtFld * pTxtFld = SwDoc::GetTxtFldAtPos(GetPosition());
const SwField * pField = pTxtFld->GetFmtFld().GetField();
if (pField)
@@ -95,7 +95,7 @@ void SwUndoFieldFromDoc::UndoImpl(::sw::
void SwUndoFieldFromDoc::DoImpl()
{
- SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
+ SwTxtFld * pTxtFld = SwDoc::GetTxtFldAtPos(GetPosition());
const SwField * pField = pTxtFld->GetFmtFld().GetField();
if (pField)
@@ -132,7 +132,7 @@ SwUndoFieldFromAPI::~SwUndoFieldFromAPI(
void SwUndoFieldFromAPI::UndoImpl(::sw::UndoRedoContext &)
{
- SwField * pField = SwDoc::GetField(GetPosition());
+ SwField * pField = SwDoc::GetFieldAtPos(GetPosition());
if (pField)
pField->PutValue(aOldVal, nWhich);
@@ -140,7 +140,7 @@ void SwUndoFieldFromAPI::UndoImpl(::sw::
void SwUndoFieldFromAPI::DoImpl()
{
- SwField * pField = SwDoc::GetField(GetPosition());
+ SwField * pField = SwDoc::GetFieldAtPos(GetPosition());
if (pField)
pField->PutValue(aNewVal, nWhich);
Modified: openoffice/branches/capstone2013/main/sw/source/core/undo/rolbck.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/undo/rolbck.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/undo/rolbck.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/undo/rolbck.cxx Wed Nov 20 00:49:46 2013
@@ -1036,16 +1036,14 @@ SwHistory::~SwHistory()
|*
*************************************************************************/
-// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
sal_uLong nNodeIdx )
-// <--
{
ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
- sal_uInt16 nWhich = pNewValue->Which();
- if( (nWhich >= POOLATTR_END) || (nWhich == RES_TXTATR_FIELD) )
- return;
+ sal_uInt16 nWhich = pNewValue->Which();
+ if( (nWhich >= POOLATTR_END) || (nWhich == RES_TXTATR_FIELD) )
+ return;
// no default Attribute?
SwHistoryHint * pHt;
@@ -1289,51 +1287,49 @@ void SwHistory::CopyFmtAttr( const SfxIt
}
}
-void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
- xub_StrLen nStart, xub_StrLen nEnd, bool bFields )
+void SwHistory::CopyAttr(
+ SwpHints* pHts,
+ const sal_uLong nNodeIdx,
+ const xub_StrLen nStart,
+ const xub_StrLen nEnd,
+ const bool bCopyFields )
{
if( !pHts )
return;
// copy all attributes of the TextNode in the area from nStart to nEnd
SwTxtAttr* pHt;
- xub_StrLen nAttrStt;
- const xub_StrLen * pEndIdx;
- for( sal_uInt16 n = 0; n < pHts->Count(); n++ )
- {
- // BP: nAttrStt muss auch bei !pEndIdx gesetzt werden
+ xub_StrLen nAttrStt;
+ const xub_StrLen * pEndIdx;
+ for( sal_uInt16 n = 0; n < pHts->Count(); n++ )
+ {
pHt = pHts->GetTextHint(n);
nAttrStt = *pHt->GetStart();
-// JP: ???? wieso nAttrStt >= nEnd
-// if( 0 != ( pEndIdx = pHt->GetEnd() ) && nAttrStt >= nEnd )
- if( 0 != ( pEndIdx = pHt->GetEnd() ) && nAttrStt > nEnd )
- break;
-
- // Flys und Ftn nie kopieren !!
- sal_Bool bNextAttr = sal_False;
- switch( pHt->Which() )
- {
- case RES_TXTATR_FIELD:
- // keine Felder, .. kopieren ??
- if( !bFields )
- bNextAttr = sal_True;
- break;
- case RES_TXTATR_FLYCNT:
- case RES_TXTATR_FTN:
- bNextAttr = sal_True;
- break;
- }
+ if( 0 != ( pEndIdx = pHt->GetEnd() ) && nAttrStt > nEnd )
+ break;
+
+ // Flys und Ftn nie kopieren !!
+ sal_Bool bNextAttr = sal_False;
+ switch( pHt->Which() )
+ {
+ case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
+ if( !bCopyFields )
+ bNextAttr = sal_True;
+ break;
+ case RES_TXTATR_FLYCNT:
+ case RES_TXTATR_FTN:
+ bNextAttr = sal_True;
+ break;
+ }
- if( bNextAttr )
- continue;
+ if( bNextAttr )
+ continue;
// save all attributes that are somehow in this area
if ( nStart <= nAttrStt )
{
- if ( nEnd > nAttrStt
-// JP: ???? wieso nAttrStt >= nEnd
-// || (nEnd == nAttrStt && (!pEndIdx || nEnd == pEndIdx->GetIndex()))
- )
+ if ( nEnd > nAttrStt )
{
Add( pHt, nNodeIdx, false );
}
Modified: openoffice/branches/capstone2013/main/sw/source/core/undo/unsect.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/undo/unsect.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/undo/unsect.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/undo/unsect.cxx Wed Nov 20 00:49:46 2013
@@ -234,21 +234,22 @@ void SwUndoInsSection::RepeatImpl(::sw::
void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
{
- SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
- SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "wo ist mein TextNode?" );
+ SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
+ SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
+ ASSERT( pTxtNd, "wo ist mein TextNode?" );
- {
- RemoveIdxRel( nNode + 1, SwPosition( aIdx,
- SwIndex( pTxtNd, pTxtNd->GetTxt().Len() )));
- }
- pTxtNd->JoinNext();
+ {
+ RemoveIdxRel(
+ nNode + 1,
+ SwPosition( aIdx, SwIndex( pTxtNd, pTxtNd->GetTxt().Len() ) ) );
+ }
+ pTxtNd->JoinNext();
if (m_pHistory.get())
{
- SwIndex aCntIdx( pTxtNd, 0 );
- pTxtNd->RstAttr( aCntIdx, pTxtNd->Len(), 0, 0, true );
- }
+ SwIndex aCntIdx( pTxtNd, 0 );
+ pTxtNd->RstTxtAttr( aCntIdx, pTxtNd->Len(), 0, 0, true );
+ }
}
Modified: openoffice/branches/capstone2013/main/sw/source/core/undo/untbl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/undo/untbl.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/undo/untbl.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/undo/untbl.cxx Wed Nov 20 00:49:46 2013
@@ -2092,10 +2092,10 @@ CHECKTABLE(pTblNd->GetTable())
nDelPos = pUndo->GetDestSttCntnt() - 1;
}
pUndo->UndoImpl(rContext);
- if( pUndo->IsMoveRange() )
- {
- // den ueberfluessigen Node loeschen
- aIdx = pUndo->GetEndNode();
+ if( pUndo->IsMoveRange() )
+ {
+ // den ueberfluessigen Node loeschen
+ aIdx = pUndo->GetEndNode();
SwCntntNode *pCNd = aIdx.GetNode().GetCntntNode();
if( pCNd )
{
@@ -2104,23 +2104,20 @@ CHECKTABLE(pTblNd->GetTable())
if( pMove )
pCNd->MoveTo( *pMove );
}
- rDoc.GetNodes().Delete( aIdx, 1 );
- }
- else if( pTxtNd )
- {
- // evt. noch ueberflussige Attribute loeschen
- SwIndex aTmpIdx( pTxtNd, nDelPos );
- if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
- pTxtNd->RstAttr( aTmpIdx, pTxtNd->GetTxt().Len() -
- nDelPos + 1 );
- // das Trennzeichen loeschen
+ rDoc.GetNodes().Delete( aIdx, 1 );
+ }
+ else if( pTxtNd )
+ {
+ // evt. noch ueberflussige Attribute loeschen
+ SwIndex aTmpIdx( pTxtNd, nDelPos );
+ if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
+ pTxtNd->RstTxtAttr( aTmpIdx, pTxtNd->GetTxt().Len() - nDelPos + 1 );
+ // das Trennzeichen loeschen
pTxtNd->EraseText( aTmpIdx, 1 );
}
-// delete pUndo;
DUMPDOC( &rDoc, String( "d:\\tmp\\tab_") + String( aNewSttNds.Count() - i ) +
String(".db") )
}
-// pMoves->Remove( 0, pMoves->Count() );
nIdx = pBox->GetSttIdx();
}
else
Modified: openoffice/branches/capstone2013/main/sw/source/core/undo/untblk.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/undo/untblk.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/undo/untblk.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/undo/untblk.cxx Wed Nov 20 00:49:46 2013
@@ -248,7 +248,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoR
pTxtNode->JoinNext();
}
// reset all text attributes in the paragraph!
- pTxtNode->RstAttr( SwIndex(pTxtNode, 0), pTxtNode->Len(), 0, 0, true );
+ pTxtNode->RstTxtAttr( SwIndex(pTxtNode, 0), pTxtNode->Len(), 0, 0, true );
// setze alle Attribute im Node zurueck
pTxtNode->ResetAllAttr();
Modified: openoffice/branches/capstone2013/main/sw/source/core/unocore/unocrsrhelper.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/unocore/unocrsrhelper.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/unocore/unocrsrhelper.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/unocore/unocrsrhelper.cxx Wed Nov 20 00:49:46 2013
@@ -49,6 +49,7 @@
#include <ndtxt.hxx>
#include <txtrfmrk.hxx>
#include <fmtfld.hxx>
+#include <txtfld.hxx>
#include <docsh.hxx>
#include <section.hxx>
#include <shellio.hxx>
@@ -135,19 +136,19 @@ GetNestedTextContent(SwTxtNode & rTextNo
/* -----------------16.09.98 12:27-------------------
* Lesen spezieller Properties am Cursor
* --------------------------------------------------*/
-sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
- , SwPaM& rPam
- , Any *pAny
- , PropertyState& eState
- , const SwTxtNode* pNode )
+sal_Bool getCrsrPropertyValue(
+ const SfxItemPropertySimpleEntry& rEntry,
+ SwPaM& rPam,
+ Any *pAny,
+ PropertyState& eState,
+ const SwTxtNode* pNode )
{
- PropertyState eNewState = PropertyState_DIRECT_VALUE;
-// PropertyState_DEFAULT_VALUE
-// PropertyState_AMBIGUOUS_VALUE
- sal_Bool bDone = sal_True;
+ PropertyState eNewState = PropertyState_DIRECT_VALUE;
+ // PropertyState_DEFAULT_VALUE
+ // PropertyState_AMBIGUOUS_VALUE
+ sal_Bool bDone = sal_True;
switch(rEntry.nWID)
- {
- // --> OD 2008-11-26 #158694#
+ {
case FN_UNO_PARA_CONT_PREV_SUBTREE:
if (pAny)
{
@@ -168,6 +169,7 @@ sal_Bool getCrsrPropertyValue(const SfxI
*pAny <<= bRet;
}
break;
+
case FN_UNO_PARA_NUM_STRING:
if (pAny)
{
@@ -185,24 +187,8 @@ sal_Bool getCrsrPropertyValue(const SfxI
*pAny <<= OUString(sRet);
}
break;
- // <--
- // --> OD 2008-05-20 #outlinelevel# - no longer needed
-// case FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL:
-// if (pAny)
-// {
-// const SwTxtNode * pTmpNode = pNode;
-
-// if (!pTmpNode)
-// pTmpNode = rPam.GetNode()->GetTxtNode();
-
-// sal_Int8 nRet = -1;
-// if (pTmpNode && pTmpNode->GetOutlineLevel() != NO_NUMBERING)
-// nRet = sal::static_int_cast< sal_Int8 >(pTmpNode->GetOutlineLevel());
-// *pAny <<= nRet;
-// }
-// break;
- // <--
- case RES_PARATR_OUTLINELEVEL: //#outlinelevel added by zhaojianwei
+
+ case RES_PARATR_OUTLINELEVEL: //#outlinelevel added by zhaojianwei
if (pAny)
{
const SwTxtNode * pTmpNode = pNode;
@@ -217,9 +203,10 @@ sal_Bool getCrsrPropertyValue(const SfxI
*pAny <<= nRet;
}
break; //<-end,zhaojianwei
- case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
- case FN_UNO_PARA_STYLE :
- {
+
+ case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
+ case FN_UNO_PARA_STYLE :
+ {
SwFmtColl* pFmt = 0;
if(pNode)
pFmt = FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID
@@ -259,253 +246,247 @@ sal_Bool getCrsrPropertyValue(const SfxI
*pAny <<= nValue;
}
break;
- case FN_UNO_NUM_LEVEL :
- case FN_UNO_IS_NUMBER :
- // --> OD 2008-07-14 #i91601#
+
+ case FN_UNO_NUM_LEVEL :
+ case FN_UNO_IS_NUMBER :
case FN_UNO_LIST_ID:
- // <--
- case FN_NUMBER_NEWSTART:
- {
- // a multi selection is not considered
- const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
- // --> OD 2010-01-13 #b6912256#
- if ( pTxtNd && pTxtNd->IsInList() )
- // <--
- {
- if( pAny )
- {
- if(rEntry.nWID == FN_UNO_NUM_LEVEL)
- *pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
- else if(rEntry.nWID == FN_UNO_IS_NUMBER)
- {
- sal_Bool bIsNumber = pTxtNd->IsCountedInList();
- pAny->setValue(&bIsNumber, ::getBooleanCppuType());
- }
- // --> OD 2008-07-14 #i91601#
- else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ case FN_NUMBER_NEWSTART:
+ {
+ // a multi selection is not considered
+ const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
+ if ( pTxtNd && pTxtNd->IsInList() )
+ {
+ if( pAny )
{
- const String sListId = pTxtNd->GetListId();
- *pAny <<= OUString(sListId);
+ if(rEntry.nWID == FN_UNO_NUM_LEVEL)
+ *pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
+ else if(rEntry.nWID == FN_UNO_IS_NUMBER)
+ {
+ sal_Bool bIsNumber = pTxtNd->IsCountedInList();
+ pAny->setValue(&bIsNumber, ::getBooleanCppuType());
+ }
+ else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ {
+ const String sListId = pTxtNd->GetListId();
+ *pAny <<= OUString(sListId);
+ }
+ else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
+ {
+ sal_Bool bIsRestart = pTxtNd->IsListRestart();
+ pAny->setValue(&bIsRestart, ::getBooleanCppuType());
+ }
}
- // <--
- else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
- {
- sal_Bool bIsRestart = pTxtNd->IsListRestart();
- pAny->setValue(&bIsRestart, ::getBooleanCppuType());
- }
- }
- }
- else
- {
- eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ else
+ {
+ eNewState = PropertyState_DEFAULT_VALUE;
- if( pAny )
- {
- // #i30838# set default values for default properties
- if(rEntry.nWID == FN_UNO_NUM_LEVEL)
- *pAny <<= static_cast<sal_Int16>( 0 );
- else if(rEntry.nWID == FN_UNO_IS_NUMBER)
- *pAny <<= false;
- // --> OD 2008-07-14 #i91601#
- else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ if( pAny )
{
- *pAny <<= OUString();
+ // #i30838# set default values for default properties
+ if(rEntry.nWID == FN_UNO_NUM_LEVEL)
+ *pAny <<= static_cast<sal_Int16>( 0 );
+ else if(rEntry.nWID == FN_UNO_IS_NUMBER)
+ *pAny <<= false;
+ // --> OD 2008-07-14 #i91601#
+ else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ {
+ *pAny <<= OUString();
+ }
+ // <--
+ else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
+ *pAny <<= false;
}
- // <--
- else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
- *pAny <<= false;
- }
- }
- //PROPERTY_MAYBEVOID!
- }
- break;
- case FN_UNO_NUM_RULES :
- if( pAny )
- getNumberingProperty(rPam, eNewState, pAny);
- else
- {
- if( !rPam.GetDoc()->GetCurrNumRule( *rPam.GetPoint() ) )
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_DOCUMENT_INDEX_MARK:
- {
- ::std::vector<SwTxtAttr *> const marks(
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
- if (marks.size())
+ }
+ //PROPERTY_MAYBEVOID!
+ }
+ break;
+
+ case FN_UNO_NUM_RULES :
+ if( pAny )
+ getNumberingProperty(rPam, eNewState, pAny);
+ else
{
- if( pAny )
- { // hmm... can only return 1 here
- SwTOXMark & rMark =
- static_cast<SwTOXMark &>((*marks.begin())->GetAttr());
- const uno::Reference< text::XDocumentIndexMark > xRef =
- SwXDocumentIndexMark::CreateXDocumentIndexMark(
+ if( !rPam.GetDoc()->GetCurrNumRule( *rPam.GetPoint() ) )
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_DOCUMENT_INDEX_MARK:
+ {
+ ::std::vector<SwTxtAttr *> const marks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
+ if (marks.size())
+ {
+ if( pAny )
+ { // hmm... can only return 1 here
+ SwTOXMark & rMark =
+ static_cast<SwTOXMark &>((*marks.begin())->GetAttr());
+ const uno::Reference< text::XDocumentIndexMark > xRef =
+ SwXDocumentIndexMark::CreateXDocumentIndexMark(
*rPam.GetDoc(),
*const_cast<SwTOXType*>(rMark.GetTOXType()), rMark);
- (*pAny) <<= xRef;
- }
- }
- else
- //auch hier - nicht zu unterscheiden
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_DOCUMENT_INDEX:
- {
- const SwTOXBase* pBase = rPam.GetDoc()->GetCurTOX(
- *rPam.Start() );
- if( pBase )
- {
- if( pAny )
- {
- const uno::Reference< text::XDocumentIndex > xRef =
- SwXDocumentIndex::CreateXDocumentIndex(*rPam.GetDoc(),
+ (*pAny) <<= xRef;
+ }
+ }
+ else
+ //auch hier - nicht zu unterscheiden
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_DOCUMENT_INDEX:
+ {
+ const SwTOXBase* pBase = rPam.GetDoc()->GetCurTOX(
+ *rPam.Start() );
+ if( pBase )
+ {
+ if( pAny )
+ {
+ const uno::Reference< text::XDocumentIndex > xRef =
+ SwXDocumentIndex::CreateXDocumentIndex(*rPam.GetDoc(),
*static_cast<SwTOXBaseSection const*>(pBase));
- (*pAny) <<= xRef;
- }
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_TEXT_FIELD:
- {
- const SwPosition *pPos = rPam.Start();
- const SwTxtNode *pTxtNd =
- rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode();
- SwTxtAttr *const pTxtAttr = (pTxtNd)
- ? pTxtNd->GetTxtAttrForCharAt(
- pPos->nContent.GetIndex(), RES_TXTATR_FIELD)
- : 0;
- if(pTxtAttr)
- {
- if( pAny )
+ (*pAny) <<= xRef;
+ }
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_TEXT_FIELD:
+ {
+ const SwPosition *pPos = rPam.Start();
+ const SwTxtNode *pTxtNd =
+ rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode();
+ const SwTxtAttr* pTxtAttr = (pTxtNd)
+ ? pTxtNd->GetFldTxtAttrAt( pPos->nContent.GetIndex(), true )
+ : 0;
+ if ( pTxtAttr != NULL )
{
- SwXTextField* pField =
- SwXTextField::CreateSwXTextField( *rPam.GetDoc(),pTxtAttr->GetFmtFld() );
- *pAny <<= uno::Reference< XTextField >( pField );
+ if( pAny )
+ {
+ SwXTextField* pField =
+ SwXTextField::CreateSwXTextField( *rPam.GetDoc(),pTxtAttr->GetFmtFld() );
+ *pAny <<= uno::Reference< XTextField >( pField );
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
-/* laesst sich nicht feststellen
-* case FN_UNO_BOOKMARK:
- {
- if()
- {
- uno::Reference< XBookmark > xBkm = SwXBookmarks::GetObject(rBkm);
- rAny.set(&xBkm, ::getCppuType((const XBookmark*)0)());
- }
- }
- break;*/
- case FN_UNO_TEXT_TABLE:
- case FN_UNO_CELL:
- {
- SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
- SwStartNodeType eType = pSttNode->GetStartNodeType();
- if(SwTableBoxStartNode == eType)
- {
- if( pAny )
- {
- const SwTableNode* pTblNode = pSttNode->FindTableNode();
- SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt();
- //SwTable& rTable = ((SwTableNode*)pSttNode)->GetTable();
- if(FN_UNO_TEXT_TABLE == rEntry.nWID)
- {
- uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFmt);
- pAny->setValue(&xTable, ::getCppuType((uno::Reference<XTextTable>*)0));
- }
- else
- {
- SwTableBox* pBox = pSttNode->GetTblBox();
- uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFmt, pBox);
- pAny->setValue(&xCell, ::getCppuType((uno::Reference<XCell>*)0));
- }
- }
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_TEXT_FRAME:
- {
- SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
- SwStartNodeType eType = pSttNode->GetStartNodeType();
+ break;
- SwFrmFmt* pFmt;
- if(eType == SwFlyStartNode && 0 != (pFmt = pSttNode->GetFlyFmt()))
- {
- if( pAny )
- {
- uno::Reference< XTextFrame > xFrm = (SwXTextFrame*) SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM);
- pAny->setValue(&xFrm, ::getCppuType((uno::Reference<XTextFrame>*)0));
- }
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_TEXT_SECTION:
- {
- SwSection* pSect = rPam.GetDoc()->GetCurrSection(*rPam.GetPoint());
- if(pSect)
- {
- if( pAny )
- {
- uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFmt() );
- pAny->setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0) );
- }
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_ENDNOTE:
- case FN_UNO_FOOTNOTE:
- {
- SwTxtAttr *const pTxtAttr =
- rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ case FN_UNO_TEXT_TABLE:
+ case FN_UNO_CELL:
+ {
+ SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
+ SwStartNodeType eType = pSttNode->GetStartNodeType();
+ if(SwTableBoxStartNode == eType)
+ {
+ if( pAny )
+ {
+ const SwTableNode* pTblNode = pSttNode->FindTableNode();
+ SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt();
+ //SwTable& rTable = ((SwTableNode*)pSttNode)->GetTable();
+ if(FN_UNO_TEXT_TABLE == rEntry.nWID)
+ {
+ uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFmt);
+ pAny->setValue(&xTable, ::getCppuType((uno::Reference<XTextTable>*)0));
+ }
+ else
+ {
+ SwTableBox* pBox = pSttNode->GetTblBox();
+ uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFmt, pBox);
+ pAny->setValue(&xCell, ::getCppuType((uno::Reference<XCell>*)0));
+ }
+ }
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_TEXT_FRAME:
+ {
+ SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
+ SwStartNodeType eType = pSttNode->GetStartNodeType();
+
+ SwFrmFmt* pFmt;
+ if(eType == SwFlyStartNode && 0 != (pFmt = pSttNode->GetFlyFmt()))
+ {
+ if( pAny )
+ {
+ uno::Reference< XTextFrame > xFrm = (SwXTextFrame*) SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM);
+ pAny->setValue(&xFrm, ::getCppuType((uno::Reference<XTextFrame>*)0));
+ }
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_TEXT_SECTION:
+ {
+ SwSection* pSect = rPam.GetDoc()->GetCurrSection(*rPam.GetPoint());
+ if(pSect)
+ {
+ if( pAny )
+ {
+ uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFmt() );
+ pAny->setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0) );
+ }
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_ENDNOTE:
+ case FN_UNO_FOOTNOTE:
+ {
+ SwTxtAttr *const pTxtAttr =
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
- if(pTxtAttr)
- {
- const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
- if(rFtn.IsEndNote() == (FN_UNO_ENDNOTE == rEntry.nWID))
- {
- if( pAny )
- {
- const uno::Reference< text::XFootnote > xFootnote =
- SwXFootnote::CreateXFootnote(*rPam.GetDoc(), rFtn);
- *pAny <<= xFootnote;
- }
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_REFERENCE_MARK:
- {
- ::std::vector<SwTxtAttr *> const marks(
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
- if (marks.size())
+ if(pTxtAttr)
+ {
+ const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
+ if(rFtn.IsEndNote() == (FN_UNO_ENDNOTE == rEntry.nWID))
+ {
+ if( pAny )
+ {
+ const uno::Reference< text::XFootnote > xFootnote =
+ SwXFootnote::CreateXFootnote(*rPam.GetDoc(), rFtn);
+ *pAny <<= xFootnote;
+ }
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
+ case FN_UNO_REFERENCE_MARK:
{
- if( pAny )
- { // hmm... can only return 1 here
- const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
- uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef );
- pAny->setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
- }
- }
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ ::std::vector<SwTxtAttr *> const marks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
+ if (marks.size())
+ {
+ if( pAny )
+ { // hmm... can only return 1 here
+ const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
+ uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef );
+ pAny->setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
+ }
+ }
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ break;
+
case FN_UNO_NESTED_TEXT_CONTENT:
{
uno::Reference<XTextContent> const xRet(
@@ -524,6 +505,7 @@ sal_Bool getCrsrPropertyValue(const SfxI
}
}
break;
+
case FN_UNO_CHARFMT_SEQUENCE:
{
@@ -586,13 +568,14 @@ sal_Bool getCrsrPropertyValue(const SfxI
eNewState = PropertyState_DEFAULT_VALUE;
}
break;
- case RES_TXTATR_CHARFMT:
- // kein break hier!
- default: bDone = sal_False;
- }
- if( bDone )
- eState = eNewState;
- return bDone;
+
+ case RES_TXTATR_CHARFMT:
+ // kein break hier!
+ default: bDone = sal_False;
+ }
+ if( bDone )
+ eState = eNewState;
+ return bDone;
};
/* -----------------30.06.98 10:30-------------------
*
Modified: openoffice/branches/capstone2013/main/sw/source/core/unocore/unodraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/unocore/unodraw.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/unocore/unodraw.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/unocore/unodraw.cxx Wed Nov 20 00:49:46 2013
@@ -1243,8 +1243,7 @@ void SwXShape::setPropertyValue(const rt
.SetFlyFmt();
//The connection is removed now the attribute can be deleted.
- pTxtNode->DeleteAttributes(
- RES_TXTATR_FLYCNT, nIdx );
+ pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
//create a new one
SwTxtNode *pNd = pInternalPam->GetNode()->GetTxtNode();
DBG_ASSERT( pNd, "Cursor not at TxtNode." );
Modified: openoffice/branches/capstone2013/main/sw/source/core/unocore/unofield.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/unocore/unofield.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/unocore/unofield.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/unocore/unofield.cxx Wed Nov 20 00:49:46 2013
@@ -1622,9 +1622,10 @@ void SwXTextField::attachToRange(
throw uno::RuntimeException();
sal_uInt16 nInpSubType = sal::static_int_cast< sal_uInt16 >(SW_SERVICE_FIELDTYPE_INPUT_USER == m_nServiceId ? INP_USR : INP_TXT);
SwInputField * pTxtField =
- new SwInputField((SwInputFieldType*)pFldType,
- m_pProps->sPar1, m_pProps->sPar2,
- nInpSubType);
+ new SwInputField( static_cast<SwInputFieldType*>(pFldType),
+ m_pProps->sPar1,
+ m_pProps->sPar2,
+ nInpSubType );
pTxtField->SetHelp(m_pProps->sPar3);
pTxtField->SetToolTip(m_pProps->sPar4);
@@ -1732,39 +1733,39 @@ void SwXTextField::attachToRange(
if(aPam.HasMark())
pDoc->DeleteAndJoin(aPam);
- SwXTextCursor const*const pTextCursor(
- dynamic_cast<SwXTextCursor*>(pCursor));
- const bool bForceExpandHints( (pTextCursor)
- ? pTextCursor->IsAtEndOfMeta() : false );
- const SetAttrMode nInsertFlags = (bForceExpandHints)
+ SwXTextCursor const*const pTextCursor( dynamic_cast<SwXTextCursor*>(pCursor) );
+ const bool bForceExpandHints(
+ (pTextCursor)
+ ? pTextCursor->IsAtEndOfMeta()
+ : false );
+ const SetAttrMode nInsertFlags =
+ (bForceExpandHints)
? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
: nsSetAttrMode::SETATTR_DEFAULT;
pDoc->InsertPoolItem(aPam, aFmt, nInsertFlags);
- pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
- aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FIELD);
-
- // was passiert mit dem Update der Felder ? (siehe fldmgr.cxx)
- if(pTxtAttr)
- {
- const SwFmtFld& rFld = pTxtAttr->GetFmtFld();
- pFmtFld = &rFld;
- }
- }
- delete pFld;
+ pTxtAttr = aPam.GetNode()->GetTxtNode()->GetFldTxtAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
+ // was passiert mit dem Update der Felder ? (siehe fldmgr.cxx)
+ if(pTxtAttr)
+ {
+ const SwFmtFld& rFld = pTxtAttr->GetFmtFld();
+ pFmtFld = &rFld;
+ }
+ }
+ delete pFld;
- m_pDoc = pDoc;
- m_pDoc->GetUnoCallBack()->Add(this);
- m_bIsDescriptor = sal_False;
+ m_pDoc = pDoc;
+ m_pDoc->GetUnoCallBack()->Add(this);
+ m_bIsDescriptor = sal_False;
if(m_aFieldTypeClient.GetRegisteredIn())
const_cast<SwModify*>(m_aFieldTypeClient.GetRegisteredIn())->Remove(&m_aFieldTypeClient);
- DELETEZ(m_pProps);
+ DELETEZ(m_pProps);
if(m_bCallUpdate)
update();
}
- else
- throw lang::IllegalArgumentException();
+ else
+ throw lang::IllegalArgumentException();
}
void SwXTextField::attach(const uno::Reference< text::XTextRange > & xTextRange)
@@ -1910,7 +1911,7 @@ void SwXTextField::setPropertyValue(cons
//#to the SwTxtFld
if(RES_DBFLD == nWhich && pFmtFld->GetTxtFld())
{
- pFmtFld->GetTxtFld()->Expand();
+ pFmtFld->GetTxtFld()->ExpandTxtFld();
}
//#i100374# changing a document field should set the modify flag
Modified: openoffice/branches/capstone2013/main/sw/source/core/unocore/unoframe.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/unocore/unoframe.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/unocore/unoframe.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/unocore/unoframe.cxx Wed Nov 20 00:49:46 2013
@@ -120,7 +120,7 @@
#include <switerator.hxx>
// from fefly1.cxx
-extern sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet );
+extern sal_Bool lcl_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet );
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -1045,21 +1045,6 @@ void SwXFrame::setPropertyValue(const ::
}
}
}
- // --> OD 2009-07-13 #i73249#
- // Attribute AlternativeText was never published.
- // Now it has been replaced by Attribute Title - valid for all <SwXFrame> instances
-// else if( FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID && eType != FLYCNTTYPE_FRM )
-// {
-// const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
-// if(pIdx)
-// {
-// SwNodeIndex aIdx(*pIdx, 1);
-// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
-// OUString uTemp;
-// aValue >>= uTemp;
-// pNoTxt->SetAlternateText(uTemp);
-// }
-// }
// New attribute Title
else if( FN_UNO_TITLE == pEntry->nWID )
{
@@ -1114,7 +1099,8 @@ void SwXFrame::setPropertyValue(const ::
{
pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
- if ( !::lcl_ChkAndSetNewAnchor( *pFly, *pSet ) )
+ if ( pFmt->GetDoc()->GetEditShell() != NULL
+ && !::lcl_ChkAndSetNewAnchor( *(pFmt->GetDoc()->GetEditShell()), *pFly, *pSet ) )
delete pSet, pSet = 0;
}
}
@@ -1390,7 +1376,10 @@ void SwXFrame::setPropertyValue(const ::
if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem ))
{
aSet.Put( *pItem );
- ::lcl_ChkAndSetNewAnchor( *pFly, aSet );
+ if ( pFmt->GetDoc()->GetEditShell() != NULL )
+ {
+ ::lcl_ChkAndSetNewAnchor( *(pFmt->GetDoc()->GetEditShell()), *pFly, aSet );
+ }
}
}
}
Modified: openoffice/branches/capstone2013/main/sw/source/core/unocore/unoidx.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/unocore/unoidx.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/unocore/unoidx.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/unocore/unoidx.cxx Wed Nov 20 00:49:46 2013
@@ -1858,9 +1858,9 @@ throw (uno::RuntimeException)
m_pImpl->m_pTOXMark->GetTxtTOXMark();
SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
aPam.SetMark();
- if(pTxtMark->GetEnd())
+ if(pTxtMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->GetEnd();
+ aPam.GetPoint()->nContent = *pTxtMark->End();
}
else
aPam.GetPoint()->nContent++;
@@ -2109,9 +2109,9 @@ SwXDocumentIndexMark::getAnchor() throw
const SwTxtTOXMark* pTxtMark = m_pImpl->m_pTOXMark->GetTxtTOXMark();
SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
aPam.SetMark();
- if(pTxtMark->GetEnd())
+ if(pTxtMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->GetEnd();
+ aPam.GetPoint()->nContent = *pTxtMark->End();
}
else
{
@@ -2270,9 +2270,9 @@ throw (beans::UnknownPropertyException,
m_pImpl->m_pTOXMark->GetTxtTOXMark();
SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
aPam.SetMark();
- if(pTxtMark->GetEnd())
+ if(pTxtMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->GetEnd();
+ aPam.GetPoint()->nContent = *pTxtMark->End();
}
else
{
Modified: openoffice/branches/capstone2013/main/sw/source/core/unocore/unomap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sw/source/core/unocore/unomap.cxx?rev=1543679&r1=1543678&r2=1543679&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sw/source/core/unocore/unomap.cxx (original)
+++ openoffice/branches/capstone2013/main/sw/source/core/unocore/unomap.cxx Wed Nov 20 00:49:46 2013
@@ -482,6 +482,32 @@ SwUnoPropertyMapProvider::~SwUnoProperty
{ SW_PROP_NMID(UNO_NAME_IS_FIELD_USED), FIELD_PROP_IS_FIELD_USED, CPPU_E2T(CPPUTYPE_FLOAT), PropertyAttribute::READONLY, 0},\
{ SW_PROP_NMID(UNO_NAME_IS_FIELD_DISPLAYED), FIELD_PROP_IS_FIELD_DISPLAYED, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::READONLY, 0},\
+//IAccessibility2 Implementation 2009-----
+#define COMMON_ACCESSIBILITY_TEXT_ATTRIBUTE \
+ { SW_PROP_NMID(UNO_NAME_CHAR_BACK_COLOR), RES_CHRATR_BACKGROUND, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE ,MID_BACK_COLOR }, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_COLOR), RES_CHRATR_COLOR, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_CONTOURED), RES_CHRATR_CONTOUR, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_EMPHASIS), RES_CHRATR_EMPHASIS_MARK, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_EMPHASIS}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_ESCAPEMENT), RES_CHRATR_ESCAPEMENT, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_ESC }, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_FONT_NAME), RES_CHRATR_FONT, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, MID_FONT_FAMILY_NAME }, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_HEIGHT), RES_CHRATR_FONTSIZE , CPPU_E2T(CPPUTYPE_FLOAT), PropertyAttribute::MAYBEVOID, MID_FONTHEIGHT|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_POSTURE), RES_CHRATR_POSTURE , CPPU_E2T(CPPUTYPE_FONTSLANT), PropertyAttribute::MAYBEVOID, MID_POSTURE}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_SHADOWED), RES_CHRATR_SHADOWED , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_STRIKEOUT), RES_CHRATR_CROSSEDOUT, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_CROSS_OUT}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_TL_COLOR}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_WEIGHT), RES_CHRATR_WEIGHT , CPPU_E2T(CPPUTYPE_FLOAT), PropertyAttribute::MAYBEVOID, MID_WEIGHT}, \
+ { SW_PROP_NMID(UNO_NAME_NUMBERING_LEVEL), RES_PARATR_LIST_LEVEL,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_TL_STYLE}, \
+ { SW_PROP_NMID(UNO_NAME_NUMBERING_RULES), RES_PARATR_NUMRULE,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_ADJUST), RES_PARATR_ADJUST, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_PARA_ADJUST}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_BOTTOM_MARGIN), RES_UL_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_LO_MARGIN|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_FIRST_LINE_INDENT), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_FIRST_LINE_INDENT|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_LEFT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_TXT_LMARGIN|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_LINE_SPACING), RES_PARATR_LINESPACING, CPPU_E2T(CPPUTYPE_LINESPACE), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_RIGHT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_R_MARGIN|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_TABSTOPS), RES_PARATR_TABSTOP, CPPU_E2T(CPPUTYPE_SEQTABSTOP), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
+
+//-----IAccessibility2 Implementation 2009
const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(sal_uInt16 nPropertyId)
{
@@ -500,6 +526,18 @@ const SfxItemPropertyMapEntry* SwUnoProp
aMapEntriesArr[nPropertyId] = aCharAndParaMap_Impl;
}
break;
+ //IAccessibility2 Implementation 2009-----
+ case PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE:
+ {
+ static SfxItemPropertyMapEntry aAccessibilityTextAttrMap_Impl[] =
+ {
+ COMMON_ACCESSIBILITY_TEXT_ATTRIBUTE
+ {0,0,0,0,0,0}
+ };
+ aMapEntriesArr[nPropertyId] = aAccessibilityTextAttrMap_Impl;
+ }
+ break;
+ //-----IAccessibility2 Implementation 2009
case PROPERTY_MAP_PARAGRAPH:
{
static SfxItemPropertyMapEntry aParagraphMap_Impl[] =