You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/11/18 12:29:27 UTC

svn commit: r1542986 [7/9] - in /openoffice/trunk/main/sw: ./ inc/ sdi/ source/core/access/ source/core/bastyp/ source/core/crsr/ source/core/doc/ source/core/docnode/ source/core/edit/ source/core/fields/ source/core/frmedt/ source/core/inc/ source/co...

Modified: openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx Mon Nov 18 11:29:24 2013
@@ -51,101 +51,125 @@
 
 class SwASC_AttrIter
 {
-	SwASCWriter& rWrt;
-	const SwTxtNode& rNd;
-	xub_StrLen nAktSwPos;
+    SwASCWriter& rWrt;
+    const SwTxtNode& rNd;
+    xub_StrLen nAktSwPos;
 
-	xub_StrLen SearchNext( xub_StrLen nStartPos );
+    xub_StrLen SearchNext( xub_StrLen nStartPos );
 
 public:
-	SwASC_AttrIter( SwASCWriter& rWrt, const SwTxtNode& rNd, xub_StrLen nStt );
+    SwASC_AttrIter( SwASCWriter& rWrt, const SwTxtNode& rNd, xub_StrLen nStt );
 
-	void NextPos() 		{ nAktSwPos = SearchNext( nAktSwPos + 1 ); }
+    void NextPos()
+    {
+        nAktSwPos = SearchNext( nAktSwPos + 1 );
+    }
 
-	xub_StrLen WhereNext() const		{ return nAktSwPos; }
-	sal_Bool OutAttr( xub_StrLen nSwPos );
+    xub_StrLen WhereNext() const
+    {
+        return nAktSwPos;
+    }
+    
+    sal_Bool OutAttr( xub_StrLen nSwPos );
 };
 
 
-SwASC_AttrIter::SwASC_AttrIter( SwASCWriter& rWr, const SwTxtNode& rTxtNd,
-								xub_StrLen nStt )
-	: rWrt( rWr ), rNd( rTxtNd ), nAktSwPos( 0 )
+SwASC_AttrIter::SwASC_AttrIter(
+    SwASCWriter& rWr,
+    const SwTxtNode& rTxtNd,
+    xub_StrLen nStt )
+    : rWrt( rWr )
+    , rNd( rTxtNd )
+    , nAktSwPos( 0 )
 {
-	nAktSwPos = SearchNext( nStt + 1 );
+    nAktSwPos = SearchNext( nStt + 1 );
 }
 
 
 xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
 {
-	xub_StrLen nMinPos = STRING_MAXLEN;
-	const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
-	if( pTxtAttrs )
-	{
-// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs
-// nach der Anfangsposition geordnet sind. Dann muessten
-// allerdings noch 2 Indices gemerkt werden
+    xub_StrLen nMinPos = STRING_MAXLEN;
+    const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
+    if( pTxtAttrs )
+    {
         for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
-		{
-			const SwTxtAttr* pHt = (*pTxtAttrs)[i];
-            if (pHt->HasDummyChar())
-			{
+        {
+            const SwTxtAttr* pHt = (*pTxtAttrs)[i];
+            if ( pHt->HasDummyChar() )
+            {
                 xub_StrLen nPos = *pHt->GetStart();
 
-				if( nPos >= nStartPos && nPos <= nMinPos )
-					nMinPos = nPos;
+                if( nPos >= nStartPos && nPos <= nMinPos )
+                    nMinPos = nPos;
 
-				if( ( ++nPos ) >= nStartPos && nPos < nMinPos )
-					nMinPos = nPos;
-			}
-		}
-	}
-	return nMinPos;
+                if( ( ++nPos ) >= nStartPos && nPos < nMinPos )
+                    nMinPos = nPos;
+            }
+            else if ( pHt->HasContent() )
+            {
+                const xub_StrLen nHintStart = *pHt->GetStart();
+                if ( nHintStart >= nStartPos && nHintStart <= nMinPos )
+                {
+                    nMinPos = nHintStart;
+                }
+
+                const xub_StrLen nHintEnd = pHt->End() ? *pHt->End() : STRING_MAXLEN;
+                if ( nHintEnd >= nStartPos && nHintEnd < nMinPos )
+                {
+                    nMinPos = nHintEnd;
+                }
+            }
+        }
+    }
+    return nMinPos;
 }
 
 
 sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
 {
-	sal_Bool bRet = sal_False;
-	const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
-	if( pTxtAttrs )
-	{
-		sal_uInt16 i;
-		for( i = 0; i < pTxtAttrs->Count(); i++ )
-		{
-			const SwTxtAttr* pHt = (*pTxtAttrs)[i];
-            if ( pHt->HasDummyChar() && nSwPos == *pHt->GetStart() )
-			{
-				bRet = sal_True;
-				String sOut;
-				switch( pHt->Which() )
-				{
-				case RES_TXTATR_FIELD:
-                    sOut =
-                        static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true);
-					break;
-
-				case RES_TXTATR_FTN:
-					{
-						const SwFmtFtn& rFtn = pHt->GetFtn();
-						if( rFtn.GetNumStr().Len() )
-							sOut = rFtn.GetNumStr();
-						else if( rFtn.IsEndNote() )
-							sOut = rWrt.pDoc->GetEndNoteInfo().aFmt.
-											GetNumStr( rFtn.GetNumber() );
-						else
-							sOut = rWrt.pDoc->GetFtnInfo().aFmt.
-											GetNumStr( rFtn.GetNumber() );
-					}
-					break;
-				}
-				if( sOut.Len() )
-					rWrt.Strm().WriteUnicodeOrByteText( sOut );
-			}
-			else if( nSwPos < *pHt->GetStart() )
-				break;
-		}
-	}
-	return bRet;
+    sal_Bool bRet = sal_False;
+    const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
+    if( pTxtAttrs )
+    {
+        sal_uInt16 i;
+        for( i = 0; i < pTxtAttrs->Count(); i++ )
+        {
+            const SwTxtAttr* pHt = (*pTxtAttrs)[i];
+            if ( ( pHt->HasDummyChar()
+                   || pHt->HasContent() )
+                 && nSwPos == *pHt->GetStart() )
+            {
+                bRet = sal_True;
+                String sOut;
+                switch( pHt->Which() )
+                {
+                case RES_TXTATR_FIELD:
+                case RES_TXTATR_INPUTFIELD:
+                    sOut = static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true);
+                    break;
+
+                case RES_TXTATR_FTN:
+                    {
+                        const SwFmtFtn& rFtn = pHt->GetFtn();
+                        if( rFtn.GetNumStr().Len() )
+                            sOut = rFtn.GetNumStr();
+                        else if( rFtn.IsEndNote() )
+                            sOut = rWrt.pDoc->GetEndNoteInfo().aFmt.
+                            GetNumStr( rFtn.GetNumber() );
+                        else
+                            sOut = rWrt.pDoc->GetFtnInfo().aFmt.
+                            GetNumStr( rFtn.GetNumber() );
+                    }
+                    break;
+                }
+                if( sOut.Len() )
+                    rWrt.Strm().WriteUnicodeOrByteText( sOut );
+            }
+            else if( nSwPos < *pHt->GetStart() )
+                break;
+        }
+    }
+    return bRet;
 }
 
 

Modified: openoffice/trunk/main/sw/source/filter/ascii/parasc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ascii/parasc.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ascii/parasc.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ascii/parasc.cxx Mon Nov 18 11:29:24 2013
@@ -452,8 +452,8 @@ sal_uLong SwASCIIParser::ReadChars()
 							InsertText( String( pLastStt ));
 						}
 						pDoc->SplitNode( *pPam->GetPoint(), false );
-                        pDoc->InsertPoolItem( *pPam, SvxFmtBreakItem(
-                                    SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0);
+                        pDoc->InsertPoolItem(
+                            *pPam, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0);
 						pLastStt = pStt;
 						nLineLen = 0;
 						bIns = false;

Modified: openoffice/trunk/main/sw/source/filter/html/css1atr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/css1atr.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/html/css1atr.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/html/css1atr.cxx Mon Nov 18 11:29:24 2013
@@ -3756,7 +3756,7 @@ SwAttrFnTab aCSS1AttrFnTab = {
 /* RES_TXTATR_CHARFMT */            0,
 /* RES_TXTATR_CJK_RUBY */           0,
 /* RES_TXTATR_UNKNOWN_CONTAINER */  0,
-/* RES_TXTATR_DUMMY5 */             0,
+/* RES_TXTATR_INPUTFIELD */         0,
 
 /* RES_TXTATR_FIELD	*/          	0,
 /* RES_TXTATR_FLYCNT */ 			0,

Modified: openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx Mon Nov 18 11:29:24 2013
@@ -2485,9 +2485,9 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt,
 			if( RES_TXTATR_FIELD == pHt->Which() )		// Felder nicht
 				continue;                               // ausgeben
 
-            if ( pHt->GetEnd() && !pHt->HasDummyChar() )
+            if ( pHt->End() && !pHt->HasDummyChar() )
 			{
-				xub_StrLen nHtEnd = *pHt->GetEnd(),
+				const xub_StrLen nHtEnd = *pHt->End(),
 					   nHtStt = *pHt->GetStart();
 				if( !rHTMLWrt.bWriteAll && nHtEnd <= nStrPos )
 					continue;
@@ -2545,11 +2545,11 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt,
 				&& nStrPos != nEnde )
 			{
 				do {
-                    if ( pHt->GetEnd() && !pHt->HasDummyChar() )
+                    if ( pHt->End() && !pHt->HasDummyChar() )
 					{
 						if( RES_CHRATR_KERNING == pHt->Which() &&
 							rHTMLWrt.IsHTMLMode(HTMLMODE_FIRSTLINE) &&
-							*pHt->GetEnd() - nStrPos == 1 &&
+							*pHt->End() - nStrPos == 1 &&
 							' ' == rStr.GetChar(nStrPos) &&
 							((const SvxKerningItem&)pHt->GetAttr()).GetValue() > 0 )
 						{
@@ -2564,13 +2564,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt,
 							// Der Hint braucht nun doch nicht weiter
 							// beruecksichtigt werden.
 						}
-						else if( *pHt->GetEnd() != nStrPos )
+						else if( *pHt->End() != nStrPos )
 						{
 							// Hints mit Ende einsortieren, wenn sie keinen
 							// leeren Bereich aufspannen (Hints, die keinen
 							// Bereich aufspannen werden ignoriert
 							aEndPosLst.Insert( pHt->GetAttr(), nStrPos + nOffset,
-											   *pHt->GetEnd() + nOffset,
+											   *pHt->End() + nOffset,
 											   rHTMLWrt.aChrFmtInfos );
 						}
 					}
@@ -3413,9 +3413,9 @@ SwAttrFnTab aHTMLAttrFnTab = {
 /* RES_TXTATR_CHARFMT */            OutHTML_SwTxtCharFmt,
 /* RES_TXTATR_CJK_RUBY */           0,
 /* RES_TXTATR_UNKNOWN_CONTAINER */  0,
-/* RES_TXTATR_DUMMY5 */             0,
+/* RES_TXTATR_INPUTFIELD */         OutHTML_SwFmtFld,
 
-/* RES_TXTATR_FIELD	*/              OutHTML_SwFmtFld,
+/* RES_TXTATR_FIELD */              OutHTML_SwFmtFld,
 /* RES_TXTATR_FLYCNT */             OutHTML_SwFlyCnt,
 /* RES_TXTATR_FTN */                OutHTML_SwFmtFtn,
 /* RES_TXTATR_DUMMY4 */             0,

Modified: openoffice/trunk/main/sw/source/filter/html/swhtml.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/swhtml.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/html/swhtml.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/html/swhtml.cxx Mon Nov 18 11:29:24 2013
@@ -2260,23 +2260,19 @@ sal_Bool SwHTMLParser::AppendTxtNode( Sw
 		}
 	}
 
-	if( bUpdateNum )
-	{
-		if( GetNumInfo().GetDepth() )
+    if( bUpdateNum )
+    {
+        if( GetNumInfo().GetDepth() )
         {
             sal_uInt8 nLvl = GetNumInfo().GetLevel();
-            // --> OD 2008-04-02 #refactorlists#
-//            SetNoNum (&nLvl, sal_True);
-//            SetNodeNum( nLvl);
             SetNodeNum( nLvl, false );
-            // <--
         }
-		else
-			pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
-	}
+        else
+            pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
+    }
 
-	// Attrubute im Absatz davor sollte man jetzt setzen (wegen JavaScript)
-	SetAttr();
+    // Attrubute im Absatz davor sollte man jetzt setzen (wegen JavaScript)
+    SetAttr();
 
 	// Now it is time to get rid of all script dependent hints that are
 	// equal to the settings in the style
@@ -2776,6 +2772,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bC
                     }
                     break;
                 case RES_TXTATR_FIELD:
+                case RES_TXTATR_INPUTFIELD:
                     {
                         sal_uInt16 nFldWhich =
                             pPostIts

Modified: openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx Mon Nov 18 11:29:24 2013
@@ -891,7 +891,7 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs(
 	for( sal_uInt16 i=0; i<nCntAttr; i++ )
 	{
 		const SwTxtAttr *pHt = pTxtNd->GetSwpHints()[i];
-		if( !pHt->GetEnd() )
+		if( !pHt->End() )
 		{
 			xub_StrLen nPos = *pHt->GetStart();
 			if( nPos-nOldPos > 1 || RES_TXTATR_FIELD != pHt->Which() )

Modified: openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx Mon Nov 18 11:29:24 2013
@@ -270,7 +270,7 @@ void SwRTFParser::SetFlysInDoc()
 					aDropCap.GetChars() = 1;
 
 					SwIndex aIdx( pEndNd );
-					pNd->RstAttr( aIdx, 1, RES_CHRATR_FONTSIZE );
+					pNd->RstTxtAttr( aIdx, 1, RES_CHRATR_FONTSIZE );
                     pNd->SetAttr( aDropCap );
 				}
 				delete pFlySave;

Modified: openoffice/trunk/main/sw/source/filter/ww1/fltshell.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww1/fltshell.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww1/fltshell.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww1/fltshell.cxx Mon Nov 18 11:29:24 2013
@@ -142,17 +142,22 @@ void SwFltStackEntry::SetEndPos(const Sw
 //because it is beyond the length of para...need special consideration here.
 bool SwFltStackEntry::IsAbleMakeRegion()
 {
-	 SwCntntNode *const pCntntNode(
-        SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode());
-    	if ((nMkNode.GetIndex() == nPtNode.GetIndex()) && (nMkCntnt == nPtCntnt)
-        && ((0 != nPtCntnt) || (pCntntNode && (0 != pCntntNode->Len())))
-        && ((RES_TXTATR_FIELD != pAttr->Which())
-        && !(bIsParaEnd && pCntntNode && pCntntNode->IsTxtNode() && 0 != pCntntNode->Len() )))
-	{
-		return false;
-	}
+    SwCntntNode *const pCntntNode( SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode() );
+    if ( (nMkNode.GetIndex() == nPtNode.GetIndex())
+         && (nMkCntnt == nPtCntnt)
+         && ( (0 != nPtCntnt)
+              || ( pCntntNode
+                   && ( 0 != pCntntNode->Len() ) ) )
+        && ( RES_TXTATR_FIELD != pAttr->Which() && RES_TXTATR_INPUTFIELD != pAttr->Which() )
+        && !( bIsParaEnd
+              && pCntntNode
+              && pCntntNode->IsTxtNode()
+              && 0 != pCntntNode->Len() ) )
+    {
+        return false;
+    }
 
-	return true;
+    return true;
 }
 //End
 sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck )
@@ -479,13 +484,13 @@ bool SwFltControlStack::HasSdOD()
 //End
 void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* pEntry)
 {
-	SwPaM aRegion( rTmpPos );
+    SwPaM aRegion( rTmpPos );
 
-	switch(pEntry->pAttr->Which())
-	{
-	case RES_FLTR_ANCHOR:
-		{
-			SwFrmFmt* pFmt = ((SwFltAnchor*)pEntry->pAttr)->GetFrmFmt();
+    switch(pEntry->pAttr->Which())
+    {
+    case RES_FLTR_ANCHOR:
+        {
+            SwFrmFmt* pFmt = ((SwFltAnchor*)pEntry->pAttr)->GetFrmFmt();
             if (pFmt != NULL)
             {
                 MakePoint(pEntry, pDoc, aRegion);
@@ -500,14 +505,16 @@ void SwFltControlStack::SetAttrInDoc(con
                     pFmt->MakeFrms();
                 }
             }
-		}
-		break;
-	case RES_FLTR_STYLESHEET:
-		break;
-	case RES_TXTATR_FIELD:
-		break;
-	case RES_TXTATR_TOXMARK:
-		break;
+        }
+        break;
+    case RES_FLTR_STYLESHEET:
+        break;
+    case RES_TXTATR_FIELD:
+    case RES_TXTATR_INPUTFIELD:
+        break;
+    case RES_TXTATR_TOXMARK:
+        break;
+
 	case RES_FLTR_NUMRULE:			// Numrule 'reinsetzen
 		{
 			const String& rNumNm = ((SfxStringItem*)pEntry->pAttr)->GetValue();

Modified: openoffice/trunk/main/sw/source/filter/ww1/w1filter.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww1/w1filter.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww1/w1filter.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww1/w1filter.cxx Mon Nov 18 11:29:24 2013
@@ -885,9 +885,9 @@ oncemore:
 		}
 		case 39: // fillin command
 			pField = new SwInputField(
-				(SwInputFieldType*)rOut.GetSysFldType( RES_INPUTFLD ),
+				static_cast<SwInputFieldType*>(rOut.GetSysFldType( RES_INPUTFLD )),
 				aEmptyStr, sFormel,
-				INP_TXT, 0 );		// sichtbar ( geht z.Zt. nicht anders )
+				INP_TXT, 0, false );
 		break;
 		case 51: // macro button
 		{

Modified: openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx Mon Nov 18 11:29:24 2013
@@ -437,7 +437,7 @@ protected:
     /// Sfx item RES_TXTATR_CHARFMT
     virtual void TextCharFormat( const SwFmtCharFmt& ) = 0;
 
-    /// Sfx item RES_TXTATR_FIELD
+    /// Sfx item RES_TXTATR_FIELD and RES_TXTATR_INPUTFIELD
     void TextField( const SwFmtFld& );
 
     /// Sfx item RES_TXTATR_FLYCNT

Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx Mon Nov 18 11:29:24 2013
@@ -561,11 +561,10 @@ void WW8Export::DoFormText(const SwInput
 
     OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END);
 
-    String const fieldStr( pFld->ExpandField(true) );
+    const String fieldStr( pFld->ExpandField(true) );
     SwWW8Writer::WriteString16(Strm(), fieldStr, false);
 
     static sal_uInt8 aArr2[] = {
-        0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
         0x55, 0x08, 0x01,  // sprmCFSpec
         0x75, 0x08, 0x01       // ???
     };

Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx Mon Nov 18 11:29:24 2013
@@ -396,9 +396,9 @@ xub_StrLen WW8SwAttrIter::SearchNext( xu
             if( nPos >= nStartPos && nPos <= nMinPos )
                 nMinPos = nPos;
 
-            if( pHt->GetEnd() )         // Attr mit Ende
+            if( pHt->End() )         // Attr mit Ende
             {
-                nPos = *pHt->GetEnd();      // gibt letztes Attr-Zeichen + 1
+                nPos = *pHt->End();      // gibt letztes Attr-Zeichen + 1
                 if( nPos >= nStartPos && nPos <= nMinPos )
                     nMinPos = nPos;
             }
@@ -491,7 +491,7 @@ void WW8SwAttrIter::OutAttr( xub_StrLen 
         for (xub_StrLen i = 0; i < pTxtAttrs->Count(); ++i)
         {
             const SwTxtAttr* pHt = (*pTxtAttrs)[i];
-            const xub_StrLen* pEnd = pHt->GetEnd();
+            const xub_StrLen* pEnd = pHt->End();
 
             if (pEnd ? ( nSwPos >= *pHt->GetStart() && nSwPos < *pEnd)
                         : nSwPos == *pHt->GetStart() )
@@ -601,14 +601,17 @@ void WW8SwAttrIter::OutFlys(xub_StrLen n
 
 bool WW8SwAttrIter::IsTxtAttr( xub_StrLen nSwPos )
 {
-    // search for attrs with CH_TXTATR
+    // search for attrs with dummy character or content
     if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
     {
         for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
         {
             const SwTxtAttr* pHt = (*pTxtAttrs)[i];
-            if ( pHt->HasDummyChar() && (*pHt->GetStart() == nSwPos) )
+            if ( ( pHt->HasDummyChar() || pHt->HasContent() )
+                 && (*pHt->GetStart() == nSwPos) )
+            {
                 return true;
+            }
         }
     }
 
@@ -666,7 +669,7 @@ const SfxPoolItem* WW8SwAttrIter::HasTex
             const SwTxtAttr* pHt = (*pTxtAttrs)[i];
             const SfxPoolItem* pItem = &pHt->GetAttr();
             const xub_StrLen* pAtrEnd = 0;
-            if( 0 != ( pAtrEnd = pHt->GetEnd() ) &&     // nur Attr mit Ende
+            if( 0 != ( pAtrEnd = pHt->End() ) &&     // nur Attr mit Ende
                 nWhich == pItem->Which() &&             //
                 nTmpSwPos >= *pHt->GetStart() && nTmpSwPos < *pAtrEnd )
             {
@@ -1115,7 +1118,7 @@ void AttributeOutputBase::TOXMark( const
     ww::eField eType = ww::eNONE;
 
     const SwTxtTOXMark& rTxtTOXMark = *rAttr.GetTxtTOXMark();
-    const xub_StrLen* pTxtEnd = rTxtTOXMark.GetEnd();
+    const xub_StrLen* pTxtEnd = rTxtTOXMark.End();
     if ( pTxtEnd ) // has range?
     {
         sTxt = rNode.GetExpandTxt( *rTxtTOXMark.GetStart(),
@@ -1188,7 +1191,7 @@ int WW8SwAttrIter::OutAttrWithRange(xub_
                         if ( m_rExport.AttrOutput().StartURL( rINet->GetValue(), rINet->GetTargetFrame() ) )
                             ++nRet;
                     }
-                    if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
+                    if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
                     {
                         if ( m_rExport.AttrOutput().EndURL() )
                             --nRet;
@@ -1200,7 +1203,7 @@ int WW8SwAttrIter::OutAttrWithRange(xub_
                         OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), true );
                         ++nRet;
                     }
-                    if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
+                    if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
                     {
                         OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), false );
                         --nRet;
@@ -1216,7 +1219,7 @@ int WW8SwAttrIter::OutAttrWithRange(xub_
                         m_rExport.AttrOutput().StartRuby( rNd, *static_cast< const SwFmtRuby* >( pItem ) );
                         ++nRet;
                     }
-                    if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
+                    if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
                     {
                         m_rExport.AttrOutput().EndRuby();
                         --nRet;

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx Mon Nov 18 11:29:24 2013
@@ -1843,9 +1843,7 @@ void WW8Export::OutputField( const SwFie
     bool bUnicode = IsUnicode();
     WW8_WrPlcFld* pFldP = CurrentFieldPlc();
 
-    // --> OD 2008-08-14 #158418#
     const bool bIncludeEmptyPicLocation = ( eFldType == ww::ePAGE );
-    // <--
     if (WRITEFIELD_START & nMode)
     {
         sal_uInt8 aFld13[2] = { 0x13, 0x00 };  // will change
@@ -1854,9 +1852,7 @@ void WW8Export::OutputField( const SwFie
             aFld13[0] |= 0x80;
         aFld13[1] = static_cast< sal_uInt8 >(eFldType);  // Typ nachtragen
         pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
-        // --> OD 2008-08-14 #158418#
         InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
-        // <--
     }
     if (WRITEFIELD_CMD_START & nMode)
     {
@@ -1867,8 +1863,8 @@ void WW8Export::OutputField( const SwFie
             SwWW8Writer::WriteString8(Strm(), rFldCmd, false,
                 RTL_TEXTENCODING_MS_1252);
         }
-        // --> OD 2005-06-08 #i43956# - write hyperlink character including
-        // attributes and corresponding binary data for certain reference fields.
+        // write hyperlink character including attributes and
+        // corresponding binary data for certain reference fields.
         bool bHandleBookmark = false;
 
         if (pFld)
@@ -1877,12 +1873,6 @@ void WW8Export::OutputField( const SwFie
                 ( eFldType == ww::ePAGEREF || eFldType == ww::eREF ||
                   eFldType == ww::eNOTEREF || eFldType == ww::eFOOTREF ))
                 bHandleBookmark = true;
-
-#if 0
-            if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
-                eFldType == ww::eFORMTEXT)
-                bHandleBookmark = true;
-#endif
         }
 
         if ( bHandleBookmark )
@@ -1908,16 +1898,13 @@ void WW8Export::OutputField( const SwFie
             // insert hyperlink character including attributes and data.
             InsertSpecialChar( *this, 0x01, &aLinkStr );
         }
-        // <--
     }
     if (WRITEFIELD_CMD_END & nMode)
     {
         static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
         pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
         pFldP->ResultAdded();
-        // --> OD 2008-08-14 #158418#
         InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
-        // <--
     }
     if (WRITEFIELD_END & nMode)
     {
@@ -1985,9 +1972,7 @@ void WW8Export::OutputField( const SwFie
         }
 
         pFldP->Append( Fc2Cp( Strm().Tell() ), aFld15 );
-        // --> OD 2008-08-14 #158418#
         InsertSpecialChar( *this, 0x15, 0, bIncludeEmptyPicLocation );
-        // <--
     }
 }
 
@@ -2619,7 +2604,7 @@ void AttributeOutputBase::TextField( con
     const SwField* pFld = rField.GetField();
     String sStr;        // fuer optionale Parameter
     bool bWriteExpand = false;
-    sal_uInt16 nSubType = pFld->GetSubType();
+    const sal_uInt16 nSubType = pFld->GetSubType();
 
     switch (pFld->GetTyp()->Which())
     {
@@ -2866,8 +2851,7 @@ void AttributeOutputBase::TextField( con
         break;
     case RES_INPUTFLD:
         {
-            const SwInputField * pInputField =
-                dynamic_cast<const SwInputField *>(pFld);
+            const SwInputField * pInputField = dynamic_cast<const SwInputField *>(pFld);
 
             if (pInputField->isFormField())
                 GetExport().DoFormText(pInputField);
@@ -5182,6 +5166,7 @@ void AttributeOutputBase::OutputItem( co
             TextCharFormat( static_cast< const SwFmtCharFmt& >( rHt ) );
             break;
         case RES_TXTATR_FIELD:
+        case RES_TXTATR_INPUTFIELD:
             TextField( static_cast< const SwFmtFld& >( rHt ) );
             break;
         case RES_TXTATR_FLYCNT:

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx Mon Nov 18 11:29:24 2013
@@ -1075,6 +1075,8 @@ void SwWW8FltControlStack::NewAttr(const
 {
     ASSERT(RES_TXTATR_FIELD != rAttr.Which(), "probably don't want to put"
         "fields into the control stack");
+    ASSERT(RES_TXTATR_INPUTFIELD != rAttr.Which(), "probably don't want to put"
+        "input fields into the control stack");
     ASSERT(RES_FLTR_REDLINE != rAttr.Which(), "probably don't want to put"
         "redlines into the control stack");
     SwFltControlStack::NewAttr(rPos, rAttr);
@@ -1316,6 +1318,12 @@ void SwWW8FltControlStack::SetAttrInDoc(
             ASSERT(!this, "What is a field doing in the control stack,"
                 "probably should have been in the endstack");
             break;
+
+        case RES_TXTATR_INPUTFIELD:
+            ASSERT(!this, "What is a input field doing in the control stack,"
+                "probably should have been in the endstack");
+            break;
+
         case RES_TXTATR_INETFMT:
             {
                 SwPaM aRegion(rTmpPos);
@@ -1435,6 +1443,7 @@ void SwWW8FltRefStack::SetAttrInDoc(cons
         do normal (?) strange stuff
         */
         case RES_TXTATR_FIELD:
+        case RES_TXTATR_INPUTFIELD:
         {
             SwNodeIndex aIdx(pEntry->nMkNode, 1);
             SwPaM aPaM(aIdx, pEntry->nMkCntnt);
@@ -1772,10 +1781,13 @@ void SwWW8ImplReader::ImportDop()
 
     mpDocShell->SetModifyPasswordHash(pWDop->lKeyProtDoc);
 
-    const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
-    sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
-    if (bUseEnhFields) {
-	rDoc.set(IDocumentSettingAccess::PROTECT_FORM, pWDop->fProtEnabled );
+    {
+        const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
+        const sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
+        if (bUseEnhFields)
+        {
+            rDoc.set(IDocumentSettingAccess::PROTECT_FORM, pWDop->fProtEnabled );
+        }
     }
 
     maTracer.LeaveEnvironment(sw::log::eDocumentProperties);
@@ -4028,7 +4040,8 @@ void wwSectionManager::InsertSegments()
         bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() &&  bThisAndPreviousAreCompatible): false;
         bool bInsertPageDesc = !bInsertSection;
         bool bProtected = SectionIsProtected(*aIter); // do we really  need this ?? I guess I have a different logic in editshell which disales this...
-        if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected()) {
+        if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected())
+        {
             // here we have the special case that the whole document is protected, with the execption of this section.
             // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
             mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx Mon Nov 18 11:29:24 2013
@@ -133,55 +133,62 @@ eF_ResT SwWW8ImplReader::Read_F_FormText
     */
 
     const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
-    sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
+    const sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
 
-    if (!bUseEnhFields) {
-	aFormula.sDefault = GetFieldResult(pF);
+    if (!bUseEnhFields)
+    {
+        aFormula.sDefault = GetFieldResult(pF);
 
 #if 0 // why not? (flr)
-    //substituting Unicode spacing 0x2002 with double space for layout
-	aFormula.sDefault.SearchAndReplaceAll(
-	    String(static_cast< sal_Unicode >(0x2002)),
-	    CREATE_CONST_ASC("  "));
+        //substituting Unicode spacing 0x2002 with double space for layout
+        aFormula.sDefault.SearchAndReplaceAll(
+            String(static_cast< sal_Unicode >(0x2002)),
+            CREATE_CONST_ASC("  "));
 #endif
 
-	SwInputField aFld((SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
-			  aFormula.sDefault , aFormula.sTitle , INP_TXT, 0 );
-	aFld.SetHelp(aFormula.sHelp);
-	aFld.SetToolTip(aFormula.sToolTip);
-
-    rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
-	return FLD_OK;
-    } else {
-	WW8PLCFx_Book* pB = pPlcxMan->GetBook();
-	String aBookmarkName;
-	if (pB!=NULL) {
-		WW8_CP currentCP=pF->nSCode;
-		WW8_CP currentLen=pF->nLen;
-
-		sal_uInt16 bkmFindIdx;
-		String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
-
-		if (aBookmarkFind.Len()>0) {
-			pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as consumed, such that tl'll not get inserted as a "normal" bookmark again
-			if (aBookmarkFind.Len()>0) {
-				aBookmarkName=aBookmarkFind;
-			}
-		}
-	}
+        SwInputField aFld(
+            static_cast<SwInputFieldType*>(rDoc.GetSysFldType( RES_INPUTFLD )),
+            aFormula.sDefault,
+            aFormula.sTitle,
+            INP_TXT,
+            0 );
+        aFld.SetHelp(aFormula.sHelp);
+        aFld.SetToolTip(aFormula.sToolTip);
 
-	if (pB!=NULL && aBookmarkName.Len()==0) {
-		aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
-	}
+        rDoc.InsertPoolItem( *pPaM, SwFmtFld(aFld), 0 );
+        return FLD_OK;
+    }
+    else
+    {
+        WW8PLCFx_Book* pB = pPlcxMan->GetBook();
+        String aBookmarkName;
+        if (pB!=NULL) {
+            WW8_CP currentCP=pF->nSCode;
+            WW8_CP currentLen=pF->nLen;
 
+            sal_uInt16 bkmFindIdx;
+            String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
 
-	if (aBookmarkName.Len()>0) {
-	    maFieldStack.back().SetBookmarkName(aBookmarkName);
-	    maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT));
-	    maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
-	    maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
-	}
-	return FLD_TEXT;
+            if (aBookmarkFind.Len()>0) {
+                pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as consumed, such that tl'll not get inserted as a "normal" bookmark again
+                if (aBookmarkFind.Len()>0) {
+                    aBookmarkName=aBookmarkFind;
+                }
+            }
+        }
+
+        if (pB!=NULL && aBookmarkName.Len()==0) {
+            aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
+        }
+
+
+        if (aBookmarkName.Len()>0) {
+            maFieldStack.back().SetBookmarkName(aBookmarkName);
+            maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT));
+            maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+            maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+        }
+        return FLD_TEXT;
     }
 }
 
@@ -197,49 +204,52 @@ eF_ResT SwWW8ImplReader::Read_F_FormChec
     const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
     sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
 
-    if (!bUseEnhFields) {
-    pFormImpl->InsertFormula(aFormula);
-    return FLD_OK;
-    } else {
-    String aBookmarkName;
-    WW8PLCFx_Book* pB = pPlcxMan->GetBook();
-    if (pB!=NULL) {
-        WW8_CP currentCP=pF->nSCode;
-        WW8_CP currentLen=pF->nLen;
+    if (!bUseEnhFields)
+    {
+        pFormImpl->InsertFormula(aFormula);
+        return FLD_OK;
+    }
+    else
+    {
+        String aBookmarkName;
+        WW8PLCFx_Book* pB = pPlcxMan->GetBook();
+        if (pB!=NULL) {
+            WW8_CP currentCP=pF->nSCode;
+            WW8_CP currentLen=pF->nLen;
 
-        sal_uInt16 bkmFindIdx;
-        String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
+            sal_uInt16 bkmFindIdx;
+            String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
 
-        if (aBookmarkFind.Len()>0) {
-            pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field
             if (aBookmarkFind.Len()>0) {
-                aBookmarkName=aBookmarkFind;
+                pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field
+                if (aBookmarkFind.Len()>0) {
+                    aBookmarkName=aBookmarkFind;
+                }
             }
         }
-    }
 
-    if (pB!=NULL && aBookmarkName.Len()==0) {
-        aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
-    }
+        if (pB!=NULL && aBookmarkName.Len()==0) {
+            aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
+        }
 
-    if (aBookmarkName.Len()>0)
-    {
-        IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
-        IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
+        if (aBookmarkName.Len()>0)
+        {
+            IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
+            IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
                 *pPaM, aBookmarkName,
                 rtl::OUString::createFromAscii( ODF_FORMCHECKBOX ) ) );
-        ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
-        if (pFieldmark!=NULL) {
-            IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
-            ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
-            (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
-            (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
-            if(pCheckboxFm)
-                pCheckboxFm->SetChecked(aFormula.nChecked);
-            // set field data here...
+            ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
+            if (pFieldmark!=NULL) {
+                IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
+                ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
+                (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+                (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+                if(pCheckboxFm)
+                    pCheckboxFm->SetChecked(aFormula.nChecked);
+                // set field data here...
+            }
         }
-    }
-    return FLD_OK;
+        return FLD_OK;
     }
 }
 

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par5.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par5.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8par5.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8par5.cxx Mon Nov 18 11:29:24 2013
@@ -1227,8 +1227,8 @@ eF_ResT SwWW8ImplReader::Read_F_Input( W
     if( !aDef.Len() )
         aDef = GetFieldResult( pF );
 
-    SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
-                        aDef, aQ, INP_TXT, 0 ); // sichtbar ( geht z.Zt. nicht anders )
+    SwInputField aFld( static_cast<SwInputFieldType*>(rDoc.GetSysFldType( RES_INPUTFLD )),
+                        aDef, aQ, INP_TXT, 0, false );
     rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
 
     return FLD_OK;
@@ -2668,8 +2668,8 @@ void SwWW8ImplReader::Read_SubF_Combined
                         sCombinedCharacters = sPart.Copy( nBegin+1, nEnd-nBegin-1 );
                         if ( sCombinedCharacters.Len() )
                         {
-                            SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
-                                sCombinedCharacters, sCombinedCharacters, INP_TXT, 0 );
+                            SwInputField aFld( static_cast<SwInputFieldType*>(rDoc.GetSysFldType( RES_INPUTFLD )),
+                                sCombinedCharacters, sCombinedCharacters, INP_TXT, 0, false );
                             rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 ); // insert input field
                         }
                     }

Modified: openoffice/trunk/main/sw/source/ui/app/applab.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/applab.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/applab.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/applab.cxx Mon Nov 18 11:29:24 2013
@@ -310,7 +310,7 @@ static sal_uInt16 nBCTitleNo = 0;
 			if ( nMin > 0 )
 			{
                 SvxLRSpaceItem aLR( RES_LR_SPACE );
-				pSh->SetAttr( aLR );
+				pSh->SetAttrItem( aLR );
 				SwFmt *pStandard = pSh->GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
 				aLR.SetLeft ( sal_uInt16(nMin) );
 				aLR.SetRight( sal_uInt16(nMin) );

Modified: openoffice/trunk/main/sw/source/ui/app/docst.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/docst.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/docst.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/docst.cxx Mon Nov 18 11:29:24 2013
@@ -878,7 +878,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const
 		case SFX_STYLE_FAMILY_CHAR:
 		{
 			SwFmtCharFmt aFmt(pStyle->GetCharFmt());
-			pSh->SetAttr( aFmt, (nMode & KEY_SHIFT) ?
+			pSh->SetAttrItem( aFmt, (nMode & KEY_SHIFT) ?
                 nsSetAttrMode::SETATTR_DONTREPLACE : nsSetAttrMode::SETATTR_DEFAULT );
 			break;
 		}
@@ -1184,7 +1184,7 @@ sal_uInt16 SwDocShell::MakeByExample( co
                 pCurrWrtShell->FillByEx( pChar );
                 pChar->SetDerivedFrom( pCurrWrtShell->GetCurCharFmt() );
 				SwFmtCharFmt aFmt( pChar );
-                pCurrWrtShell->SetAttr( aFmt );
+                pCurrWrtShell->SetAttrItem( aFmt );
                 pCurrWrtShell->EndAllAction();
 			}
 		}

Modified: openoffice/trunk/main/sw/source/ui/docvw/SidebarTxtControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/docvw/SidebarTxtControl.hxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/docvw/SidebarTxtControl.hxx (original)
+++ openoffice/trunk/main/sw/source/ui/docvw/SidebarTxtControl.hxx Mon Nov 18 11:29:24 2013
@@ -29,7 +29,7 @@
 class OutlinerView;
 class SwView;
 class SwPostItMgr;
-class SpellCallbackInfo;
+struct SpellCallbackInfo;
 
 namespace sw { namespace sidebarwindows {
 

Modified: openoffice/trunk/main/sw/source/ui/docvw/edtdd.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/docvw/edtdd.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/docvw/edtdd.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/docvw/edtdd.cxx Mon Nov 18 11:29:24 2013
@@ -270,13 +270,15 @@ sal_Int8 SwEditWin::ExecuteDrop( const E
 
 sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
 {
-	SwWrtShell &rSh = rView.GetWrtShell();
-	const Point aDocPt( PixelToLogic( rPixPnt ) );
-	if( rSh.ChgCurrPam( aDocPt ) || rSh.IsOverReadOnlyPos( aDocPt ) )
-		return 0;
+    SwWrtShell &rSh = rView.GetWrtShell();
+    const Point aDocPt( PixelToLogic( rPixPnt ) );
+    if( rSh.ChgCurrPam( aDocPt )
+        || rSh.IsOverReadOnlyPos( aDocPt )
+        || rSh.DocPtInsideInputFld( aDocPt ) )
+        return 0;
 
-	SdrObject *pObj = NULL;
-	const ObjCntType eType = rSh.GetObjCntType( aDocPt, pObj );
+    SdrObject *pObj = NULL;
+    const ObjCntType eType = rSh.GetObjCntType( aDocPt, pObj );
 
 	//Drop auf OutlinerView (TextEdit im Drawing) soll diese selbst entscheiden!
 	if( pObj )

Modified: openoffice/trunk/main/sw/source/ui/docvw/edtwin.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/docvw/edtwin.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/docvw/edtwin.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/docvw/edtwin.cxx Mon Nov 18 11:29:24 2013
@@ -86,6 +86,7 @@
 #include <dselect.hxx>
 #include <textsh.hxx>
 #include <shdwcrsr.hxx>
+#include <txatbase.hxx>
 #include <fmtanchr.hxx>
 #include <fmtornt.hxx>
 #include <fmtfsize.hxx>
@@ -921,7 +922,7 @@ void SwEditWin::FlushInBuffer()
                 if(bLang)
                 {
                     SvxLanguageItem aLangItem( eBufferLanguage, nWhich );
-                    rSh.SetAttr( aLangItem );
+                    rSh.SetAttrItem( aLangItem );
                 }
             }
         }
@@ -1395,8 +1396,8 @@ void SwEditWin::KeyInput(const KeyEvent 
     // pressing this inside a note will switch to next/previous note
     if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((rKeyCode.GetCode() == KEY_PAGEUP) || (rKeyCode.GetCode() == KEY_PAGEDOWN)))
     {
-        bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
-        SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
+        const bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
+        const SwFieldType* pFldType = rSh.GetFldType( 0, RES_POSTITFLD );
         rSh.MoveFldType( pFldType, bNext );
         return;
     }
@@ -1514,9 +1515,8 @@ void SwEditWin::KeyInput(const KeyEvent 
 
 
 
-    SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
-                                           : KS_CheckKey,
-                eNextKeyState = KS_Ende;
+    SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys : KS_CheckKey;
+    SW_KeyState eNextKeyState = KS_Ende;
     sal_uInt8 nDir = 0;
 
     if (nKS_NUMDOWN_Count > 0)
@@ -1801,7 +1801,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
                     break;
 
                 case KEY_RETURN:                // Return
-                    if( !rSh.HasReadonlySel() )
+                    if ( !rSh.HasReadonlySel()
+                         && !rSh.CrsrInsideInputFld() )
                     {
                         const int nSelectionType = rSh.GetSelectionType();
                         if(nSelectionType & nsSelectionType::SEL_OLE)
@@ -1837,8 +1838,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
                     break;
 
                 case KEY_RETURN | KEY_MOD2:     // ALT-Return
-                    if( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetCurNumRule() )
+                    if ( !rSh.HasReadonlySel()
+                         && !rSh.IsSttPara()
+                         && rSh.GetCurNumRule()
+                         && !rSh.CrsrInsideInputFld() )
+                    {
                         eKeyState = KS_NoNum;
+                    }
                     else if( rSh.CanSpecialInsert() )
                         eKeyState = KS_SpecialInsert;
                     break;
@@ -1949,6 +1955,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
                     {
                         eKeyState=KS_GotoNextFieldMark;
                     }
+                    else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+                    {
+                        GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
+                        eKeyState = KS_Ende;
+                    }
                     else
                     if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
                         !rSh.HasReadonlySel() )
@@ -1999,9 +2010,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
                     sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
                     sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
 #endif
-                    if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
+                    if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
+                    {
                         eKeyState=KS_GotoPrevFieldMark;
                     }
+                    else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+                    {
+                        GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
+                        eKeyState = KS_Ende;
+                    }
                     else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
                          !rSh.HasReadonlySel() )
                     {
@@ -2117,9 +2134,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
                             eKeyState = rKeyCode.GetModifier() & KEY_SHIFT ?
                                                 KS_PrevObject : KS_NextObject;
                         }
+                        else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+                        {
+                            GetView().GetViewFrame()->GetDispatcher()->Execute(
+                                KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD );
+                        }
                         else
-                            rSh.SelectNextPrevHyperlink(
-                                            KEY_SHIFT != rKeyCode.GetModifier() );
+                        {
+                            rSh.SelectNextPrevHyperlink( KEY_SHIFT != rKeyCode.GetModifier() );
+                        }
                     break;
                     case KEY_RETURN:
                     {
@@ -2763,12 +2786,6 @@ void SwEditWin::MouseButtonDown(const Mo
         }
     }
 
-    //Man kann sich in einem Selektionszustand befinden, wenn zuletzt
-    //mit dem Keyboard selektiert wurde, aber noch kein CURSOR_KEY
-    //anschliessend bewegt worden ist. In diesem Fall muss die vorher-
-    //gehende Selektion zuerst beendet werden.
-    //MA 07. Oct. 95: Und zwar nicht nur bei Linker Maustaste sondern immer.
-    //siehe auch Bug: 19263
     if ( rSh.IsInSelect() )
         rSh.EndSelect();
 
@@ -4187,7 +4204,19 @@ void SwEditWin::MouseButtonUp(const Mous
 
                             if( SwContentAtPos::SW_FIELD == aCntntAtPos.eCntntAtPos )
                             {
-                                rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+                                if ( aCntntAtPos.pFndTxtAttr != NULL
+                                     && aCntntAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD )
+                                {
+                                    // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART
+                                    // and CH_TXT_ATR_INPUTFIELDEND
+                                    rSh.SttSelect();
+                                    rSh.SelectTxt( *(aCntntAtPos.pFndTxtAttr->GetStart()) + 1,
+                                                   *(aCntntAtPos.pFndTxtAttr->End()) - 1 );
+                                }
+                                else
+                                {
+                                    rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+                                }
                             }
                             else if ( SwContentAtPos::SW_SMARTTAG == aCntntAtPos.eCntntAtPos )
                             {
@@ -4343,10 +4372,10 @@ void SwEditWin::MouseButtonUp(const Mous
                         Color aColor( COL_TRANSPARENT  );
                         if( !SwEditWin::bTransparentBackColor )
                             aColor = SwEditWin::aTextBackColor;
-                        rSh.SetAttr( SvxBrushItem( aColor, nId ) );
+                        rSh.SetAttrItem( SvxBrushItem( aColor, nId ) );
                     }
                     else
-                        rSh.SetAttr( SvxColorItem(SwEditWin::aTextColor, nId) );
+                        rSh.SetAttrItem( SvxColorItem(SwEditWin::aTextColor, nId) );
                     rSh.UnSetVisCrsr();
                     rSh.EnterStdMode();
                     rSh.SetVisCrsr(aDocPt);
@@ -4382,7 +4411,7 @@ void SwEditWin::MouseButtonUp(const Mous
                     if( (( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL )
                          & eSelection ) && !rSh.HasReadonlySel() )
                     {
-                        rSh.SetAttr( SwFmtCharFmt(pApplyTempl->aColl.pCharFmt) );
+                        rSh.SetAttrItem( SwFmtCharFmt(pApplyTempl->aColl.pCharFmt) );
                         rSh.UnSetVisCrsr();
                         rSh.EnterStdMode();
                         rSh.SetVisCrsr(aDocPt);

Modified: openoffice/trunk/main/sw/source/ui/docvw/edtwin2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/docvw/edtwin2.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/docvw/edtwin2.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/docvw/edtwin2.cxx Mon Nov 18 11:29:24 2013
@@ -140,276 +140,250 @@ void SwEditWin::RequestHelp(const HelpEv
 									SwContentAtPos::SW_REFMARK |
                                     SwContentAtPos::SW_SMARTTAG |
 #ifdef DBG_UTIL
-									SwContentAtPos::SW_TABLEBOXVALUE |
-						( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
+                                    SwContentAtPos::SW_TABLEBOXVALUE |
+                                    ( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
 #endif
-									SwContentAtPos::SW_TABLEBOXFML );
+                                    SwContentAtPos::SW_TABLEBOXFML );
 
-		if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
-		{
-             switch( aCntntAtPos.eCntntAtPos )
-			{
-			case SwContentAtPos::SW_TABLEBOXFML:
-				sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
-				sTxt += ((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
-				break;
-#ifdef DBG_UTIL
-			case SwContentAtPos::SW_TABLEBOXVALUE:
-			{
-                sTxt = UniString(
-                            ByteString::CreateFromDouble(
-                                ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()  )
-                            , gsl_getSystemTextEncoding());
-			}
-			break;
-			case SwContentAtPos::SW_CURR_ATTRS:
-				sTxt = aCntntAtPos.sStr;
-				break;
-#endif
-
-			case SwContentAtPos::SW_INETATTR:
+        if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
+        {
+            switch( aCntntAtPos.eCntntAtPos )
             {
-				sTxt = ((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
-				sTxt = URIHelper::removePassword( sTxt,
-										INetURLObject::WAS_ENCODED,
-			   							INetURLObject::DECODE_UNAMBIGUOUS);
-                //#i63832# remove the link target type
-                xub_StrLen nFound = sTxt.Search(cMarkSeperator);
-                if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
+            case SwContentAtPos::SW_TABLEBOXFML:
+                sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
+                sTxt += ((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
+                break;
+#ifdef DBG_UTIL
+            case SwContentAtPos::SW_TABLEBOXVALUE:
                 {
-                    String sSuffix( sTxt.Copy(nFound) );
-                    if( sSuffix.EqualsAscii( pMarkToTable ) ||
-                        sSuffix.EqualsAscii( pMarkToFrame ) ||
-                        sSuffix.EqualsAscii( pMarkToRegion ) ||
-                        sSuffix.EqualsAscii( pMarkToOutline ) ||
-                        sSuffix.EqualsAscii( pMarkToText ) ||
-                        sSuffix.EqualsAscii( pMarkToGraphic ) ||
-                        sSuffix.EqualsAscii( pMarkToOLE ))
-                    sTxt = sTxt.Copy( 0, nFound - 1);
+                    sTxt = UniString(
+                        ByteString::CreateFromDouble(
+                        ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()  )
+                        , gsl_getSystemTextEncoding());
                 }
-                // --> OD 2009-08-18 #i104300#
-                // special handling if target is a cross-reference bookmark
+                break;
+            case SwContentAtPos::SW_CURR_ATTRS:
+                sTxt = aCntntAtPos.sStr;
+                break;
+#endif
+
+            case SwContentAtPos::SW_INETATTR:
                 {
-                    String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
-                    IDocumentMarkAccess* const pMarkAccess =
-                                                rSh.getIDocumentMarkAccess();
-                    IDocumentMarkAccess::const_iterator_t ppBkmk =
-                                    pMarkAccess->findBookmark( sTmpSearchStr );
-                    if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
-                         IDocumentMarkAccess::GetType( *(ppBkmk->get()) )
-                            == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
+                    sTxt = ((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
+                    sTxt = URIHelper::removePassword( sTxt,
+                        INetURLObject::WAS_ENCODED,
+                        INetURLObject::DECODE_UNAMBIGUOUS);
+                    //#i63832# remove the link target type
+                    xub_StrLen nFound = sTxt.Search(cMarkSeperator);
+                    if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
                     {
-                        SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
-                        if ( pTxtNode )
+                        String sSuffix( sTxt.Copy(nFound) );
+                        if( sSuffix.EqualsAscii( pMarkToTable ) ||
+                            sSuffix.EqualsAscii( pMarkToFrame ) ||
+                            sSuffix.EqualsAscii( pMarkToRegion ) ||
+                            sSuffix.EqualsAscii( pMarkToOutline ) ||
+                            sSuffix.EqualsAscii( pMarkToText ) ||
+                            sSuffix.EqualsAscii( pMarkToGraphic ) ||
+                            sSuffix.EqualsAscii( pMarkToOLE ))
+                            sTxt = sTxt.Copy( 0, nFound - 1);
+                    }
+                    // special handling if target is a cross-reference bookmark
+                    {
+                        String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
+                        IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
+                        IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findBookmark( sTmpSearchStr );
+                        if ( ppBkmk != pMarkAccess->getBookmarksEnd()
+                             && IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
                         {
-                            sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true );
-
-                            if( sTxt.Len() )
+                            SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
+                            if ( pTxtNode )
                             {
-                                sTxt.EraseAllChars( 0xad );
-                                for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+                                sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true );
+
+                                if( sTxt.Len() )
                                 {
-                                    if( *p < 0x20 )
-                                        *p = 0x20;
-                                    else if(*p == 0x2011)
-                                        *p = '-';
+                                    sTxt.EraseAllChars( 0xad );
+                                    for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+                                    {
+                                        if( *p < 0x20 )
+                                            *p = 0x20;
+                                        else if(*p == 0x2011)
+                                            *p = '-';
+                                    }
                                 }
                             }
                         }
                     }
-                }
-                // <--
-                // --> OD 2007-07-26 #i80029#
-                sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
-                if ( !bExecHyperlinks )
-                {
-                    SvtSecurityOptions aSecOpts;
-                    bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
 
+                    sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
                     if ( !bExecHyperlinks )
                     {
-                        sTxt.InsertAscii( ": ", 0 );
-                        sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+                        SvtSecurityOptions aSecOpts;
+                        bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+
+                        if ( !bExecHyperlinks )
+                        {
+                            sTxt.InsertAscii( ": ", 0 );
+                            sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+                        }
                     }
+                    break;
                 }
-                // <--
-				break;
-            }
-			case SwContentAtPos::SW_SMARTTAG:
-            {
-				sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
+            case SwContentAtPos::SW_SMARTTAG:
+                {
+                    sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
 
-                KeyCode aCode( KEY_SPACE );
-                KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
-                String aModStr( aModifiedCode.GetName() );
-                aModStr.SearchAndReplace( aCode.GetName(), String() );
-                aModStr.SearchAndReplaceAllAscii( "+", String() );
-                sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
-            }
-            break;
+                    KeyCode aCode( KEY_SPACE );
+                    KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
+                    String aModStr( aModifiedCode.GetName() );
+                    aModStr.SearchAndReplace( aCode.GetName(), String() );
+                    aModStr.SearchAndReplaceAllAscii( "+", String() );
+                    sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
+                }
+                break;
 
-			case SwContentAtPos::SW_FTN:
-				if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr )
-				{
+            case SwContentAtPos::SW_FTN:
+                if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr )
+                {
                     const SwFmtFtn* pFtn = (SwFmtFtn*)aCntntAtPos.aFnd.pAttr;
-					pFtn->GetFtnText( sTxt );
-					sTxt.Insert( SW_RESSTR( pFtn->IsEndNote()
-									? STR_ENDNOTE : STR_FTNNOTE ), 0 );
+                    pFtn->GetFtnText( sTxt );
+                    sTxt.Insert( SW_RESSTR( pFtn->IsEndNote()
+                        ? STR_ENDNOTE : STR_FTNNOTE ), 0 );
                     if( aCntntAtPos.IsInRTLText() )
                         nStyle |= QUICKHELP_BIDI_RTL;
                 }
-				break;
+                break;
 
-			case SwContentAtPos::SW_REDLINE:
-				lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
-				break;
-
-			case SwContentAtPos::SW_TOXMARK:
-				sTxt = aCntntAtPos.sStr;
-				if( sTxt.Len() && aCntntAtPos.pFndTxtAttr )
-				{
-					const SwTOXType* pTType = aCntntAtPos.pFndTxtAttr->
-										GetTOXMark().GetTOXType();
-					if( pTType && pTType->GetTypeName().Len() )
-					{
-						sTxt.InsertAscii( ": ", 0 );
-						sTxt.Insert( pTType->GetTypeName(), 0 );
-					}
-				}
-				break;
-			case SwContentAtPos::SW_REFMARK:
-				if(aCntntAtPos.aFnd.pAttr)
-				{
-					sTxt = SW_RES(STR_CONTENT_TYPE_SINGLE_REFERENCE);
-					sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": "));
-					sTxt += ((const SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
-				}
-			break;
+            case SwContentAtPos::SW_REDLINE:
+                lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
+                break;
+
+            case SwContentAtPos::SW_TOXMARK:
+                sTxt = aCntntAtPos.sStr;
+                if( sTxt.Len() && aCntntAtPos.pFndTxtAttr )
+                {
+                    const SwTOXType* pTType = aCntntAtPos.pFndTxtAttr->
+                        GetTOXMark().GetTOXType();
+                    if( pTType && pTType->GetTypeName().Len() )
+                    {
+                        sTxt.InsertAscii( ": ", 0 );
+                        sTxt.Insert( pTType->GetTypeName(), 0 );
+                    }
+                }
+                break;
 
-			default:
-				{
-					SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
-					if(!pModOpt->IsHideFieldTips())
-					{
-						const SwField* pFld = aCntntAtPos.aFnd.pFld;
-						switch( pFld->Which() )
-						{
-						case RES_SETEXPFLD:
-						case RES_TABLEFLD:
-						case RES_GETEXPFLD:
-						{
-							sal_uInt16 nOldSubType = pFld->GetSubType();
-							((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
-                            sTxt = pFld->ExpandField(true);
-							((SwField*)pFld)->SetSubType(nOldSubType);
-						}
-						break;
-
-						case RES_POSTITFLD:
-							{
-								/*
-								SwPostItMgr* pMgr = rView.GetPostItMgr();
-								if (pMgr->ShowNotes())
-								{
-									SwFmtFld* pSwFmtFld = 0;
-									if (pMgr->ShowPreview(pFld,pSwFmtFld))
-									{
-										SwPostIt* pPostIt = new SwPostIt(static_cast<Window*>(this),0,pSwFmtFld,pMgr,PB_Preview);
-										pPostIt->InitControls();
-										pPostIt->SetReadonly(true);
-										pMgr->SetColors(pPostIt,static_cast<SwPostItField*>(pSwFmtFld->GetFld()));
-										pPostIt->SetVirtualPosSize(rEvt.GetMousePosPixel(),Size(180,70));
-										pPostIt->ShowNote();
-										SetPointerPosPixel(pPostIt->GetPosPixel() + Point(20,20));
-									}
-									return;
-								}
-								*/
-								break;
-							}
-						case RES_INPUTFLD:	// BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
-							bBalloon = sal_True;
-							/* no break */
-						case RES_JUMPEDITFLD:
-							sTxt = pFld->GetPar2();
-							break;
+            case SwContentAtPos::SW_REFMARK:
+                if(aCntntAtPos.aFnd.pAttr)
+                {
+                    sTxt = SW_RES(STR_CONTENT_TYPE_SINGLE_REFERENCE);
+                    sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": "));
+                    sTxt += ((const SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
+                }
+                break;
 
-						case RES_DBFLD:
+            default:
+                {
+                    SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
+                    if(!pModOpt->IsHideFieldTips())
+                    {
+                        const SwField* pFld = aCntntAtPos.aFnd.pFld;
+                        switch( pFld->Which() )
+                        {
+                        case RES_SETEXPFLD:
+                        case RES_TABLEFLD:
+                        case RES_GETEXPFLD:
+                            {
+                                sal_uInt16 nOldSubType = pFld->GetSubType();
+                                ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
+                                sTxt = pFld->ExpandField(true);
+                                ((SwField*)pFld)->SetSubType(nOldSubType);
+                            }
+                            break;
+
+                        case RES_POSTITFLD:
+                            {
+                                break;
+                            }
+                        case RES_INPUTFLD:	// BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
+                            bBalloon = sal_True;
+                            /* no break */
+                        case RES_JUMPEDITFLD:
+                            sTxt = pFld->GetPar2();
+                            break;
+
+                        case RES_DBFLD:
                             sTxt = pFld->GetFieldName();
-							break;
+                            break;
 
-						case RES_USERFLD:
-						case RES_HIDDENTXTFLD:
-							sTxt = pFld->GetPar1();
-							break;
+                        case RES_USERFLD:
+                        case RES_HIDDENTXTFLD:
+                            sTxt = pFld->GetPar1();
+                            break;
 
-						case RES_DOCSTATFLD:
-							break;
+                        case RES_DOCSTATFLD:
+                            break;
 
-						case RES_MACROFLD:
-							sTxt = ((const SwMacroField*)pFld)->GetMacro();
-							break;
+                        case RES_MACROFLD:
+                            sTxt = ((const SwMacroField*)pFld)->GetMacro();
+                            break;
 
-						case RES_GETREFFLD:
-                        {
-                            // --> OD 2008-01-09 #i85090#
-                            const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
-                            ASSERT( pRefFld,
-                                    "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
-                            if ( pRefFld )
+                        case RES_GETREFFLD:
                             {
-                                if ( pRefFld->IsRefToHeadingCrossRefBookmark() ||
-                                     pRefFld->IsRefToNumItemCrossRefBookmark() )
+                                const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
+                                ASSERT( pRefFld,
+                                    "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
+                                if ( pRefFld )
                                 {
-                                    sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
-                                    if ( sTxt.Len() > 80  )
+                                    if ( pRefFld->IsRefToHeadingCrossRefBookmark() ||
+                                        pRefFld->IsRefToNumItemCrossRefBookmark() )
                                     {
-                                        sTxt.Erase( 80 );
-                                        sTxt += '.';
-                                        sTxt += '.';
-                                        sTxt += '.';
+                                        sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
+                                        if ( sTxt.Len() > 80  )
+                                        {
+                                            sTxt.Erase( 80 );
+                                            sTxt += '.';
+                                            sTxt += '.';
+                                            sTxt += '.';
+                                        }
+                                    }
+                                    else
+                                    {
+                                        sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
                                     }
-                                }
-                                else
-                                {
-                                    sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
                                 }
                             }
-                            // <--
+                            break;
                         }
-                        break;
-						}
-					}
-
-					if( !sTxt.Len() )
-					{
-						aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
-						if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
-							lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl,
-													sTxt, bBalloon );
-					}
+                    }
+
+                    if( !sTxt.Len() )
+                    {
+                        aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
+                        if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
+                            lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
+                    }
                 }
-			}
-			if (sTxt.Len() )
-			{
-				if( bBalloon )
-					Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sTxt );
-				else
-				{
-					// dann zeige die Hilfe mal an:
-					Rectangle aRect( aFldRect.SVRect() );
-					Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
-					aRect.Left()   = aPt.X();
-					aRect.Top()    = aPt.Y();
-					aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
-					aRect.Right()  = aPt.X();
-					aRect.Bottom() = aPt.Y();
+            }
+            if (sTxt.Len() )
+            {
+                if( bBalloon )
+                    Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sTxt );
+                else
+                {
+                    // dann zeige die Hilfe mal an:
+                    Rectangle aRect( aFldRect.SVRect() );
+                    Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
+                    aRect.Left()   = aPt.X();
+                    aRect.Top()    = aPt.Y();
+                    aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
+                    aRect.Right()  = aPt.X();
+                    aRect.Bottom() = aPt.Y();
                     Help::ShowQuickHelp( this, aRect, sTxt, nStyle );
-				}
-			}
+                }
+            }
 
-			bWeiter = sal_False;
-		}
+            bWeiter = sal_False;
+        }
         if( bWeiter )
         {
             sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos);
@@ -424,7 +398,6 @@ void SwEditWin::RequestHelp(const HelpEv
                 case SW_TABROW_VERT:
                     nTabRes = STR_TABLE_ROW_ADJUST;
                     break;
-                // --> FME 2004-07-30 #i32329# Enhanced table selection
                 case SW_TABSEL_HORI:
                 case SW_TABSEL_HORI_RTL:
                 case SW_TABSEL_VERT:
@@ -439,7 +412,6 @@ void SwEditWin::RequestHelp(const HelpEv
                 case SW_TABCOLSEL_VERT:
                     nTabRes = STR_TABLE_SELECT_COL;
                     break;
-                // <--
             }
             if(nTabRes)
             {

Modified: openoffice/trunk/main/sw/source/ui/envelp/envfmt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/envelp/envfmt.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/envelp/envfmt.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/envelp/envfmt.cxx Mon Nov 18 11:29:24 2013
@@ -300,7 +300,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuBu
                     pCollSet->Put( aTmpBrush );
 				}
 				aOutputSet.ClearItem( RES_BACKGROUND );
-				//pColl->SetAttr( aTmpSet );
                 pCollSet->Put(aOutputSet);
 			}
 			delete pDlg;
@@ -354,7 +353,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuBu
 				}
 				if( pOutputSet->Count() )
 				{
-					//pColl->SetAttr( *pOutputSet );
                     pCollSet->Put(*pOutputSet);
 				}
 			}

Modified: openoffice/trunk/main/sw/source/ui/fldui/fldedt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/fldui/fldedt.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/fldui/fldedt.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/fldui/fldedt.cxx Mon Nov 18 11:29:24 2013
@@ -33,45 +33,24 @@
 #include <sfx2/app.hxx>
 #include <svx/optgenrl.hxx>
 #include <docufld.hxx>
-#ifndef _VIEW_HXX
+#include <expfld.hxx>
 #include <view.hxx>
-#endif
 #include <dbfld.hxx>
 #include <wrtsh.hxx>
-#ifndef _FLDDB_HXX
 #include <flddb.hxx>
-#endif
-#ifndef _FLDDINF_HXX
 #include <flddinf.hxx>
-#endif
-#ifndef _FLDVAR_HXX
 #include <fldvar.hxx>
-#endif
-#ifndef _FLDDOK_HXX
 #include <flddok.hxx>
-#endif
-#ifndef _FLDFUNC_HXX
 #include <fldfunc.hxx>
-#endif
-#ifndef _FLDREF_HXX
 #include <fldref.hxx>
-#endif
 #include <fldedt.hxx>
 #include <crsskip.hxx>
 
 
-#ifndef _CMDID_H
 #include <cmdid.h>
-#endif
-#ifndef _HELPID_H
 #include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
 #include <globals.hrc>
-#endif
-#ifndef _FLDUI_HRC
 #include <fldui.hrc>
-#endif
 #include "swabstdlg.hxx"
 #include "dialog.hrc"
 
@@ -103,10 +82,21 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) 
 
 	pSh->SetCareWin(this);
 
-    /* #108536# Only create selection if there is none
-        already. Normalize PaM instead of swapping. */
+    if ( pSh->CrsrInsideInputFld() )
+    {
+        // move cursor to start of Input Field
+        SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
+        if ( pInputFld != NULL
+             && pInputFld->GetFmtFld() != NULL )
+        {
+            pSh->GotoField( *(pInputFld->GetFmtFld()) );
+        }
+    }
+
     if ( ! pSh->HasSelection() )
+    {
         pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
+    }
 
 	pSh->NormalizePam();
 

Modified: openoffice/trunk/main/sw/source/ui/fldui/fldmgr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/fldui/fldmgr.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/fldui/fldmgr.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/fldui/fldmgr.cxx Mon Nov 18 11:29:24 2013
@@ -343,7 +343,7 @@ SwField* SwFldMgr::GetCurFld()
 {
 	SwWrtShell *pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
 	if ( pSh )
-		pCurFld = pSh->GetCurFld();
+		pCurFld = pSh->GetCurFld( true );
 	else
 		pCurFld = NULL;
 
@@ -818,10 +818,12 @@ sal_Bool SwFldMgr::GoNextPrev( sal_Bool 
 	if (pTyp && pTyp->Which() == RES_DBFLD)
 	{
 		// Fuer Feldbefehl-bearbeiten (alle DB-Felder anspringen)
-		return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD );
+		return pSh->MoveFldType( 0, (bNext ? true : false), RES_DBFLD );
 	}
 
-	return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : sal_False;
+    return (pTyp && pSh)
+           ? pSh->MoveFldType( pTyp, (bNext ? true : false) )
+           : sal_False;
 }
 
 /*--------------------------------------------------------------------
@@ -1008,7 +1010,7 @@ sal_Bool SwFldMgr::InsertFld(  const SwI
 		{
             if( rData.sPar1.Len() > 0 && CanInsertRefMark( rData.sPar1 ) )
 			{
-                pCurShell->SetAttr( SwFmtRefMark( rData.sPar1 ) );
+                pCurShell->SetAttrItem( SwFmtRefMark( rData.sPar1 ) );
 				return sal_True;
 			}
 			return sal_False;
@@ -1236,13 +1238,13 @@ sal_Bool SwFldMgr::InsertFld(  const SwI
 			}
 			else
 			{
-				SwInputFieldType* pTyp =
+                SwInputFieldType* pTyp =
                     (SwInputFieldType*)pCurShell->GetFldType(0, RES_INPUTFLD);
 
-				SwInputField* pInpFld =
-                    new SwInputField(pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
-				pFld = pInpFld;
-			}
+                SwInputField* pInpFld =
+                    new SwInputField( pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
+                pFld = pInpFld;
+            }
 
 			// Dialog starten
 			//

Modified: openoffice/trunk/main/sw/source/ui/inc/wrtsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/inc/wrtsh.hxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/inc/wrtsh.hxx (original)
+++ openoffice/trunk/main/sw/source/ui/inc/wrtsh.hxx Mon Nov 18 11:29:24 2013
@@ -256,7 +256,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimple
 	sal_Bool	PageCrsr(SwTwips lOffset, sal_Bool bSelect);
 
 	// Felder Update
-	void	UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False );
+	void	UpdateInputFlds( SwInputFieldList* pLst = 0 );
 
 	void	NoEdit(sal_Bool bHideCrsr = sal_True);
 	void	Edit();
@@ -446,9 +446,6 @@ typedef sal_Bool (SwWrtShell:: *FNSimple
 	void NavigatorPaste( const NaviContentBookmark& rBkmk,
 						 const sal_uInt16 nAction );
 
-	// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
-	virtual void NewCoreSelection();
-
 	virtual void ApplyViewOptions( const SwViewOption &rOpt );
 
 	// autom. Update von Vorlagen

Modified: openoffice/trunk/main/sw/source/ui/lingu/hhcwrp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/lingu/hhcwrp.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/lingu/hhcwrp.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/lingu/hhcwrp.cxx Mon Nov 18 11:29:24 2013
@@ -400,7 +400,7 @@ void SwHHCWrapper::ChangeText_impl( cons
         // was deleted)
         rWrtShell.ResetAttr();
         // apply previously saved attributes to new text
-        rWrtShell.SetAttr( aItemSet );
+        rWrtShell.SetAttrSet( aItemSet );
 	}
 	else
 	{
@@ -512,7 +512,7 @@ void SwHHCWrapper::ReplaceUnit(
         SwPaM *pPaM = rWrtShell.GetCrsr();
         (void)pPaM;
 #endif
-        rWrtShell.SetAttr(*pRuby);
+        rWrtShell.SetAttrItem(*pRuby);
         delete pRuby;
         rWrtShell.EndUndo( UNDO_SETRUBYATTR );
     }
@@ -564,7 +564,7 @@ void SwHHCWrapper::ReplaceUnit(
                 aSet.Put( aFontItem );
             }
 
-			rWrtShell.SetAttr( aSet );
+			rWrtShell.SetAttrSet( aSet );
 
 			rWrtShell.ClearMark();
 		}

Modified: openoffice/trunk/main/sw/source/ui/misc/insfnote.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/misc/insfnote.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/misc/insfnote.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/misc/insfnote.cxx Mon Nov 18 11:29:24 2013
@@ -79,7 +79,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
 							   rFont.GetStyleName(), rFont.GetPitch(),
                                eCharSet, RES_CHRATR_FONT );
 			aSet.Put( aFont );
-			rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+			rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
 			rSh.ResetSelect(0, sal_False);
 			rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
 		}

Modified: openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx?rev=1542986&r1=1542985&r2=1542986&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx Mon Nov 18 11:29:24 2013
@@ -1095,20 +1095,21 @@ void SwAnnotationShell::StateInsert(SfxI
 
 void SwAnnotationShell::NoteExec(SfxRequest &rReq)
 {
-	SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
-	if ( !pPostItMgr )
-		return;
+    SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
+    if ( !pPostItMgr )
+        return;
 
-	sal_uInt16 nSlot = rReq.GetSlot();
-	switch (nSlot)
-	{
-		case FN_REPLY:
-		case FN_POSTIT:
-		case FN_DELETE_COMMENT:
-            if ( pPostItMgr->HasActiveSidebarWin() )
-                pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
-			break;
-		case FN_DELETE_ALL_NOTES:
+    sal_uInt16 nSlot = rReq.GetSlot();
+    switch (nSlot)
+    {
+    case FN_REPLY:
+    case FN_POSTIT:
+    case FN_DELETE_COMMENT:
+        if ( pPostItMgr->HasActiveSidebarWin() )
+            pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
+        break;
+
+    case FN_DELETE_ALL_NOTES:
 			pPostItMgr->Delete();
 			break;
 		case FN_DELETE_NOTE_AUTHOR:
@@ -1143,31 +1144,32 @@ void SwAnnotationShell::NoteExec(SfxRequ
 
 void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
 {
-	SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
-	SfxWhichIter aIter(rSet);
-	sal_uInt16 nWhich = aIter.FirstWhich();
+    SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
+    SfxWhichIter aIter(rSet);
+    sal_uInt16 nWhich = aIter.FirstWhich();
     while(nWhich)
-	{
+    {
         sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
-		switch( nSlotId )
-		{
-			case FN_POSTIT:
-			case FN_DELETE_NOTE_AUTHOR:
-			case FN_DELETE_ALL_NOTES:
-			case FN_HIDE_NOTE:
-			case FN_HIDE_NOTE_AUTHOR:
-			case FN_HIDE_ALL_NOTES:
-            case FN_DELETE_COMMENT:
-			{
-                if ( !pPostItMgr ||
-                     !pPostItMgr->HasActiveAnnotationWin() )
+        switch( nSlotId )
+        {
+        case FN_POSTIT:
+        case FN_DELETE_NOTE_AUTHOR:
+        case FN_DELETE_ALL_NOTES:
+        case FN_HIDE_NOTE:
+        case FN_HIDE_NOTE_AUTHOR:
+        case FN_HIDE_ALL_NOTES:
+        case FN_DELETE_COMMENT:
+            {
+                if( !pPostItMgr
+                    || !pPostItMgr->HasActiveAnnotationWin() )
                 {
-					rSet.DisableItem(nWhich);
+                    rSet.DisableItem(nWhich);
                 }
-				break;
-			}
-			case FN_REPLY:
-			{
+                break;
+            }
+
+        case FN_REPLY:
+            {
                 if ( !pPostItMgr ||
                      !pPostItMgr->HasActiveAnnotationWin() )
                 {