You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/11/27 18:25:54 UTC
svn commit: r1546124 [29/33] - in /openoffice/branches/alg/aw080: ./ main/
main/accessibility/inc/accessibility/extended/
main/accessibility/inc/accessibility/helper/
main/accessibility/inc/accessibility/standard/
main/accessibility/source/extended/ ma...
Modified: openoffice/branches/alg/aw080/main/sw/source/core/unocore/unoportenum.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/unocore/unoportenum.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/unocore/unoportenum.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/unocore/unoportenum.cxx Wed Nov 27 17:25:40 2013
@@ -46,6 +46,8 @@
#include <unoredline.hxx>
#include <unofield.hxx>
#include <unometa.hxx>
+#include <fmtfld.hxx>
+#include <fldbas.hxx>
#include <fmtmeta.hxx>
#include <fmtanchr.hxx>
#include <fmtrfmrk.hxx>
@@ -438,7 +440,7 @@ lcl_CreateRefMarkPortion(
{
pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_REFMARK_START);
pPortion->SetRefMark(xContent);
- pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
+ pPortion->SetCollapsed(rAttr.End() ? false : true);
}
else
{
@@ -459,7 +461,7 @@ lcl_InsertRubyPortion(
SwXTextPortion* pPortion = new SwXTextPortion(pUnoCrsr,
static_cast<const SwTxtRuby&>(rAttr), xParent, bEnd);
rPortions.push_back(pPortion);
- pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
+ pPortion->SetCollapsed(rAttr.End() ? false : true);
}
//-----------------------------------------------------------------------------
@@ -745,9 +747,9 @@ lcl_ExportHints(
sal_uInt16 nAttrWhich = pAttr->Which();
if (nNextStart == nCurrentIndex)
{
- switch( nAttrWhich )
- {
- case RES_TXTATR_FIELD:
+ switch( nAttrWhich )
+ {
+ case RES_TXTATR_FIELD:
if(!bRightMoveForbidden)
{
pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
@@ -760,34 +762,56 @@ lcl_ExportHints(
SwXTextField::CreateSwXTextField(*pDoc, pAttr->GetFmtFld());
pPortion->SetTextField(xField);
}
- break;
- case RES_TXTATR_FLYCNT :
+ break;
+
+ case RES_TXTATR_INPUTFIELD:
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
+
+ pUnoCrsr->Right(
+ pAttr->GetFmtFld().GetField()->GetPar1().Len() + 2,
+ CRSR_SKIP_CHARS,
+ sal_False,
+ sal_False );
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
- break; // Robust #i81708 content in covered cells
- pUnoCrsr->Exchange();
- xRef = new SwXTextPortion(
- pUnoCrsr, xParent, PORTION_FRAME);
+ break;
+ SwXTextPortion* pPortion =
+ new SwXTextPortion( pUnoCrsr, xParent, PORTION_FIELD);
+ xRef = pPortion;
+ Reference<XTextField> xField =
+ SwXTextField::CreateSwXTextField(*pDoc, pAttr->GetFmtFld());
+ pPortion->SetTextField(xField);
}
- break;
- case RES_TXTATR_FTN :
- {
+ break;
+
+ case RES_TXTATR_FLYCNT:
if(!bRightMoveForbidden)
{
pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
- break;
- SwXTextPortion* pPortion;
- xRef = pPortion = new SwXTextPortion(
+ break; // Robust #i81708 content in covered cells
+ pUnoCrsr->Exchange();
+ xRef = new SwXTextPortion( pUnoCrsr, xParent, PORTION_FRAME);
+ }
+ break;
+
+ case RES_TXTATR_FTN:
+ {
+ if(!bRightMoveForbidden)
+ {
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
+ if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
+ break;
+ SwXTextPortion* pPortion;
+ xRef = pPortion = new SwXTextPortion(
pUnoCrsr, xParent, PORTION_FOOTNOTE);
- Reference<XFootnote> xContent =
- SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
- pPortion->SetFootnote(xContent);
+ Reference<XFootnote> xContent =
+ SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
+ pPortion->SetFootnote(xContent);
+ }
}
- }
- break;
+ break;
+
case RES_TXTATR_TOXMARK:
case RES_TXTATR_REFMARK:
{
Modified: openoffice/branches/alg/aw080/main/sw/source/core/unocore/unorefmk.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/unocore/unorefmk.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/unocore/unorefmk.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/unocore/unorefmk.cxx Wed Nov 27 17:25:40 2013
@@ -356,8 +356,8 @@ SwXReferenceMark::getAnchor() throw (uno
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const ::std::auto_ptr<SwPaM> pPam( (pTxtMark->GetEnd())
- ? new SwPaM( rTxtNode, *pTxtMark->GetEnd(),
+ const ::std::auto_ptr<SwPaM> pPam( (pTxtMark->End())
+ ? new SwPaM( rTxtNode, *pTxtMark->End(),
rTxtNode, *pTxtMark->GetStart())
: new SwPaM( rTxtNode, *pTxtMark->GetStart()) );
@@ -387,9 +387,10 @@ void SAL_CALL SwXReferenceMark::dispose(
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- xub_StrLen nStt = *pTxtMark->GetStart(),
- nEnd = pTxtMark->GetEnd() ? *pTxtMark->GetEnd()
- : nStt + 1;
+ const xub_StrLen nStt = *pTxtMark->GetStart();
+ const xub_StrLen nEnd = pTxtMark->End()
+ ? *pTxtMark->End()
+ : nStt + 1;
SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
m_pImpl->m_pDoc->DeleteAndJoin( aPam );
@@ -477,17 +478,18 @@ throw (uno::RuntimeException)
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- xub_StrLen nStt = *pTxtMark->GetStart(),
- nEnd = pTxtMark->GetEnd() ? *pTxtMark->GetEnd()
- : nStt + 1;
+ const xub_StrLen nStt = *pTxtMark->GetStart();
+ const xub_StrLen nEnd = pTxtMark->End()
+ ? *pTxtMark->End()
+ : nStt + 1;
- SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
+ SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
// deletes the m_pImpl->m_pDoc member in the SwXReferenceMark!
m_pImpl->m_pDoc->DeleteAndJoin( aPam );
// The aPam will keep the correct and functional doc though
m_pImpl->m_sMarkName = rName;
- //create a new one
+ //create a new one
m_pImpl->InsertRefMark( aPam, 0 );
m_pImpl->m_pDoc = aPam.GetDoc();
}
@@ -873,7 +875,7 @@ bool SwXMeta::SetContentRange(
{
// rStart points at the first position _within_ the meta!
rStart = *pTxtAttr->GetStart() + 1;
- rEnd = *pTxtAttr->GetEnd();
+ rEnd = *pTxtAttr->End();
return true;
}
}
Modified: openoffice/branches/alg/aw080/main/sw/source/core/view/viewimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/view/viewimp.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/view/viewimp.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/view/viewimp.cxx Wed Nov 27 17:25:40 2013
@@ -446,6 +446,24 @@ void SwViewImp::MoveAccessible( const Sw
} while ( pTmp != pVSh );
}
+//IAccessibility2 Implementation 2009-----
+void SwViewImp::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage)
+{
+ if( IsAccessible() )
+ GetAccessibleMap().FirePageChangeEvent( nOldPage, nNewPage);
+}
+
+void SwViewImp::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection)
+{
+ if( IsAccessible() )
+ GetAccessibleMap().FireSectionChangeEvent(nOldSection, nNewSection);
+}
+void SwViewImp::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn)
+{
+ if( IsAccessible() )
+ GetAccessibleMap().FireColumnChangeEvent(nOldColumn, nNewColumn);
+}
+//-----IAccessibility2 Implementation 2009
void SwViewImp::InvalidateAccessibleFrmContent( const SwFrm *pFrm )
{
ASSERT( pFrm->IsAccessibleFrm(), "frame is not accessible" );
Modified: openoffice/branches/alg/aw080/main/sw/source/core/view/vprint.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/view/vprint.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/view/vprint.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/view/vprint.cxx Wed Nov 27 17:25:40 2013
@@ -662,6 +662,7 @@ sal_Bool ViewShell::IsAnyFieldInDoc() co
const SfxPoolItem* pItem;
sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ {
if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )))
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -674,6 +675,22 @@ sal_Bool ViewShell::IsAnyFieldInDoc() co
return sal_True;
}
}
+ }
+
+ nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INPUTFIELD );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ {
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n )))
+ {
+ const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
+ const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
+ if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
+ {
+ return sal_True;
+ }
+ }
+ }
+
return sal_False;
}
Modified: openoffice/branches/alg/aw080/main/sw/source/filter/ascii/ascatr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ascii/ascatr.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ascii/ascatr.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ascii/ascatr.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ascii/parasc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ascii/parasc.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ascii/parasc.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ascii/parasc.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/html/css1atr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/html/css1atr.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/html/css1atr.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/html/css1atr.cxx Wed Nov 27 17:25:40 2013
@@ -3758,7 +3758,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/branches/alg/aw080/main/sw/source/filter/html/htmlatr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/html/htmlatr.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/html/htmlatr.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/html/htmlatr.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/html/swhtml.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/html/swhtml.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/html/swhtml.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/html/swhtml.cxx Wed Nov 27 17:25:40 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
@@ -2777,6 +2773,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bC
}
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
{
sal_uInt16 nFldWhich =
pPostIts
Modified: openoffice/branches/alg/aw080/main/sw/source/filter/html/wrthtml.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/html/wrthtml.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/html/wrthtml.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/html/wrthtml.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx Wed Nov 27 17:25:40 2013
@@ -272,7 +272,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/branches/alg/aw080/main/sw/source/filter/ww1/fltshell.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww1/fltshell.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww1/fltshell.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww1/fltshell.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ww1/w1filter.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww1/w1filter.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww1/w1filter.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww1/w1filter.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ww8/attributeoutputbase.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/attributeoutputbase.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/attributeoutputbase.hxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/attributeoutputbase.hxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8esh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8esh.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8esh.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8esh.cxx Wed Nov 27 17:25:40 2013
@@ -563,11 +563,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 // ???
};
@@ -2105,7 +2104,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrame
{
const SvxShadowItem* pSI = (const SvxShadowItem*)pShadItem;
- const sal_uInt16 nCstScale = 635; // unit scale between SODC and MS Word
+ const sal_uInt16 nCstScale = 635; // unit scale between AOO and MS Word
const sal_uInt32 nShadowType = 131074; // shadow type of ms word. need to set the default value.
sal_uInt32 nColor = (sal_uInt32)(pSI->GetColor().GetColor()) ;
Modified: openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8nds.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8nds.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8nds.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8nds.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ww8/ww8atr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8atr.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8atr.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8atr.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par.cxx Wed Nov 27 17:25:40 2013
@@ -1091,6 +1091,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);
@@ -1332,6 +1334,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);
@@ -1451,6 +1459,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);
@@ -1788,10 +1797,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);
@@ -3886,26 +3898,6 @@ void wwSectionManager::SetUseOn(wwSectio
rSection.mpTitlePage->WriteUseOn(
(UseOnPage) (eUseBase | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE));
}
-
- if( nsUseOnPage::PD_MIRROR != (UseOnPage)(eUse & nsUseOnPage::PD_MIRROR) )
- {
- if( rSection.maSep.bkc == 3 )
- {
- if( rSection.mpPage )
- rSection.mpPage->SetUseOn( nsUseOnPage::PD_LEFT );
- if( rSection.mpTitlePage )
- rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_LEFT );
- }
- else if( rSection.maSep.bkc == 4 )
- {
- if( rSection.mpPage )
- rSection.mpPage->SetUseOn( nsUseOnPage::PD_RIGHT );
- if( rSection.mpTitlePage )
- rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_RIGHT );
- }
-
- }
-
}
//Set the page descriptor on this node, handle the different cases for a text
@@ -3985,17 +3977,17 @@ SwFmtPageDesc wwSectionManager::SetSwFmt
//Set page before hd/ft
const wwSection *pPrevious = 0;
- mySegIter aPrev = rIter;
- while( aPrev!= rStart )
- {
- aPrev--;
- pPrevious = &(*(aPrev));
- if( aPrev->IsContinous())
- continue;
- else{
- break;
- }
- }
+ mySegIter aPrev = rIter;
+ while( aPrev!= rStart )
+ {
+ aPrev--;
+ pPrevious = &(*(aPrev));
+ if( aPrev->IsContinous())
+ continue;
+ else{
+ break;
+ }
+ }
SetHdFt(*rIter, std::distance(rStart, rIter), pPrevious);
SetUseOn(*rIter);
@@ -4044,7 +4036,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/branches/alg/aw080/main/sw/source/filter/ww8/ww8par3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par3.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par3.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par3.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/filter/ww8/ww8par5.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par5.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par5.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/filter/ww8/ww8par5.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/ui/app/applab.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/app/applab.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/app/applab.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/app/applab.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/ui/app/docsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/app/docsh.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/app/docsh.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/app/docsh.cxx Wed Nov 27 17:25:40 2013
@@ -103,6 +103,9 @@
#include <unotools/fltrcfg.hxx>
#include <svtools/htmlcfg.hxx>
#include <sfx2/fcontnr.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <sfx2/viewfrm.hxx>
+//-----IAccessibility2 Implementation 2009
#include <sfx2/objface.hxx>
#include <comphelper/storagehelper.hxx>
@@ -399,6 +402,22 @@ sal_Bool SwDocShell::SaveAs( SfxMedium&
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
+ //IAccessibility2 Implementation 2009-----
+ pDoc->setDocAccTitle(String());
+ SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+ if (pFrame1)
+ {
+ Window* pWindow = &pFrame1->GetWindow();
+ if ( pWindow )
+ {
+ Window* pSysWin = pWindow->GetSystemWindow();
+ if ( pSysWin )
+ {
+ pSysWin->SetAccessibleName(String());
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
@@ -1264,6 +1283,43 @@ uno::Reference< frame::XController >
/* -----------------------------12.02.01 12:08--------------------------------
---------------------------------------------------------------------------*/
+//IAccessibility2 Implementation 2009-----
+void SwDocShell::setDocAccTitle( const String& rTitle )
+{
+ if (pDoc )
+ {
+ pDoc->setDocAccTitle( rTitle );
+ }
+}
+const String SwDocShell::getDocAccTitle() const
+{
+ String sRet;
+ if (pDoc)
+ {
+ sRet = pDoc->getDocAccTitle();
+ }
+
+ return sRet;
+}
+
+void SwDocShell::setDocReadOnly( sal_Bool bReadOnly)
+{
+ if (pDoc )
+ {
+ pDoc->setDocReadOnly( bReadOnly );
+ }
+}
+sal_Bool SwDocShell::getDocReadOnly() const
+{
+ if (pDoc)
+ {
+ return pDoc->getDocReadOnly();
+ }
+
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
+
static const char* s_EventNames[] =
{
"OnPageCountChange",
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/app/docst.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/app/docst.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/app/docst.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/app/docst.cxx Wed Nov 27 17:25:40 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/branches/alg/aw080/main/sw/source/ui/cctrl/actctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/actctrl.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/actctrl.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/actctrl.cxx Wed Nov 27 17:25:40 2013
@@ -105,8 +105,13 @@ void NoSpaceEdit::Modify()
SetText(sTemp);
SetSelection(aSel);
}
+//IAccessibility2 Impplementaton 2009-----
+ Edit::Modify();
+ /*
if(GetModifyHdl().IsSet())
GetModifyHdl().Call(this);
+ */
+//-----IAccessibility2 Impplementaton 2009
}
/* -----------------25.06.2003 15:57-----------------
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/swlbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/swlbox.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/swlbox.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/cctrl/swlbox.cxx Wed Nov 27 17:25:40 2013
@@ -223,5 +223,11 @@ String SwComboBox::GetText() const
return aTxt;
}
-
-
+//IAccessibility2 Impplementaton 2009-----
+void SwComboBox::SetText( const XubString& rStr )
+{
+ ComboBox::SetText(rStr);
+ // MT: CallEventListeners stay protected for now. Probably not needed at all, as the implementation of VCLXAccessibelEdit/ComboBox should do it on text changed nowadays anyway. Verify.
+ // CallEventListeners( VCLEVENT_EDIT_MODIFY );
+}
+//-----IAccessibility2 Impplementaton 2009
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/chrdlg/swuiccoll.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/chrdlg/swuiccoll.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/chrdlg/swuiccoll.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/chrdlg/swuiccoll.cxx Wed Nov 27 17:25:40 2013
@@ -127,12 +127,17 @@ SwCondCollPage::SwCondCollPage(Window *p
break;
}
- const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
- for( i = 0; i < rFilterList.Count(); ++i)
+//IAccessibility2 Impplementaton 2009-----
+ if( pFamilyItem )
{
- aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
- sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
- aFilterLB.SetEntryData(i, pFilter);
+ const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
+ for( i = 0; i < rFilterList.Count(); ++i)
+ {
+ aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
+ aFilterLB.SetEntryData(i, pFilter);
+ }
+//-----IAccessibility2 Impplementaton 2009
}
aFilterLB.SelectEntryPos(1);
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/dialog/uiregionsw.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/dialog/uiregionsw.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/dialog/uiregionsw.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/dialog/uiregionsw.cxx Wed Nov 27 17:25:40 2013
@@ -457,6 +457,9 @@ SwEditRegionDlg::SwEditRegionDlg( Window
aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
+//IAccessibility2 Impplementaton 2009-----
+ aTree.SetAllEntriesAccessibleRoleType(TREEBOX_ALLITEM_ACCROLE_TYPE_TREE);
+//-----IAccessibility2 Impplementaton 2009
}
/* -----------------------------26.04.01 14:56--------------------------------
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/docvw/SidebarTxtControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/SidebarTxtControl.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/SidebarTxtControl.hxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/SidebarTxtControl.hxx Wed Nov 27 17:25:40 2013
@@ -29,7 +29,7 @@
class OutlinerView;
class SwView;
class SwPostItMgr;
-class SpellCallbackInfo;
+struct SpellCallbackInfo;
namespace sw { namespace sidebarwindows {
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtdd.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtdd.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtdd.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtdd.cxx Wed Nov 27 17:25:40 2013
@@ -264,13 +264,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/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx Wed Nov 27 17:25:40 2013
@@ -82,6 +82,7 @@
#include <dselect.hxx>
#include <textsh.hxx>
#include <shdwcrsr.hxx>
+#include <txatbase.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
@@ -924,7 +925,7 @@ void SwEditWin::FlushInBuffer()
if(bLang)
{
SvxLanguageItem aLangItem( eBufferLanguage, nWhich );
- rSh.SetAttr( aLangItem );
+ rSh.SetAttrItem( aLangItem );
}
}
}
@@ -1372,8 +1373,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;
}
@@ -1491,9 +1492,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)
@@ -1778,7 +1778,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)
@@ -1814,8 +1815,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;
@@ -1926,6 +1932,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() )
@@ -1976,9 +1987,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() )
{
@@ -2094,9 +2111,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:
{
@@ -2739,12 +2762,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();
@@ -4165,7 +4182,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 )
{
@@ -4320,10 +4349,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);
@@ -4359,7 +4388,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);
@@ -5709,3 +5738,17 @@ Selection SwEditWin::GetSurroundingTextS
return Selection( nPos - nStartPos, nPos - nStartPos );
}
}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void SwEditWin::SwitchView()
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ rView.GetWrtShell().InvalidateAccessibleFocus();
+#endif
+}
+//-----IAccessibility2 Implementation 2009