diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-08-27 11:59:20 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-08-27 11:59:20 +0000 |
commit | 0eb8bee5c6032f0c39ea326edd2dee6122789547 (patch) | |
tree | e8b02145f1fd9a21e0e35876757b951aa955c0b9 | |
parent | adb9d96d3444b4f8531bdd56ff7d5afc5689be6e (diff) |
CWS-TOOLING: integrate CWS sw32a11y01
2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265
2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265
2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265
2009-08-26 13:43:33 +0200 hde r275421 : added new autotest
2009-08-26 13:36:28 +0200 hde r275420 : added new autotest
2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)>
- improve help tip for hyperlinks to cross-reference bookmarks.
2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)>
- no update of fly frame manager on dialog "Title and Description"
2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end
2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing
2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing
2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54)
2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning
2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)>
- do not delete cross-reference bookmark, if deletion occurs inside a certain node
2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..)
- no move of position for cross-reference bookmark, if move occurs inside certain node.
2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)>
- keep cross-reference bookmarks, if deletion occurs inside a certain node.
2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()>
- For outline and template entries create link to bookmark.
The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed
2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description
2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description
for Writer's text frames, graphics and embedded objects
2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for
text frames, graphics and embedded objects in Writer
- core, UNO-API, undo/redo and UI
2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents
2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description
42 files changed, 1369 insertions, 433 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 64c3c67bdc..d3bc388cd0 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -1258,6 +1258,10 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_IID_COLRIGHT (FN_FRAME + 17) #define FN_SET_FRM_ALT_NAME (FN_FRAME + 18) +// --> OD 2009-07-13 #i73249# +#define FN_UNO_TITLE (FN_FRAME + 19) +#define FN_UNO_DESCRIPTION (FN_FRAME + 20) +// <-- //Member-Ids fuer Fill/SetVariable an Items diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 4acb292213..19c36b1c91 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1091,7 +1091,12 @@ public: sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt, SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False ); - + // --> OD 2009-07-20 #i73249# + void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt, + const String& sNewTitle ); + void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt, + const String& sNewDescription ); + // <-- /** Footnotes */ diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 3340dc6527..7246077a6f 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -487,8 +487,8 @@ public: // <-- // detect highest and lowest level to check moving of outline levels void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower ); - - + + // get Outline level of current paragraph int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei @@ -622,9 +622,9 @@ public: const Graphic* pGraphic = 0, const GraphicObject* pGrafObj = 0 ); - // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen - const String& GetAlternateText() const; - void SetAlternateText( const String& rTxt ); +// // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen +// const String& GetAlternateText() const; +// void SetAlternateText( const String& rTxt ); //eindeutige Identifikation des Objektes (fuer ImageMapDlg) void *GetIMapInventor() const; @@ -753,7 +753,7 @@ public: ::com::sun::star::linguistic2::XSpellAlternatives > GetCorrection( const Point* pPt, SwRect& rSelectRect ); - + bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult, sal_Int32 /*out*/ &rErrorPosInText, sal_Int32 /*out*/ &rErrorIndexInResult, diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 5c9014a62e..9673b41855 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -353,6 +353,13 @@ public: const Graphic *GetGrfAtPos( const Point &rDocPos, String &rName, BOOL &rbLink ) const; + // --> OD 2009-07-13 #i73249# + const String GetObjTitle() const; + void SetObjTitle( const String& rTitle ); + const String GetObjDescription() const; + void SetObjDescription( const String& rDescription ); + // <-- + //SS fuer Rahmen -------------------------------------------- BOOL IsFrmSelected() const; diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index c416d691d7..12ef87e948 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -176,6 +176,15 @@ public: virtual BOOL GetInfo( SfxPoolItem& rInfo ) const; + // --> OD 2009-07-14 #i73249# + const String GetObjTitle() const; + void SetObjTitle( const String& rTitle, + bool bBroadcast = false ); + const String GetObjDescription() const; + void SetObjDescription( const String& rDescription, + bool bBroadcast = false ); + // <-- + /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657# OD 22.08.2002 - overloading virtual method and its default implementation, diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index c317539e2a..1ab379d15a 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -337,7 +337,8 @@ RES_MSG_BEGIN = RES_FMT_END, RES_GRAPHIC_SWAPIN, RES_FIELD_DELETED, RES_NAME_CHANGED, - RES_ALT_TEXT_CHANGED, + RES_TITLE_CHANGED, + RES_DESCRIPTION_CHANGED, RES_UNOCURSOR_LEAVES_SECTION, RES_LINKED_GRAPHIC_STREAM_ARRIVED, RES_MSG_END diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index 64bffaa2f7..4097627f91 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode friend class SwNodes; friend class SwNoTxtFrm; - String aAlternateText; // alternativer Text (HTML) +// String aAlternateText; // alternativer Text (HTML) PolyPolygon *pContour; // Polygon fuer Konturumlauf BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated @@ -75,9 +75,16 @@ public: virtual BOOL SavePersistentData(); virtual BOOL RestorePersistentData(); - // alternativen Text abfragen/setzen - const String& GetAlternateText() const { return aAlternateText; } - void SetAlternateText( const String& rTxt, sal_Bool bBroadcast=sal_False ); + const String GetTitle() const; + void SetTitle( const String& rTitle, + bool bBroadcast = false ); + const String GetDescription() const; + void SetDescription( const String& rDescription, + bool bBroadcast = false ); + +// const String GetAlternateText() const; +// void SetAlternateText( const String& rTxt, +// sal_Bool bBroadcast=sal_False ); void SetContour( const PolyPolygon *pPoly, BOOL bAutomatic = FALSE ); diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx index b32c9dd0fb..51eea3343d 100644 --- a/sw/inc/swundo.hxx +++ b/sw/inc/swundo.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -156,7 +156,11 @@ enum SwUndoId UNDO_ROW_DELETE, // 109 UNDO_RENAME_PAGEDESC, // 110 UNDO_NUMDOWN, // 111 - UNDO_STD_END= UNDO_NUMDOWN, + // --> OD 2009-07-16 #i73249# + UNDO_FLYFRMFMT_TITLE, // 112 + UNDO_FLYFRMFMT_DESCRIPTION, // 113 + // <-- + UNDO_STD_END= UNDO_FLYFRMFMT_DESCRIPTION, // UI undo ID's... UNDO_UI_REPLACE = UNDO_STD_END + 1, diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 526f288095..6e943d717a 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -203,7 +203,7 @@ enum SwPropNameIds /* 0161 */ UNO_NAME_PARA_BACK_TRANSPARENT, /* 0162 */ UNO_NAME_POSITION_END_OF_DOC, /* 0163 */ UNO_NAME_POSITION_PROTECTED, -/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT, +/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT, /* 0165 */ UNO_NAME_PRIMARY_KEY, /* 0166 */ UNO_NAME_PRINT_TABLES, /* 0167 */ UNO_NAME_PRINT_GRAPHICS, @@ -804,7 +804,10 @@ enum SwPropNameIds /* 0734 */ UNO_NAME_CHAR_OVERLINE_COLOR, /* 0735 */ UNO_NAME_CHAR_OVERLINE_HAS_COLOR, /* 0736 */ UNO_NAME_OUTLINE_LEVEL, //#outline level,add<-zhaojianwei outlinelevel -/* 0737 */ SW_PROPNAME_END +// --> OD 2009-07-13 #i73249# +/* 0737 */ UNO_NAME_DESCRIPTION, +// <-- +/* 0738 */ SW_PROPNAME_END }; diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi index 62e83bf22d..8081d8e043 100644 --- a/sw/sdi/_frmsh.sdi +++ b/sw/sdi/_frmsh.sdi @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -231,12 +231,12 @@ interface BaseTextFrame StateMethod = GetState ; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] - + FN_FORMAT_FOOTNOTE_DLG // status() [ ExecMethod = Execute; ] - + SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ? [ ExecMethod = Execute ; @@ -251,8 +251,16 @@ interface BaseTextFrame [ ExecMethod = Execute ; ] + // --> OD 2009-07-08 #i73249# + FN_TITLE_DESCRIPTION_SHAPE + [ + ExecMethod = Execute ; + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + // <-- + - /***************************************************** Abfragefunktionen fuer ImageMaps diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 76706019b3..4bb7c73362 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,6 +42,9 @@ #include <ndnotxt.hxx> #include <flyfrm.hxx> #include <cntfrm.hxx> +// --> OD 2009-07-14 #i73249# +#include <hints.hxx> +// <-- #include "accnotextframe.hxx" using namespace ::com::sun::star; @@ -67,13 +70,25 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame( sal_Int16 nInitRole, const SwFlyFrm* pFlyFrm ) : SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrm ), - aDepend( this, const_cast < SwNoTxtNode * >( GetNoTxtNode() ) ) + aDepend( this, const_cast < SwNoTxtNode * >( GetNoTxtNode() ) ), + msTitle(), + msDesc() { - const SwNoTxtNode *pNd = GetNoTxtNode(); + const SwNoTxtNode* pNd = GetNoTxtNode(); + // --> OD 2009-07-14 #i73249# + // consider new attributes Title and Description if( pNd ) - sDesc = OUString( pNd->GetAlternateText() ); - if( !sDesc.getLength() ) - sDesc = GetName(); + { + msTitle = pNd->GetTitle(); + + msDesc = pNd->GetDescription(); + if ( msDesc.getLength() == 0 && + msTitle != GetName() ) + { + msDesc = msTitle; + } + } + // <-- } SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame() @@ -82,36 +97,70 @@ SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame() void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) { - SwAccessibleFrameBase::Modify( pOld, pNew ); + const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; + // --> OD 2009-07-14 #i73249# + // suppress handling of RES_NAME_CHANGED in case that attribute Title is + // used as the accessible name. + if ( nWhich != RES_NAME_CHANGED || + msTitle.getLength() == 0 ) + { + SwAccessibleFrameBase::Modify( pOld, pNew ); + } - sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; const SwNoTxtNode *pNd = GetNoTxtNode(); ASSERT( pNd == aDepend.GetRegisteredIn(), "invalid frame" ); switch( nWhich ) { - case RES_NAME_CHANGED: - if( pNd->GetAlternateText().Len() ) - break; - case RES_ALT_TEXT_CHANGED: - if( pNd && GetFrm() ) + // --> OD 2009-07-14 #i73249# + case RES_TITLE_CHANGED: { - OUString sOldDesc( sDesc ); - - const String& rDesc = pNd->GetAlternateText(); - sDesc = rDesc; - if( !sDesc.getLength() ) - sDesc = GetName(); - - if( sDesc != sOldDesc ) + const String& sOldTitle( + dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() ); + const String& sNewTitle( + dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() ); + if ( sOldTitle == sNewTitle ) + { + break; + } + msTitle = sNewTitle; + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::NAME_CHANGED; + aEvent.OldValue <<= OUString( sOldTitle ); + aEvent.NewValue <<= msTitle; + FireAccessibleEvent( aEvent ); + + if ( pNd->GetDescription().Len() != 0 ) + { + break; + } + } + // intentional no break here + case RES_DESCRIPTION_CHANGED: + { + if ( pNd && GetFrm() ) { - AccessibleEventObject aEvent; - aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED; - aEvent.OldValue <<= sOldDesc; - aEvent.NewValue <<= sDesc; - FireAccessibleEvent( aEvent ); + const OUString sOldDesc( msDesc ); + + const String& rDesc = pNd->GetDescription(); + msDesc = rDesc; + if ( msDesc.getLength() == 0 && + msTitle != GetName() ) + { + msDesc = msTitle; + } + + if ( msDesc != sOldDesc ) + { + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED; + aEvent.OldValue <<= sOldDesc; + aEvent.NewValue <<= msDesc; + FireAccessibleEvent( aEvent ); + } } } break; + // <-- /* case RES_OBJECTDYING: if( aDepend.GetRegisteredIn() == @@ -138,6 +187,23 @@ void SwAccessibleNoTextFrame::Dispose( sal_Bool bRecursive ) SwAccessibleFrameBase::Dispose( bRecursive ); } +// --> OD 2009-07-14 #i73249# +OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleName (void) + throw (uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + CHECK_FOR_DEFUNC( XAccessibleContext ) + + if ( msTitle.getLength() != 0 ) + { + return msTitle; + } + + return SwAccessibleFrameBase::getAccessibleName(); +} +// <-- + OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void) throw (uno::RuntimeException) { @@ -145,7 +211,7 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void) CHECK_FOR_DEFUNC( XAccessibleContext ) - return sDesc; + return msDesc; } @@ -154,10 +220,10 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void) // XInterface // -uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aType ) - throw (uno::RuntimeException) +uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aType ) + throw (uno::RuntimeException) { - if( aType == + if( aType == ::getCppuType( static_cast<uno::Reference<XAccessibleImage>*>( NULL ) ) ) { uno::Reference<XAccessibleImage> xImage = this; @@ -193,19 +259,19 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleNoTextFrame::getTypes() throw(un // all releveant information is already accessible through other // methods. So we just delegate to those. -OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageDescription() +OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageDescription() throw ( uno::RuntimeException ) { return getAccessibleDescription(); } -sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageHeight( ) +sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageHeight( ) throw ( uno::RuntimeException ) { return getSize().Height; } -sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth( ) +sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth( ) throw ( uno::RuntimeException ) { return getSize().Width; diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx index 7d4d4f4e7b..203f135588 100644 --- a/sw/source/core/access/accnotextframe.hxx +++ b/sw/source/core/access/accnotextframe.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,10 @@ class SwAccessibleNoTextFrame : public SwAccessibleFrameBase, public ::com::sun::star::accessibility::XAccessibleImage { SwDepend aDepend; - ::rtl::OUString sDesc; + // --> OD 2009-07-14 #i73249# + ::rtl::OUString msTitle; + // <-- + ::rtl::OUString msDesc; protected: @@ -57,7 +60,14 @@ public: //===== XAccessibleContext ============================================== - /// Return this object's description. + // --> OD 2009-07-14 #i73249# + /// Return the object's current name. + virtual ::rtl::OUString SAL_CALL + getAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + // <-- + + /// Return this object's description. virtual ::rtl::OUString SAL_CALL getAccessibleDescription (void) throw (com::sun::star::uno::RuntimeException); diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index 66303ef027..d91a9ef514 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,6 +46,9 @@ #include <flyfrm.hxx> #include <accmap.hxx> #include <unotools/accessiblerelationsethelper.hxx> +// --> OD 2009-07-14 #i73249# +#include <hints.hxx> +// <-- #include "acctextframe.hxx" using namespace ::com::sun::star; @@ -61,8 +64,23 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleTex SwAccessibleTextFrame::SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm ) : - SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, pFlyFrm ) + SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, pFlyFrm ), + msTitle(), + msDesc() { + if ( pFlyFrm ) + { + const SwFlyFrmFmt* pFlyFrmFmt = + dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() ); + msTitle = pFlyFrmFmt->GetObjTitle(); + + msDesc = pFlyFrmFmt->GetObjDescription(); + if ( msDesc.getLength() == 0 && + msTitle != GetName() ) + { + msDesc = msTitle; + } + } } SwAccessibleTextFrame::~SwAccessibleTextFrame() @@ -71,32 +89,92 @@ SwAccessibleTextFrame::~SwAccessibleTextFrame() void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) { - sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; + const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; + // --> OD 2009-07-14 #i73249# + // suppress handling of RES_NAME_CHANGED in case that attribute Title is + // used as the accessible name. + if ( nWhich != RES_NAME_CHANGED || + msTitle.getLength() == 0 ) + { + SwAccessibleFrameBase::Modify( pOld, pNew ); + } + const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() ); switch( nWhich ) { - case RES_NAME_CHANGED: - if( pFlyFrm ) + // --> OD 2009-07-14 #i73249# + case RES_TITLE_CHANGED: { - OUString sOldDesc( GetName() ); - SwAccessibleFrameBase::Modify( pOld, pNew ); - - if( sOldDesc != GetName() ) + const String& sOldTitle( + dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() ); + const String& sNewTitle( + dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() ); + if ( sOldTitle == sNewTitle ) { - AccessibleEventObject aEvent; - aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED; - aEvent.OldValue <<= sOldDesc; - aEvent.NewValue <<= GetName(); - FireAccessibleEvent( aEvent ); + break; + } + msTitle = sNewTitle; + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::NAME_CHANGED; + aEvent.OldValue <<= OUString( sOldTitle ); + aEvent.NewValue <<= msTitle; + FireAccessibleEvent( aEvent ); + + const SwFlyFrmFmt* pFlyFrmFmt = + dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() ); + if ( pFlyFrmFmt->GetObjDescription().Len() != 0 ) + { + break; + } + } + // intentional no break here + case RES_DESCRIPTION_CHANGED: + { + if ( pFlyFrm ) + { + const OUString sOldDesc( msDesc ); + + const SwFlyFrmFmt* pFlyFrmFmt = + dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() ); + const String& rDesc = pFlyFrmFmt->GetObjDescription(); + msDesc = rDesc; + if ( msDesc.getLength() == 0 && + msTitle != GetName() ) + { + msDesc = msTitle; + } + + if ( msDesc != sOldDesc ) + { + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED; + aEvent.OldValue <<= sOldDesc; + aEvent.NewValue <<= msDesc; + FireAccessibleEvent( aEvent ); + } } } break; - default: - SwAccessibleFrameBase::Modify( pOld, pNew ); - break; + // <-- } } +// --> OD 2009-07-14 #i73249# +OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void) + throw (uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + CHECK_FOR_DEFUNC( XAccessibleContext ) + + if ( msTitle.getLength() != 0 ) + { + return msTitle; + } + + return SwAccessibleFrameBase::getAccessibleName(); +} +// <-- OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void) throw (uno::RuntimeException) { @@ -104,7 +182,7 @@ OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void) CHECK_FOR_DEFUNC( XAccessibleContext ) - return GetName(); + return msDesc; } @@ -134,7 +212,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleTextFrame::getSupportedServiceNam return aRet; } -uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId() +uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId() throw(uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx index 639a7f4bf3..27c84b3fdb 100644 --- a/sw/source/core/access/acctextframe.hxx +++ b/sw/source/core/access/acctextframe.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,6 +39,11 @@ namespace com { namespace star { class SwAccessibleTextFrame : public SwAccessibleFrameBase { +private: + // --> OD 2009-07-14 #i73249# + ::rtl::OUString msTitle; + ::rtl::OUString msDesc; + // <-- protected: @@ -53,7 +58,13 @@ public: //===== XAccessibleContext ============================================== - /// Return this object's description. + // --> OD 2009-07-14 #i73249# + /// Return the object's current name. + virtual ::rtl::OUString SAL_CALL + getAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + // <-- + /// Return this object's description. virtual ::rtl::OUString SAL_CALL getAccessibleDescription (void) throw (com::sun::star::uno::RuntimeException); diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index a71c246c16..836cbf0c37 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -114,8 +114,8 @@ namespace return pResult; } - // return a position at the begin of rEnd, if it is a CntntNode - // else set it to the begin of the Node after rEnd, if there is one + // return a position at the begin of rEnd, if it is a CntntNode + // else set it to the begin of the Node after rEnd, if there is one // else set it to the end of the node before rStt // else set it to the CntntNode of the Pos outside the Range static inline auto_ptr<SwPosition> lcl_FindExpelPosition(const SwNodeIndex& rStt, @@ -485,7 +485,7 @@ namespace sw { namespace mark // illegal selection? collapse the mark and restore sorting later isSortingNeeded |= lcl_FixCorrectedMark(bChangedPos, bChangedOPos, pMark); } - // restore sorting if needed + // restore sorting if needed if(isSortingNeeded) sortMarks(); #if FALSE @@ -525,7 +525,7 @@ namespace sw { namespace mark // illegal selection? collapse the mark and restore sorting later isSortingNeeded |= lcl_FixCorrectedMark(bChangedPos, bChangedOPos, pMark); } - // restore sorting if needed + // restore sorting if needed if(isSortingNeeded) sortMarks(); #if FALSE @@ -535,11 +535,11 @@ namespace sw { namespace mark } void MarkManager::deleteMarks( - const SwNodeIndex& rStt, - const SwNodeIndex& rEnd, - ::std::vector<SaveBookmark>* pSaveBkmk, - const SwIndex* pSttIdx, - const SwIndex* pEndIdx) + const SwNodeIndex& rStt, + const SwNodeIndex& rEnd, + ::std::vector<SaveBookmark>* pSaveBkmk, + const SwIndex* pSttIdx, + const SwIndex* pEndIdx ) { vector<const_iterator_t> vMarksToDelete; bool isSortingNeeded = false; @@ -561,7 +561,7 @@ namespace sw { namespace mark bool isOtherPosInRange = (pMark->IsExpanded() && lcl_GreaterThan(pMark->GetOtherMarkPos(), rStt, pSttIdx) && lcl_Lower(pMark->GetOtherMarkPos(), rEnd, pEndIdx)); - // special case: completely in range, touching the end? + // special case: completely in range, touching the end? if(pEndIdx && ((isOtherPosInRange && pMark->GetMarkPos().nNode == rEnd @@ -574,12 +574,29 @@ namespace sw { namespace mark isPosInRange = true, isOtherPosInRange = true; } - if(isPosInRange && isOtherPosInRange) + if(isPosInRange && (isOtherPosInRange || !pMark->IsExpanded())) { // completely in range - if(pSaveBkmk) - pSaveBkmk->push_back(SaveBookmark(true, true, *pMark, rStt, pSttIdx)); - vMarksToDelete.push_back(ppMark); + + // --> OD 2009-08-07 #i92125# + bool bKeepCrossRefBkmk( false ); + { + if ( rStt == rEnd && + ( IDocumentMarkAccess::GetType(*pMark) == + IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK || + IDocumentMarkAccess::GetType(*pMark) == + IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK ) ) + { + bKeepCrossRefBkmk = true; + } + } + if ( !bKeepCrossRefBkmk ) + { + if(pSaveBkmk) + pSaveBkmk->push_back(SaveBookmark(true, true, *pMark, rStt, pSttIdx)); + vMarksToDelete.push_back(ppMark); + } + // <-- } else if(isPosInRange ^ isOtherPosInRange) { @@ -596,24 +613,37 @@ namespace sw { namespace mark rEnd, isPosInRange ? pMark->GetOtherMarkPos() : pMark->GetMarkPos()); - if(isPosInRange) - pMark->SetMarkPos(*pNewPos); - else - pMark->SetOtherMarkPos(*pNewPos); + // --> OD 2009-08-06 #i92125# + // no move of position for cross-reference bookmarks, + // if move occurs inside a certain node + if ( ( IDocumentMarkAccess::GetType(*pMark) != + IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK && + IDocumentMarkAccess::GetType(*pMark) != + IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK ) || + pMark->GetMarkPos().nNode != pNewPos->nNode ) + { + if(isPosInRange) + pMark->SetMarkPos(*pNewPos); + else + pMark->SetOtherMarkPos(*pNewPos); - // illegal selection? collapse the mark and restore sorting later - isSortingNeeded |= lcl_FixCorrectedMark(isPosInRange, isOtherPosInRange, pMark); + // illegal selection? collapse the mark and restore sorting later + isSortingNeeded |= lcl_FixCorrectedMark(isPosInRange, isOtherPosInRange, pMark); + } + // <-- } } // we just remembered the iterators to delete, so we do not need to search // for the shared_ptr<> (the entry in m_vMarks) again // reverse iteration, since erasing an entry invalidates iterators - // behind it (the iterators in vMarksToDelete are sorted) + // behind it (the iterators in vMarksToDelete are sorted) for(vector<const_iterator_t>::reverse_iterator pppMark = vMarksToDelete.rbegin(); pppMark != vMarksToDelete.rend(); pppMark++) + { deleteMark(*pppMark); + } if(isSortingNeeded) sortMarks(); #if FALSE diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index ffe44a02c8..e73be29ff6 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,6 +68,10 @@ #include <fmtcnct.hxx> #include <dflyobj.hxx> +// --> OD 2009-07-20 #i73249# +#include <undoflystrattr.hxx> +// <-- + extern USHORT GetHtmlMode( const SwDocShell* ); @@ -469,6 +473,61 @@ BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet ) return aTmpSet.Count() || MAKEFRMS == nMakeFrms; } +// --> OD 2009-07-20 #i73249# +void SwDoc::SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt, + const String& sNewTitle ) +{ + if ( rFlyFrmFmt.GetObjTitle() == sNewTitle ) + { + return; + } + + const bool bFormerIsNoDrawUndoObj( IsNoDrawUndoObj() ); + SetNoDrawUndoObj( true ); + + if ( DoesUndo() ) + { + ClearRedo(); + AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt, + UNDO_FLYFRMFMT_TITLE, + rFlyFrmFmt.GetObjTitle(), + sNewTitle ) ); + } + + rFlyFrmFmt.SetObjTitle( sNewTitle, true ); + + SetNoDrawUndoObj( bFormerIsNoDrawUndoObj ); + + SetModified(); +} + +void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt, + const String& sNewDescription ) +{ + if ( rFlyFrmFmt.GetObjDescription() == sNewDescription ) + { + return; + } + + const bool bFormerIsNoDrawUndoObj( IsNoDrawUndoObj() ); + SetNoDrawUndoObj( true ); + + if ( DoesUndo() ) + { + ClearRedo(); + AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt, + UNDO_FLYFRMFMT_DESCRIPTION, + rFlyFrmFmt.GetObjDescription(), + sNewDescription ) ); + } + + rFlyFrmFmt.SetObjDescription( sNewDescription, true ); + + SetNoDrawUndoObj( bFormerIsNoDrawUndoObj ); + + SetModified(); +} +// <-- /*************************************************************************** * Methode : BOOL SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& ) diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 9624e817e0..67c6e6eb32 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -281,7 +281,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect ) const if ( pSh->GetWin() && !pSh->IsPreView() ) { const SwNoTxtNode* pNd = GetNode()->GetNoTxtNode(); - String aTxt( pNd->GetAlternateText() ); + String aTxt( pNd->GetTitle() ); if ( !aTxt.Len() && pNd->IsGrfNode() ) GetRealURL( *(SwGrfNode*)pNd, aTxt ); if( !aTxt.Len() ) @@ -906,7 +906,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons pGrfNd->TriggerAsyncRetrieveInputStream(); // <-- } - String aTxt( pGrfNd->GetAlternateText() ); + String aTxt( pGrfNd->GetTitle() ); if ( !aTxt.Len() ) GetRealURL( *pGrfNd, aTxt ); ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, FALSE ); @@ -971,7 +971,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons ((SwNoTxtFrm*)this)->nWeight = -1; String aText; if ( !nResId && - !(aText = pGrfNd->GetAlternateText()).Len() && + !(aText = pGrfNd->GetTitle()).Len() && (!GetRealURL( *pGrfNd, aText ) || !aText.Len())) { nResId = STR_COMCORE_READERROR; diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index b3e5fe72c1..4b94c1bf12 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,6 +48,10 @@ #include <istyleaccess.hxx> #include <SwStyleNameMapper.hxx> +// --> OD 2009-07-13 #i73249# +#include <frmfmt.hxx> +// <-- + SwNoTxtNode::SwNoTxtNode( const SwNodeIndex & rWhere, const BYTE nNdType, SwGrfFmtColl *pGrfColl, @@ -250,19 +254,57 @@ Graphic SwNoTxtNode::GetGraphic() const return aRet; } +// --> OD 2009-07-14 #i73249# +void SwNoTxtNode::SetTitle( const String& rTitle, bool bBroadcast ) +{ + // Title attribute of <SdrObject> replaces own AlternateText attribute + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(GetFlyFmt()); + ASSERT( pFlyFmt, + "<SwNoTxtNode::SetTitle(..)> - missing <SwFlyFrmFmt> instance" ); + if ( !pFlyFmt ) + { + return; + } -void SwNoTxtNode::SetAlternateText( const String& rTxt, sal_Bool bBroadcast ) + pFlyFmt->SetObjTitle( rTitle, bBroadcast ); +} + +const String SwNoTxtNode::GetTitle() const { - if( bBroadcast ) + const SwFlyFrmFmt* pFlyFmt = dynamic_cast<const SwFlyFrmFmt*>(GetFlyFmt()); + ASSERT( pFlyFmt, + "<SwNoTxtNode::GetTitle(..)> - missing <SwFlyFrmFmt> instance" ); + if ( !pFlyFmt ) { - SwStringMsgPoolItem aOld( RES_ALT_TEXT_CHANGED, aAlternateText ); - SwStringMsgPoolItem aNew( RES_ALT_TEXT_CHANGED, rTxt ); - aAlternateText = rTxt; - Modify( &aOld, &aNew ); + return aEmptyStr; } - else + + return pFlyFmt->GetObjTitle(); +} + +void SwNoTxtNode::SetDescription( const String& rDescription, bool bBroadcast ) +{ + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(GetFlyFmt()); + ASSERT( pFlyFmt, + "<SwNoTxtNode::SetDescription(..)> - missing <SwFlyFrmFmt> instance" ); + if ( !pFlyFmt ) { - aAlternateText = rTxt; + return; } + + pFlyFmt->SetObjDescription( rDescription, bBroadcast ); } +const String SwNoTxtNode::GetDescription() const +{ + const SwFlyFrmFmt* pFlyFmt = dynamic_cast<const SwFlyFrmFmt*>(GetFlyFmt()); + ASSERT( pFlyFmt, + "<SwNoTxtNode::GetDescription(..)> - missing <SwFlyFrmFmt> instance" ); + if ( !pFlyFmt ) + { + return aEmptyStr; + } + + return pFlyFmt->GetObjDescription(); +} +// <-- diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 9bed73cfda..bff28a1d29 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -383,27 +383,27 @@ void SwEditShell::GetGrfNms( String* pGrfName, String* pFltName, // alternativen Text abfragen/setzen -const String& SwEditShell::GetAlternateText() const -{ - SwPaM* pCrsr = GetCrsr(); - const SwNoTxtNode* pNd; - if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) ) - return pNd->GetAlternateText(); - - return aEmptyStr; -} - - -void SwEditShell::SetAlternateText( const String& rTxt ) -{ - SwPaM* pCrsr = GetCrsr(); - SwNoTxtNode* pNd; - if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) ) - { - pNd->SetAlternateText( rTxt, sal_True ); - GetDoc()->SetModified(); - } -} +//const String& SwEditShell::GetAlternateText() const +//{ +// SwPaM* pCrsr = GetCrsr(); +// const SwNoTxtNode* pNd; +// if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) ) +// return pNd->GetAlternateText(); + +// return aEmptyStr; +//} + + +//void SwEditShell::SetAlternateText( const String& rTxt ) +//{ +// SwPaM* pCrsr = GetCrsr(); +// SwNoTxtNode* pNd; +// if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) ) +// { +// pNd->SetAlternateText( rTxt, sal_True ); +// GetDoc()->SetModified(); +// } +//} const PolyPolygon *SwEditShell::GetGraphicPolygon() const diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index a1dc1d4de2..640a49f13d 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -2068,3 +2068,99 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt, EndAction(); } + +// --> OD 2009-07-13 #i73249# +const String SwFEShell::GetObjTitle() const +{ + String aTitle; + + if ( Imp()->HasDrawView() ) + { + const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList(); + if ( pMrkList->GetMarkCount() == 1 ) + { + const SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); + const SwFrmFmt* pFmt = FindFrmFmt( pObj ); + if ( pFmt->Which() == RES_FLYFRMFMT ) + { + aTitle = dynamic_cast<const SwFlyFrmFmt*>(pFmt)->GetObjTitle(); + } + else + { + aTitle = pObj->GetTitle(); + } + } + } + + return aTitle; +} + +void SwFEShell::SetObjTitle( const String& rTitle ) +{ + if ( Imp()->HasDrawView() ) + { + const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList(); + if ( pMrkList->GetMarkCount() == 1 ) + { + SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); + SwFrmFmt* pFmt = FindFrmFmt( pObj ); + if ( pFmt->Which() == RES_FLYFRMFMT ) + { + GetDoc()->SetFlyFrmTitle( *(dynamic_cast<SwFlyFrmFmt*>(pFmt)), + rTitle ); + } + else + { + pObj->SetTitle( rTitle ); + } + } + } +} + +const String SwFEShell::GetObjDescription() const +{ + String aDescription; + + if ( Imp()->HasDrawView() ) + { + const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList(); + if ( pMrkList->GetMarkCount() == 1 ) + { + const SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); + const SwFrmFmt* pFmt = FindFrmFmt( pObj ); + if ( pFmt->Which() == RES_FLYFRMFMT ) + { + aDescription = dynamic_cast<const SwFlyFrmFmt*>(pFmt)->GetObjDescription(); + } + else + { + aDescription = pObj->GetDescription(); + } + } + } + + return aDescription; +} + +void SwFEShell::SetObjDescription( const String& rDescription ) +{ + if ( Imp()->HasDrawView() ) + { + const SdrMarkList *pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList(); + if ( pMrkList->GetMarkCount() == 1 ) + { + SdrObject* pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); + SwFrmFmt* pFmt = FindFrmFmt( pObj ); + if ( pFmt->Which() == RES_FLYFRMFMT ) + { + GetDoc()->SetFlyFrmDescription( *(dynamic_cast<SwFlyFrmFmt*>(pFmt)), + rDescription ); + } + else + { + pObj->SetDescription( rDescription ); + } + } + } +} +// <-- diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 6041de45eb..6626da2420 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -956,7 +956,8 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const SwGrfNode* pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx, sFile, sFilter, &aTmpGrf, pColl, (SwAttrSet*)GetpSwAttrSet() ); - pGrfNd->SetAlternateText( GetAlternateText() ); + pGrfNd->SetTitle( GetTitle() ); + pGrfNd->SetDescription( GetDescription() ); pGrfNd->SetContour( HasContour(), HasAutomaticContour() ); return pGrfNd; } diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx new file mode 100644 index 0000000000..86bffc64bd --- /dev/null +++ b/sw/source/core/inc/undoflystrattr.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SwUndoPageDesc.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _UNDO_FLY_STR_ATTR_HXX +#define _UNDO_FLY_STR_ATTR_HXX + +#include <undobj.hxx> +#include <swundo.hxx> + +class SwFlyFrmFmt; +class String; + +class SwUndoFlyStrAttr : public SwUndo +{ + public: + SwUndoFlyStrAttr( SwFlyFrmFmt& rFlyFrmFmt, + const SwUndoId eUndoId, + const String& sOldStr, + const String& sNewStr ); + virtual ~SwUndoFlyStrAttr(); + + virtual void Undo( SwUndoIter & rIt ); + virtual void Redo( SwUndoIter & rIt ); + virtual void Repeat( SwUndoIter & rIt ); + + virtual SwRewriter GetRewriter() const; + + private: + SwFlyFrmFmt& mrFlyFrmFmt; + const String msOldStr; + const String msNewStr; +}; + +#endif // _UNDO_FLY_STR_ATTR_HXX diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index ec5e3f36b8..e327b0bbdf 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -2880,6 +2880,80 @@ sal_Bool SwFlyFrmFmt::GetInfo( SfxPoolItem& rInfo ) const return sal_True; } +// --> OD 2009-07-14 #i73249# +void SwFlyFrmFmt::SetObjTitle( const String& rTitle, bool bBroadcast ) +{ + SdrObject* pMasterObject = FindSdrObject(); + ASSERT( pMasterObject, + "<SwNoTxtNode::SetObjTitle(..)> - missing <SdrObject> instance" ); + if ( !pMasterObject ) + { + return; + } + + if( bBroadcast ) + { + SwStringMsgPoolItem aOld( RES_TITLE_CHANGED, pMasterObject->GetTitle() ); + SwStringMsgPoolItem aNew( RES_TITLE_CHANGED, rTitle ); + pMasterObject->SetTitle( rTitle ); + Modify( &aOld, &aNew ); + } + else + { + pMasterObject->SetTitle( rTitle ); + } +} + +const String SwFlyFrmFmt::GetObjTitle() const +{ + const SdrObject* pMasterObject = FindSdrObject(); + ASSERT( pMasterObject, + "<SwFlyFrmFmt::GetObjTitle(..)> - missing <SdrObject> instance" ); + if ( !pMasterObject ) + { + return aEmptyStr; + } + + return pMasterObject->GetTitle(); +} + +void SwFlyFrmFmt::SetObjDescription( const String& rDescription, bool bBroadcast ) +{ + SdrObject* pMasterObject = FindSdrObject(); + ASSERT( pMasterObject, + "<SwFlyFrmFmt::SetDescription(..)> - missing <SdrObject> instance" ); + if ( !pMasterObject ) + { + return; + } + + if( bBroadcast ) + { + SwStringMsgPoolItem aOld( RES_DESCRIPTION_CHANGED, pMasterObject->GetDescription() ); + SwStringMsgPoolItem aNew( RES_DESCRIPTION_CHANGED, rDescription ); + pMasterObject->SetDescription( rDescription ); + Modify( &aOld, &aNew ); + } + else + { + pMasterObject->SetDescription( rDescription ); + } +} + +const String SwFlyFrmFmt::GetObjDescription() const +{ + const SdrObject* pMasterObject = FindSdrObject(); + ASSERT( pMasterObject, + "<SwNoTxtNode::GetDescription(..)> - missing <SdrObject> instance" ); + if ( !pMasterObject ) + { + return aEmptyStr; + } + + return pMasterObject->GetDescription(); +} +// <-- + /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657# OD 22.08.2002 - overloading virtual method and its default implementation, diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 2afc408a68..3ed18d128b 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -467,7 +467,8 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const (SwAttrSet*)GetpSwAttrSet() ); pOLENd->SetChartTblName( GetChartTblName() ); - pOLENd->SetAlternateText( GetAlternateText() ); + pOLENd->SetTitle( GetTitle() ); + pOLENd->SetDescription( GetDescription() ); pOLENd->SetContour( HasContour(), HasAutomaticContour() ); pOLENd->SetAspect( GetAspect() ); // the replacement image must be already copied diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 617c764dca..d6241c775f 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -698,7 +698,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) const SwNoTxtFrm* pNoTxtFrm = static_cast<const SwNoTxtFrm*>(pFly->Lower()); const SwNoTxtNode* pNoTxtNode = static_cast<const SwNoTxtNode*>(pNoTxtFrm->GetNode()); - const String aAlternateTxt( pNoTxtNode->GetAlternateText() ); + const String aAlternateTxt( pNoTxtNode->GetTitle() ); mpPDFExtOutDevData->SetAlternateText( aAlternateTxt ); } } diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index e713bc3748..eb709362b9 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -718,40 +718,49 @@ String SwTOXPara::GetURL() const { const SwTxtNode * pTxtNd = static_cast<const SwTxtNode *>(pNd); - //if( MAXLEVEL >= pTxtNd->GetTxtColl()->GetOutlineLevel()) //#outline level,zhaojianwei - if ( pTxtNd->GetAttrOutlineLevel() > 0) //<-end,zhaojianwei - { - aTxt = '#'; - const SwNumRule * pRule = pTxtNd->GetNumRule(); - if( pRule ) - { - // dann noch die rel. Nummer davor setzen - const USHORT nCurrLevel = static_cast<USHORT>(pTxtNd->GetActualListLevel()); - if(nCurrLevel <= MAXLEVEL) - { - // --> OD 2005-11-02 #i51089 - TUNING# - if ( pTxtNd->GetNum() ) - { - SwNumberTree::tNumberVector aNumVector = - pTxtNd->GetNumberVector(); - - for( USHORT n = 0; n <= nCurrLevel; ++n ) - { - int nNum = aNumVector[ n ]; - nNum -= ( pRule->Get( n ).GetStart() - 1 ); - ( aTxt += String::CreateFromInt32( nNum )) += '.'; - } - } - else - { - ASSERT( false, - "<SwTOXPara::GetURL()> - text node with numbering rule, but without number. This is a serious defect -> inform OD" ); - } - } - } - aTxt += pTxtNd->GetExpandTxt(); - ( aTxt += cMarkSeperator ).AppendAscii( pMarkToOutline ); - } + // --> OD 2009-08-05 #i103265# +// //if( MAXLEVEL >= pTxtNd->GetTxtColl()->GetOutlineLevel()) //#outline level,zhaojianwei +// if ( pTxtNd->GetAttrOutlineLevel() > 0) //<-end,zhaojianwei +// { +// aTxt = '#'; +// const SwNumRule * pRule = pTxtNd->GetNumRule(); +// if( pRule ) +// { +// // dann noch die rel. Nummer davor setzen +// const USHORT nCurrLevel = static_cast<USHORT>(pTxtNd->GetActualListLevel()); +// if(nCurrLevel <= MAXLEVEL) +// { +// // --> OD 2005-11-02 #i51089 - TUNING# +// if ( pTxtNd->GetNum() ) +// { +// SwNumberTree::tNumberVector aNumVector = +// pTxtNd->GetNumberVector(); + +// for( USHORT n = 0; n <= nCurrLevel; ++n ) +// { +// int nNum = aNumVector[ n ]; +// nNum -= ( pRule->Get( n ).GetStart() - 1 ); +// ( aTxt += String::CreateFromInt32( nNum )) += '.'; +// } +// } +// else +// { +// ASSERT( false, +// "<SwTOXPara::GetURL()> - text node with numbering rule, but without number. This is a serious defect -> inform OD" ); +// } +// } +// } +// aTxt += pTxtNd->GetExpandTxt(); +// ( aTxt += cMarkSeperator ).AppendAscii( pMarkToOutline ); +// } + SwDoc* pDoc = const_cast<SwDoc*>( pTxtNd->GetDoc() ); + ::sw::mark::IMark const * const pMark = pDoc->getIDocumentMarkAccess()->getMarkForTxtNode( + *(pTxtNd), + IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK); + aTxt = '#'; + const String aMarkName( pMark->GetName() ); + aTxt += aMarkName; + // <-- } break; @@ -943,4 +952,3 @@ BOOL SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase) } return bRet; } - diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk index 12665cf26d..4c7a332eec 100644 --- a/sw/source/core/undo/makefile.mk +++ b/sw/source/core/undo/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -68,6 +68,7 @@ SLOFILES = \ $(SLO)$/undel.obj \ $(SLO)$/undobj.obj \ $(SLO)$/undobj1.obj \ + $(SLO)$/undoflystrattr.obj \ $(SLO)$/undraw.obj \ $(SLO)$/unfmco.obj \ $(SLO)$/unins.obj \ diff --git a/sw/source/core/undo/undo.hrc b/sw/source/core/undo/undo.hrc index 03900f4c24..2b96ba202a 100644 --- a/sw/source/core/undo/undo.hrc +++ b/sw/source/core/undo/undo.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -126,14 +126,14 @@ #define STR_UNDO_SETFLYFRMFMT (CORE_REPEAT_END +39) #define STR_UNDO_SETRUBYATTR (CORE_REPEAT_END +40) // #102505# -#define STR_UNDO_TMPAUTOCORR (CORE_REPEAT_END +41) +#define STR_UNDO_TMPAUTOCORR (CORE_REPEAT_END +41) #define STR_TOXCHANGE (CORE_REPEAT_END +42) #define STR_UNDO_PAGEDESC_CREATE (CORE_REPEAT_END +43) #define STR_UNDO_PAGEDESC (CORE_REPEAT_END +44) #define STR_UNDO_PAGEDESC_DELETE (CORE_REPEAT_END +45) -#define STR_UNDO_HEADER_FOOTER (CORE_REPEAT_END +46) // #i7983# -#define STR_UNDO_FIELD (CORE_REPEAT_END +47) // #111840# +#define STR_UNDO_HEADER_FOOTER (CORE_REPEAT_END +46) // #i7983# +#define STR_UNDO_FIELD (CORE_REPEAT_END +47) // #111840# #define STR_UNDO_TXTFMTCOL_CREATE (CORE_REPEAT_END +48) #define STR_UNDO_TXTFMTCOL_DELETE (CORE_REPEAT_END +49) #define STR_UNDO_TXTFMTCOL_RENAME (CORE_REPEAT_END +50) @@ -153,9 +153,11 @@ #define STR_UNDO_ROW_DELETE (CORE_REPEAT_END +64) #define STR_UNDO_PAGEDESC_RENAME (CORE_REPEAT_END +65) #define STR_NUMDOWN (CORE_REPEAT_END +66) +#define STR_UNDO_FLYFRMFMT_TITLE (CORE_REPEAT_END +67) +#define STR_UNDO_FLYFRMFMT_DESCRITPTION (CORE_REPEAT_END +68) // !!!!!! umsetzen !!!!!!!!!!! umsetzen !!!!!!!!!!! umsetzen !!!! -#define CORE_UNDO_END STR_NUMDOWN// !!!! umsetzen !!! +#define CORE_UNDO_END STR_UNDO_FLYFRMFMT_DESCRITPTION// !!!! umsetzen !!! // UI-Undo Klammerungen #define UI_UNDO_BEGIN (CORE_UNDO_END + 1) diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src index ed3b75e7c8..6437d9f603 100644 --- a/sw/source/core/undo/undo.src +++ b/sw/source/core/undo/undo.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -650,3 +650,11 @@ String STR_PARAGRAPH_UNDO { Text[ en-US ] = "paragraph"; }; +String STR_UNDO_FLYFRMFMT_TITLE +{ + Text[ en-US ] = "Change object title of $1"; +}; +String STR_UNDO_FLYFRMFMT_DESCRITPTION +{ + Text[ en-US ] = "Change object description of $1"; +}; diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index e17dbe12e0..7e61652d71 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -734,28 +734,43 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, } else { - bool bMaybe = false; - if( *pStt <= pBkmk->GetMarkPos() && pBkmk->GetMarkPos() <= *pEnd ) + // --> OD 2009-08-06 #i92125# + bool bKeepCrossRefBkmk( false ); { - if( pBkmk->GetMarkPos() == *pEnd || - ( *pStt == pBkmk->GetMarkPos() && pBkmk->IsExpanded() ) ) - bMaybe = true; - else - bSavePos = true; + if ( rMark.nNode == rPoint.nNode && + ( IDocumentMarkAccess::GetType(*pBkmk) == + IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK || + IDocumentMarkAccess::GetType(*pBkmk) == + IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK ) ) + { + bKeepCrossRefBkmk = true; + } } - if( pBkmk->IsExpanded() && - *pStt <= pBkmk->GetOtherMarkPos() && pBkmk->GetOtherMarkPos() <= *pEnd ) + if ( !bKeepCrossRefBkmk ) { - if( bSavePos || bSaveOtherPos || - ( pBkmk->GetOtherMarkPos() < *pEnd && pBkmk->GetOtherMarkPos() > *pStt ) ) + bool bMaybe = false; + if ( *pStt <= pBkmk->GetMarkPos() && pBkmk->GetMarkPos() <= *pEnd ) { - if( bMaybe ) + if( pBkmk->GetMarkPos() == *pEnd || + ( *pStt == pBkmk->GetMarkPos() && pBkmk->IsExpanded() ) ) + bMaybe = true; + else bSavePos = true; - bSaveOtherPos = true; + } + if( pBkmk->IsExpanded() && + *pStt <= pBkmk->GetOtherMarkPos() && pBkmk->GetOtherMarkPos() <= *pEnd ) + { + if( bSavePos || bSaveOtherPos || + ( pBkmk->GetOtherMarkPos() < *pEnd && pBkmk->GetOtherMarkPos() > *pStt ) ) + { + if( bMaybe ) + bSavePos = true; + bSaveOtherPos = true; + } } } - // delete cross-reference bookmark at <pStt>, if only part of - // <pEnd> text node content is deleted. + // <-- + // --> OD 2007-10-17 #i81002# const bool bDifferentTxtNodesAtMarkAndPoint( rMark.nNode != rPoint.nNode && @@ -765,6 +780,8 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, if( !bSavePos && !bSaveOtherPos && bDifferentTxtNodesAtMarkAndPoint && dynamic_cast< const ::sw::mark::CrossRefBookmark* >(pBkmk)) { + // delete cross-reference bookmark at <pStt>, if only part of + // <pEnd> text node content is deleted. if( pStt->nNode == pBkmk->GetMarkPos().nNode && pEnd->nContent.GetIndex() != pEnd->nNode.GetNode().GetTxtNode()->Len() ) @@ -788,8 +805,8 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, pHistory = new SwHistory; pHistory->Add( *pBkmk, bSavePos, bSaveOtherPos ); - if(bSavePos && - (bSaveOtherPos || !pBkmk->IsExpanded())) + if(bSavePos && + (bSaveOtherPos || !pBkmk->IsExpanded())) { pMarkAccess->deleteMark(pMarkAccess->getMarksBegin()+n); n--; diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx new file mode 100644 index 0000000000..767f300a53 --- /dev/null +++ b/sw/source/core/undo/undoflystrattr.cxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SwUndoPageDesc.cxx,v $ + * $Revision: 1.12 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sw.hxx" + +#include <undoflystrattr.hxx> +#include <frmfmt.hxx> + +SwUndoFlyStrAttr::SwUndoFlyStrAttr( SwFlyFrmFmt& rFlyFrmFmt, + const SwUndoId eUndoId, + const String& sOldStr, + const String& sNewStr ) + : SwUndo( eUndoId ), + mrFlyFrmFmt( rFlyFrmFmt ), + msOldStr( sOldStr ), + msNewStr( sNewStr ) +{ + ASSERT( eUndoId == UNDO_FLYFRMFMT_TITLE || + eUndoId == UNDO_FLYFRMFMT_DESCRIPTION, + "<SwUndoFlyStrAttr::SwUndoFlyStrAttr(..)> - unexpected undo id --> Undo will not work" ); +} + +SwUndoFlyStrAttr::~SwUndoFlyStrAttr() +{ +} + +void SwUndoFlyStrAttr::Undo( SwUndoIter& ) +{ + switch ( GetId() ) + { + case UNDO_FLYFRMFMT_TITLE: + { + mrFlyFrmFmt.SetObjTitle( msOldStr, true ); + } + break; + case UNDO_FLYFRMFMT_DESCRIPTION: + { + mrFlyFrmFmt.SetObjDescription( msOldStr, true ); + } + break; + default: + { + } + } +} + +void SwUndoFlyStrAttr::Redo( SwUndoIter& ) +{ + switch ( GetId() ) + { + case UNDO_FLYFRMFMT_TITLE: + { + mrFlyFrmFmt.SetObjTitle( msNewStr, true ); + } + break; + case UNDO_FLYFRMFMT_DESCRIPTION: + { + mrFlyFrmFmt.SetObjDescription( msNewStr, true ); + } + break; + default: + { + } + } +} + +void SwUndoFlyStrAttr::Repeat( SwUndoIter& ) +{ + // no repeat +} + +SwRewriter SwUndoFlyStrAttr::GetRewriter() const +{ + SwRewriter aResult; + + aResult.AddRule( UNDO_ARG1, mrFlyFrmFmt.GetName() ); + + return aResult; +} diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 91b0993895..a519b9503e 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1082,18 +1082,48 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: } } } - else if( FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID && eType != FLYCNTTYPE_FRM ) + // --> OD 2009-07-13 #i73249# + // Attribute AlternativeText was never published. + // Now it has been replaced by Attribute Title - valid for all <SwXFrame> instances +// else if( FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID && eType != FLYCNTTYPE_FRM ) +// { +// const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); +// if(pIdx) +// { +// SwNodeIndex aIdx(*pIdx, 1); +// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); +// OUString uTemp; +// aValue >>= uTemp; +// pNoTxt->SetAlternateText(uTemp); +// } +// } + // New attribute Title + else if( FN_UNO_TITLE == pEntry->nWID ) { - const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); - if(pIdx) - { - SwNodeIndex aIdx(*pIdx, 1); - SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); - OUString uTemp; - aValue >>= uTemp; - pNoTxt->SetAlternateText(uTemp); - } + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt); + ASSERT( pFmt, + "unexpected type of <pFmt> --> crash" ); + OUString uTemp; + aValue >>= uTemp; + const String sTitle(uTemp); + // assure that <SdrObject> instance exists. + GetOrCreateSdrObject( pFlyFmt ); + pFlyFmt->GetDoc()->SetFlyFrmTitle( *(pFlyFmt), sTitle ); } + // New attribute Description + else if( FN_UNO_DESCRIPTION == pEntry->nWID ) + { + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt); + ASSERT( pFmt, + "unexpected type of <pFmt> --> crash" ); + OUString uTemp; + aValue >>= uTemp; + const String sDescription(uTemp); + // assure that <SdrObject> instance exists. + GetOrCreateSdrObject( pFlyFmt ); + pFlyFmt->GetDoc()->SetFlyFrmDescription( *(pFlyFmt), sDescription ); + } + // <-- else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID) { SwFrmFmt *pFrmFmt = lcl_GetFrmFmt( aValue, pFmt->GetDoc() ); @@ -1232,7 +1262,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: bApply = true; } } - else + else { uno::Reference< graphic::XGraphic > xGraphic; aValue >>= xGraphic; @@ -1562,17 +1592,40 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) { aAny <<= OUString(SwStyleNameMapper::GetProgName(pFmt->DerivedFrom()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ) ); } - else if(eType != FLYCNTTYPE_FRM && - FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID) + // --> OD 2009-07-13 #i73249# + // Attribute AlternativeText was never published. + // Now it has been replaced by Attribute Title - valid for all <SwXFrame> instances +// else if(eType != FLYCNTTYPE_FRM && +// FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID) +// { +// const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); +// if(pIdx) +// { +// SwNodeIndex aIdx(*pIdx, 1); +// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); +// aAny <<= OUString(pNoTxt->GetAlternateText()); +// } +// } + else if( FN_UNO_TITLE == pEntry->nWID ) { - const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); - if(pIdx) - { - SwNodeIndex aIdx(*pIdx, 1); - SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); - aAny <<= OUString(pNoTxt->GetAlternateText()); - } + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt); + ASSERT( pFmt, + "unexpected type of <pFmt> --> crash" ); + // assure that <SdrObject> instance exists. + GetOrCreateSdrObject( pFlyFmt ); + aAny <<= OUString(pFlyFmt->GetObjTitle()); + } + // New attribute Description + else if( FN_UNO_DESCRIPTION == pEntry->nWID ) + { + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt); + ASSERT( pFmt, + "unexpected type of <pFmt> --> crash" ); + // assure that <SdrObject> instance exists. + GetOrCreateSdrObject( pFlyFmt ); + aAny <<= OUString(pFlyFmt->GetObjDescription()); } + // <-- else if(eType == FLYCNTTYPE_GRF && (rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_ACTUAL_SIZE)))) { @@ -1828,16 +1881,40 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) } } } - else if( eType != FLYCNTTYPE_FRM && FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID ) + // --> OD 2009-07-13 #i73249# + // Attribute AlternativeText was never published. + // Now it has been replaced by Attribute Title - valid for all <SwXFrame> instances +// else if( eType != FLYCNTTYPE_FRM && FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID ) +// { +// const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); +// if(pIdx) +// { +// SwNodeIndex aIdx(*pIdx, 1); +// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); +// pNoTxt->SetAlternateText(aEmptyStr); +// } +// } + // New attribute Title + else if( FN_UNO_TITLE == pEntry->nWID ) { - const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); - if(pIdx) - { - SwNodeIndex aIdx(*pIdx, 1); - SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); - pNoTxt->SetAlternateText(aEmptyStr); - } + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt); + ASSERT( pFmt, + "unexpected type of <pFmt> --> crash" ); + // assure that <SdrObject> instance exists. + GetOrCreateSdrObject( pFlyFmt ); + pFlyFmt->GetDoc()->SetFlyFrmTitle( *(pFlyFmt), aEmptyStr ); } + // New attribute Description + else if( FN_UNO_DESCRIPTION == pEntry->nWID ) + { + SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt); + ASSERT( pFmt, + "unexpected type of <pFmt> --> crash" ); + // assure that <SdrObject> instance exists. + GetOrCreateSdrObject( pFlyFmt ); + pFlyFmt->GetDoc()->SetFlyFrmDescription( *(pFlyFmt), aEmptyStr ); + } + // <-- else { SwDoc* pDoc = pFmt->GetDoc(); @@ -2194,9 +2271,9 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan const ::uno::Any* pAutoContour; if(pProps->GetProperty(FN_UNO_IS_AUTOMATIC_CONTOUR, 0, pAutoContour)) setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_AUTOMATIC_CONTOUR)), *pAutoContour); - const ::uno::Any* pAltText; - if(pProps->GetProperty(FN_UNO_ALTERNATIVE_TEXT, 0, pAltText)) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ALTERNATIVE_TEXT)), *pAltText); +// const ::uno::Any* pAltText; +// if(pProps->GetProperty(FN_UNO_ALTERNATIVE_TEXT, 0, pAltText)) +// setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ALTERNATIVE_TEXT)), *pAltText); } else { @@ -2305,6 +2382,20 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan const ::uno::Any* pReplacement; if( pProps->GetProperty(FN_UNO_REPLACEMENT_GRAPHIC, 0, pReplacement) ) setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_GRAPHIC)), *pReplacement); + // --> OD 2009-07-13 #i73249# + // new attribute Title + const ::uno::Any* pTitle; + if ( pProps->GetProperty(FN_UNO_TITLE, 0, pTitle) ) + { + setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_TITLE)), *pTitle); + } + // new attribute Description + const ::uno::Any* pDescription; + if ( pProps->GetProperty(FN_UNO_DESCRIPTION, 0, pDescription) ) + { + setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_DESCRIPTION)), *pDescription); + } + // <-- } else throw lang::IllegalArgumentException(); diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 7088f7e5b2..a707da9679 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -164,7 +164,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider() { SW_PROP_NMID(UNO_NAME_PARA_IS_NUMBERING_RESTART), FN_NUMBER_NEWSTART, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0 }, \ { SW_PROP_NMID(UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE), FN_UNO_PARA_CONT_PREV_SUBTREE, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0 }, \ { SW_PROP_NMID(UNO_NAME_PARA_LIST_LABEL_STRING), FN_UNO_PARA_NUM_STRING, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::READONLY, 0 }, \ - { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, //#outline level, zhaojianwei + { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, //#outline level, zhaojianwei #define COMMON_HYPERLINK_PROPERTIES \ { SW_PROP_NMID(UNO_NAME_HYPER_LINK_U_R_L), RES_TXTATR_INETFMT, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID ,MID_URL_URL}, \ @@ -309,6 +309,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider() // OD 18.09.2003 #i18732# - add property // OD 2004-05-05 #i28701# - add property 'WrapInfluenceOnObjPos' +// OD 2009-07-13 #i73249# - add properties 'Title' and 'Description' #define COMMON_FRAME_PROPERTIES \ { SW_PROP_NMID(UNO_NAME_ANCHOR_PAGE_NO), RES_ANCHOR, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_ANCHOR_PAGENUM }, \ { SW_PROP_NMID(UNO_NAME_ANCHOR_TYPE), RES_ANCHOR, CPPU_E2T(CPPUTYPE_TXTCNTANCHOR), PROPERTY_NONE, MID_ANCHOR_ANCHORTYPE}, \ @@ -369,6 +370,8 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider() { SW_PROP_NMID(UNO_NAME_Z_ORDER), FN_UNO_Z_ORDER, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0}, \ { SW_PROP_NMID(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, \ { SW_PROP_NMID(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE, MID_WRAP_INFLUENCE}, \ + { SW_PROP_NMID(UNO_NAME_TITLE), FN_UNO_TITLE, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, \ + { SW_PROP_NMID(UNO_NAME_DESCRIPTION), FN_UNO_DESCRIPTION, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, \ { SW_PROP_NMID(UNO_NAME_LAYOUT_SIZE), WID_LAYOUT_SIZE, CPPU_E2T(CPPUTYPE_AWTSIZE), PropertyAttribute::MAYBEVOID | PropertyAttribute::READONLY, 0 }, @@ -487,7 +490,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider() { SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0 },\ { SW_PROP_NMID(UNO_NAME_PARA_IS_CONNECT_BORDER), RES_PARATR_CONNECT_BORDER, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0},\ { SW_PROP_NMID(UNO_NAME_SNAP_TO_GRID), RES_PARATR_SNAPTOGRID, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0 }, \ - { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, + { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, #define COMMON_FLDTYP_PROPERTIES \ @@ -1123,7 +1126,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { SW_PROP_NMID(UNO_NAME_GRAPHIC_FILTER), FN_UNO_GRAPHIC_FILTER, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0 }, { SW_PROP_NMID(UNO_NAME_GRAPHIC), FN_UNO_GRAPHIC, CPPU_E2T(CPPUTYPE_REFXGRAPHIC), 0, 0 }, { SW_PROP_NMID(UNO_NAME_ACTUAL_SIZE), FN_UNO_ACTUAL_SIZE, CPPU_E2T(CPPUTYPE_AWTSIZE), PropertyAttribute::READONLY, CONVERT_TWIPS}, - { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT), FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 }, +// { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT), FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 }, { SW_PROP_NMID(UNO_NAME_CONTOUR_POLY_POLYGON), FN_PARAM_COUNTOUR_PP, CPPU_E2T(CPPUTYPE_PNTSEQSEQ), PropertyAttribute::MAYBEVOID, 0 }, { SW_PROP_NMID(UNO_NAME_IS_PIXEL_CONTOUR), FN_UNO_IS_PIXEL_CONTOUR, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0 }, { SW_PROP_NMID(UNO_NAME_IS_AUTOMATIC_CONTOUR), FN_UNO_IS_AUTOMATIC_CONTOUR , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0 }, @@ -1158,7 +1161,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { SW_PROP_NMID(UNO_NAME_GRAPHIC_URL), FN_UNO_REPLACEMENT_GRAPHIC_URL, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, 0 }, { SW_PROP_NMID(UNO_NAME_GRAPHIC), FN_UNO_REPLACEMENT_GRAPHIC, CPPU_E2T(CPPUTYPE_REFXGRAPHIC), PropertyAttribute::MAYBEVOID, 0 }, { SW_PROP_NMID(UNO_NAME_COMPONENT),FN_UNO_COMPONENT, CPPU_E2T(CPPUTYPE_REFCOMPONENT), PropertyAttribute::READONLY, 0}, - { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT), FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 }, +// { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT), FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 }, {0,0,0,0,0,0} }; aMapEntriesArr[nPropertyId] = aEmbeddedPropertyMap_Impl; @@ -2513,583 +2516,583 @@ const SfxItemPropertySet* SwUnoPropertyMapProvider::GetPropertySet( sal_uInt16 switch( nPropertyId ) { case PROPERTY_MAP_TEXT_CURSOR: - { + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_CURSOR(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_CURSOR; } break; - case PROPERTY_MAP_CHAR_STYLE: - { + case PROPERTY_MAP_CHAR_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_CHAR_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_CHAR_STYLE; } break; - case PROPERTY_MAP_PARA_STYLE: - { + case PROPERTY_MAP_PARA_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_PARA_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_PARA_STYLE; } break; - case PROPERTY_MAP_FRAME_STYLE: - { + case PROPERTY_MAP_FRAME_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_FRAME_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FRAME_STYLE; } break; case PROPERTY_MAP_PAGE_STYLE: - { + { static SfxItemPropertySet aPROPERTY_MAP_PAGE_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_PAGE_STYLE; } break; case PROPERTY_MAP_NUM_STYLE: - { + { static SfxItemPropertySet aPROPERTY_MAP_NUM_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_NUM_STYLE; } break; case PROPERTY_MAP_SECTION: - { + { static SfxItemPropertySet aPROPERTY_MAP_SECTION(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_SECTION; } break; - case PROPERTY_MAP_TEXT_TABLE: - { + case PROPERTY_MAP_TEXT_TABLE: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_TABLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_TABLE; } break; - case PROPERTY_MAP_TABLE_CELL: - { + case PROPERTY_MAP_TABLE_CELL: + { static SfxItemPropertySet aPROPERTY_MAP_TABLE_CELL(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TABLE_CELL; } break; - case PROPERTY_MAP_TABLE_RANGE: - { + case PROPERTY_MAP_TABLE_RANGE: + { static SfxItemPropertySet aPROPERTY_MAP_TABLE_RANGE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TABLE_RANGE; } break; - case PROPERTY_MAP_TEXT_SEARCH: - { + case PROPERTY_MAP_TEXT_SEARCH: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_SEARCH(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_SEARCH; } break; - case PROPERTY_MAP_TEXT_FRAME: - { + case PROPERTY_MAP_TEXT_FRAME: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_FRAME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_FRAME; } break; - case PROPERTY_MAP_TEXT_GRAPHIC: - { + case PROPERTY_MAP_TEXT_GRAPHIC: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_GRAPHIC(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_GRAPHIC; } break; - case PROPERTY_MAP_TEXT_SHAPE: - { + case PROPERTY_MAP_TEXT_SHAPE: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_SHAPE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_SHAPE; } break; - case PROPERTY_MAP_INDEX_USER: - { + case PROPERTY_MAP_INDEX_USER: + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_USER(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_USER; } break; - case PROPERTY_MAP_INDEX_CNTNT: - { + case PROPERTY_MAP_INDEX_CNTNT: + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_CNTNT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_CNTNT; } break; case PROPERTY_MAP_INDEX_IDX: - { + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_IDX(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_IDX; } break; case PROPERTY_MAP_USER_MARK: - { + { static SfxItemPropertySet aPROPERTY_MAP_USER_MARK(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_USER_MARK; } break; - case PROPERTY_MAP_CNTIDX_MARK: - { + case PROPERTY_MAP_CNTIDX_MARK: + { static SfxItemPropertySet aPROPERTY_MAP_CNTIDX_MARK(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_CNTIDX_MARK; } break; - case PROPERTY_MAP_INDEX_MARK: - { + case PROPERTY_MAP_INDEX_MARK: + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_MARK(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_MARK; } break; case PROPERTY_MAP_TEXT_TABLE_ROW: - { + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_TABLE_ROW(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_TABLE_ROW; } break; - case PROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR: - { + case PROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR; } break; - case PROPERTY_MAP_TEXT_TABLE_CURSOR: - { + case PROPERTY_MAP_TEXT_TABLE_CURSOR: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_TABLE_CURSOR(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_TABLE_CURSOR; } break; - case PROPERTY_MAP_BOOKMARK: - { + case PROPERTY_MAP_BOOKMARK: + { static SfxItemPropertySet aPROPERTY_MAP_BOOKMARK(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_BOOKMARK; } break; - case PROPERTY_MAP_PARAGRAPH_EXTENSIONS: - { + case PROPERTY_MAP_PARAGRAPH_EXTENSIONS: + { static SfxItemPropertySet aPROPERTY_MAP_PARAGRAPH_EXTENSIONS(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_PARAGRAPH_EXTENSIONS; } break; - case PROPERTY_MAP_INDEX_ILLUSTRATIONS: - { + case PROPERTY_MAP_INDEX_ILLUSTRATIONS: + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_ILLUSTRATIONS(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_ILLUSTRATIONS; } break; - case PROPERTY_MAP_INDEX_OBJECTS: - { + case PROPERTY_MAP_INDEX_OBJECTS: + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_OBJECTS(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_OBJECTS; } break; case PROPERTY_MAP_INDEX_TABLES: - { + { static SfxItemPropertySet aPROPERTY_MAP_INDEX_TABLES(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_INDEX_TABLES; } break; case PROPERTY_MAP_BIBLIOGRAPHY : - { + { static SfxItemPropertySet aPROPERTY_MAP_BIBLIOGRAPHY(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_BIBLIOGRAPHY; } break; case PROPERTY_MAP_TEXT_DOCUMENT: - { + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_DOCUMENT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_DOCUMENT; } break; case PROPERTY_MAP_LINK_TARGET : - { + { static SfxItemPropertySet aPROPERTY_MAP_LINK_TARGET(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_LINK_TARGET; } break; case PROPERTY_MAP_AUTO_TEXT_GROUP : - { + { static SfxItemPropertySet aPROPERTY_MAP_AUTO_TEXT_GROUP(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_AUTO_TEXT_GROUP; } break; case PROPERTY_MAP_TEXTPORTION_EXTENSIONS : - { + { static SfxItemPropertySet aPROPERTY_MAP_TEXTPORTION_EXTENSIONS(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXTPORTION_EXTENSIONS; } break; case PROPERTY_MAP_FOOTNOTE : - { + { static SfxItemPropertySet aPROPERTY_MAP_FOOTNOTE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FOOTNOTE; } break; case PROPERTY_MAP_TEXT_COLUMS : - { + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_COLUMS(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_COLUMS; } break; case PROPERTY_MAP_PARAGRAPH : - { + { static SfxItemPropertySet aPROPERTY_MAP_PARAGRAPH(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_PARAGRAPH; } break; case PROPERTY_MAP_EMBEDDED_OBJECT : - { + { static SfxItemPropertySet aPROPERTY_MAP_EMBEDDED_OBJECT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_EMBEDDED_OBJECT; } break; case PROPERTY_MAP_REDLINE : - { + { static SfxItemPropertySet aPROPERTY_MAP_REDLINE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_REDLINE; } break; case PROPERTY_MAP_TEXT_DEFAULT : - { + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_DEFAULT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_DEFAULT; } break; - case PROPERTY_MAP_FLDTYP_DATETIME: - { + case PROPERTY_MAP_FLDTYP_DATETIME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DATETIME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DATETIME; } break; - case PROPERTY_MAP_FLDTYP_USER: - { + case PROPERTY_MAP_FLDTYP_USER: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_USER(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_USER; } break; - case PROPERTY_MAP_FLDTYP_SET_EXP: - { + case PROPERTY_MAP_FLDTYP_SET_EXP: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_SET_EXP(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_SET_EXP; } break; - case PROPERTY_MAP_FLDTYP_GET_EXP: - { + case PROPERTY_MAP_FLDTYP_GET_EXP: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_GET_EXP(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_GET_EXP; } break; - case PROPERTY_MAP_FLDTYP_FILE_NAME: - { + case PROPERTY_MAP_FLDTYP_FILE_NAME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_FILE_NAME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_FILE_NAME; } break; - case PROPERTY_MAP_FLDTYP_PAGE_NUM: - { + case PROPERTY_MAP_FLDTYP_PAGE_NUM: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_PAGE_NUM(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_PAGE_NUM; } break; - case PROPERTY_MAP_FLDTYP_AUTHOR: - { + case PROPERTY_MAP_FLDTYP_AUTHOR: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_AUTHOR(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_AUTHOR; } break; - case PROPERTY_MAP_FLDTYP_CHAPTER: - { + case PROPERTY_MAP_FLDTYP_CHAPTER: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_CHAPTER(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_CHAPTER; } break; - case PROPERTY_MAP_FLDTYP_GET_REFERENCE: - { + case PROPERTY_MAP_FLDTYP_GET_REFERENCE: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_GET_REFERENCE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_GET_REFERENCE; } break; case PROPERTY_MAP_FLDTYP_CONDITIONED_TEXT: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_CONDITIONED_TEXT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_CONDITIONED_TEXT; } break; - case PROPERTY_MAP_FLDTYP_HIDDEN_TEXT: - { + case PROPERTY_MAP_FLDTYP_HIDDEN_TEXT: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_HIDDEN_TEXT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_HIDDEN_TEXT; } break; - case PROPERTY_MAP_FLDTYP_ANNOTATION : - { + case PROPERTY_MAP_FLDTYP_ANNOTATION : + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_ANNOTATION(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_ANNOTATION; } break; - case PROPERTY_MAP_FLDTYP_INPUT: - { + case PROPERTY_MAP_FLDTYP_INPUT: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_INPUT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_INPUT; } break; - case PROPERTY_MAP_FLDTYP_MACRO: - { + case PROPERTY_MAP_FLDTYP_MACRO: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_MACRO(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_MACRO; } break; - case PROPERTY_MAP_FLDTYP_DDE: - { + case PROPERTY_MAP_FLDTYP_DDE: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DDE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DDE; } break; - case PROPERTY_MAP_FLDTYP_HIDDEN_PARA: - { + case PROPERTY_MAP_FLDTYP_HIDDEN_PARA: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_HIDDEN_PARA(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_HIDDEN_PARA; } break; - case PROPERTY_MAP_FLDTYP_DOC_INFO : - { + case PROPERTY_MAP_FLDTYP_DOC_INFO : + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOC_INFO(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOC_INFO; } break; - case PROPERTY_MAP_FLDTYP_TEMPLATE_NAME: - { + case PROPERTY_MAP_FLDTYP_TEMPLATE_NAME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_TEMPLATE_NAME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_TEMPLATE_NAME; } break; - case PROPERTY_MAP_FLDTYP_USER_EXT : - { + case PROPERTY_MAP_FLDTYP_USER_EXT : + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_USER_EXT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_USER_EXT; } break; - case PROPERTY_MAP_FLDTYP_REF_PAGE_SET: - { + case PROPERTY_MAP_FLDTYP_REF_PAGE_SET: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_REF_PAGE_SET(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_REF_PAGE_SET; } break; - case PROPERTY_MAP_FLDTYP_REF_PAGE_GET: - { + case PROPERTY_MAP_FLDTYP_REF_PAGE_GET: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_REF_PAGE_GET(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_REF_PAGE_GET; } break; - case PROPERTY_MAP_FLDTYP_JUMP_EDIT: - { + case PROPERTY_MAP_FLDTYP_JUMP_EDIT: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_JUMP_EDIT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_JUMP_EDIT; } break; - case PROPERTY_MAP_FLDTYP_SCRIPT: - { + case PROPERTY_MAP_FLDTYP_SCRIPT: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_SCRIPT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_SCRIPT; } break; case PROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET; } break; case PROPERTY_MAP_FLDTYP_DATABASE_NUM_SET: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DATABASE_NUM_SET(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DATABASE_NUM_SET; } break; case PROPERTY_MAP_FLDTYP_DATABASE_SET_NUM: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DATABASE_SET_NUM(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DATABASE_SET_NUM; } break; case PROPERTY_MAP_FLDTYP_DATABASE: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DATABASE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DATABASE; } break; case PROPERTY_MAP_FLDTYP_DATABASE_NAME: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DATABASE_NAME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DATABASE_NAME; } break; case PROPERTY_MAP_FLDTYP_DOCSTAT: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCSTAT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCSTAT; } break; case PROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR: - { + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME: - { + case PROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME: - { + case PROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME: - { + case PROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME: - { + case PROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_MISC : - { + case PROPERTY_MAP_FLDTYP_DOCINFO_MISC : + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_MISC(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_MISC; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_REVISION: - { + case PROPERTY_MAP_FLDTYP_DOCINFO_REVISION: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_REVISION(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_REVISION; } break; - case PROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS: - { + case PROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS; } break; - case PROPERTY_MAP_FLDTYP_DUMMY_0: - { + case PROPERTY_MAP_FLDTYP_DUMMY_0: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DUMMY_0(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DUMMY_0; } break; - case PROPERTY_MAP_FLDTYP_TABLE_FORMULA: - { + case PROPERTY_MAP_FLDTYP_TABLE_FORMULA: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_TABLE_FORMULA(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_TABLE_FORMULA; } break; - case PROPERTY_MAP_FLDMSTR_USER: - { + case PROPERTY_MAP_FLDMSTR_USER: + { static SfxItemPropertySet aPROPERTY_MAP_FLDMSTR_USER(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDMSTR_USER; } break; - case PROPERTY_MAP_FLDMSTR_DDE: - { + case PROPERTY_MAP_FLDMSTR_DDE: + { static SfxItemPropertySet aPROPERTY_MAP_FLDMSTR_DDE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDMSTR_DDE; } break; - case PROPERTY_MAP_FLDMSTR_SET_EXP: - { + case PROPERTY_MAP_FLDMSTR_SET_EXP: + { static SfxItemPropertySet aPROPERTY_MAP_FLDMSTR_SET_EXP(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDMSTR_SET_EXP; } break; - case PROPERTY_MAP_FLDMSTR_DATABASE: - { + case PROPERTY_MAP_FLDMSTR_DATABASE: + { static SfxItemPropertySet aPROPERTY_MAP_FLDMSTR_DATABASE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDMSTR_DATABASE; } break; - case PROPERTY_MAP_FLDMSTR_DUMMY0: - { + case PROPERTY_MAP_FLDMSTR_DUMMY0: + { static SfxItemPropertySet aPROPERTY_MAP_FLDMSTR_DUMMY0(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDMSTR_DUMMY0; } break; - case PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY: - { + case PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_BIBLIOGRAPHY(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_BIBLIOGRAPHY; } break; - case PROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY: - { + case PROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY: + { static SfxItemPropertySet aPROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY; } break; - case PROPERTY_MAP_TEXT: - { + case PROPERTY_MAP_TEXT: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT; } break; - case PROPERTY_MAP_REDLINE_PORTION: - { + case PROPERTY_MAP_REDLINE_PORTION: + { static SfxItemPropertySet aPROPERTY_MAP_REDLINE_PORTION(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_REDLINE_PORTION; } break; - case PROPERTY_MAP_MAILMERGE: - { + case PROPERTY_MAP_MAILMERGE: + { static SfxItemPropertySet aPROPERTY_MAP_MAILMERGE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_MAILMERGE; } break; - case PROPERTY_MAP_FLDTYP_DROPDOWN: - { + case PROPERTY_MAP_FLDTYP_DROPDOWN: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DROPDOWN(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DROPDOWN; } break; - case PROPERTY_MAP_CHART2_DATA_SEQUENCE: - { + case PROPERTY_MAP_CHART2_DATA_SEQUENCE: + { static SfxItemPropertySet aPROPERTY_MAP_CHART2_DATA_SEQUENCE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_CHART2_DATA_SEQUENCE; } break; - case PROPERTY_MAP_TEXT_VIEW: - { + case PROPERTY_MAP_TEXT_VIEW: + { static SfxItemPropertySet aPROPERTY_MAP_TEXT_VIEW(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_TEXT_VIEW; } break; - case PROPERTY_MAP_CONDITIONAL_PARA_STYLE: - { + case PROPERTY_MAP_CONDITIONAL_PARA_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_CONDITIONAL_PARA_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_CONDITIONAL_PARA_STYLE; } break; - case PROPERTY_MAP_CHAR_AUTO_STYLE: - { + case PROPERTY_MAP_CHAR_AUTO_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_CHAR_AUTO_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_CHAR_AUTO_STYLE; } break; - case PROPERTY_MAP_RUBY_AUTO_STYLE: - { + case PROPERTY_MAP_RUBY_AUTO_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_RUBY_AUTO_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_RUBY_AUTO_STYLE; } break; - case PROPERTY_MAP_PARA_AUTO_STYLE: - { + case PROPERTY_MAP_PARA_AUTO_STYLE: + { static SfxItemPropertySet aPROPERTY_MAP_PARA_AUTO_STYLE(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_PARA_AUTO_STYLE; } break; - case PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM: - { + case PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM: + { static SfxItemPropertySet aPROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM(pEntries); aPropertySetArr[nPropertyId] = &aPROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM; } break; - } - } + } + } return aPropertySetArr[nPropertyId]; } diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index fa5712a8d4..d8ff216755 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -778,7 +778,8 @@ const SwPropNameTab aPropNameTab = { /* 0733 CHAR_OVERLINE */ {MAP_CHAR_LEN("CharOverline")}, /* 0734 CHAR_OVERLINE_COLOR */ {MAP_CHAR_LEN("CharOverlineColor")}, /* 0735 CHAR_OVERLINE_HAS_COLOR */ {MAP_CHAR_LEN("CharOverlineHasColor")}, -/* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")}//#outline level,add<-zhaojianwei Outlinelevel +/* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")},//#outline level,add<-zhaojianwei Outlinelevel +/* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")} }; const SwPropNameLen& SwGetPropName( USHORT nId ) diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index f830276c77..880009e3a9 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -1640,7 +1640,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt, ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) nFrmFlags |= HTML_FRMOPTS_IMG_CSS1; - OutHTML_Image( rWrt, rFrmFmt, aGrfNm, pGrfNd->GetAlternateText(), + OutHTML_Image( rWrt, rFrmFmt, aGrfNm, pGrfNd->GetTitle(), pGrfNd->GetTwipSize(), nFrmFlags, pMarkToGraphic ); return rWrt; diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 5049afacd4..ae6500e7d6 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -743,7 +743,7 @@ IMAGE_SETEVENT: } if( sAltNm.Len() ) - pGrfNd->SetAlternateText( sAltNm ); + pGrfNd->SetTitle( sAltNm ); if( bSetTwipSize ) pGrfNd->SetTwipSize( aGrfSz ); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 235c50e3aa..27852b37ab 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -491,7 +491,7 @@ void SwHTMLParser::InsertEmbed() SwNoTxtNode *pNoTxtNd = pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetAlternateText( aAlt ); + pNoTxtNd->SetTitle( aAlt ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren if( !bHidden ) @@ -665,7 +665,7 @@ void SwHTMLParser::EndObject() SwNoTxtNode *pNoTxtNd = pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetAlternateText( pAppletImpl->GetAltText() ); + pNoTxtNd->SetTitle( pAppletImpl->GetAltText() ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren RegisterFlyFrm( pFlyFmt ); @@ -798,7 +798,7 @@ void SwHTMLParser::EndApplet() SwNoTxtNode *pNoTxtNd = pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetAlternateText( pAppletImpl->GetAltText() ); + pNoTxtNd->SetTitle( pAppletImpl->GetAltText() ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren RegisterFlyFrm( pFlyFmt ); @@ -975,7 +975,7 @@ void SwHTMLParser::InsertFloatingFrame() SwNoTxtNode *pNoTxtNd = pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetAlternateText( aAlt ); + pNoTxtNd->SetTitle( aAlt ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren RegisterFlyFrm( pFlyFmt ); @@ -1254,7 +1254,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // ALT, WIDTH, HEIGHT, HSPACE, VSPACE, ALIGN if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed ) nFrmOpts |= HTML_FRMOPTS_OLE_CSS1; - rHTMLWrt.OutFrmFmtOptions( rFrmFmt, pOLENd->GetAlternateText(), + rHTMLWrt.OutFrmFmtOptions( rFrmFmt, pOLENd->GetTitle(), aEndTags, nFrmOpts ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed ) rHTMLWrt.OutCSS1_FrmFmtOptions( rFrmFmt, nFrmOpts ); @@ -1398,7 +1398,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, ULONG nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR : HTML_FRMOPTS_GENIMG; OutHTML_Image( rWrt, rFrmFmt, aGrfNm, - pOLENd->GetAlternateText(), pOLENd->GetTwipSize(), + pOLENd->GetTitle(), pOLENd->GetTwipSize(), nFlags, pMarkToOLE ); } diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 7ea9b69c3f..254cae1f7f 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -289,7 +289,7 @@ void lcl_addOutplaceProperties( { MapMode aMode( MAP_100TH_MM ); // the API expects this map mode for the embedded objects Size aSize = rObj.GetSize( &aMode ); // get the size in the requested map mode - + if( aSize.Width() && aSize.Height() ) { Any aAny; @@ -464,8 +464,6 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( aAny = rPropSet->getPropertyValue( sFrameStyleName ); aAny >>= sStyle; } - // svg:desc - exportAlternativeText( rPropSet, rPropSetInfo ); const XMLPropertyState *aStates[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; switch( nType ) @@ -766,6 +764,8 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( // Lastly the stuff common to each of Applet/Plugin/Floating Frame exportEvents( rPropSet ); - exportAlternativeText( rPropSet, rPropSetInfo ); + // --> OD 2009-07-22 #i73249# + exportTitleAndDescription( rPropSet, rPropSetInfo ); + // <-- exportContour( rPropSet, rPropSetInfo ); } diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index 82051f4a91..33368585df 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -956,6 +956,10 @@ Menu MN_GRF_POPUPMENU { MN_ALIGN_FRAME MN_MOUSE_FRAME_WITH_CONTOUR + // --> OD 2009-07-14 #i73249# + SEPARATOR ; + MN_TITLE_DESCRIPTION_SHAPE + // <-- SEPARATOR ; MenuItem { @@ -989,6 +993,10 @@ Menu MN_OLE_POPUPMENU { MN_ALIGN_FRAME MN_MOUSE_FRAME_WITH_CONTOUR + // --> OD 2009-07-14 #i73249# + SEPARATOR ; + MN_TITLE_DESCRIPTION_SHAPE + // <-- SEPARATOR ; MenuItem { @@ -1013,6 +1021,10 @@ Menu MN_FRM_POPUPMENU { MN_ALIGN_FRAME MN_MOUSE_FRAME_WITHOUT_CONTOUR + // --> OD 2009-07-07 #i73249# + SEPARATOR ; + MN_TITLE_DESCRIPTION_SHAPE + // <-- SEPARATOR ; MN_FRM MN_FRM_CAPTION_ITEM diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 1b9aecd3ce..b277c13949 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -94,6 +94,11 @@ #include <PostItMgr.hxx> #include <fmtfld.hxx> +// --> OD 2009-08-18 #i104300# +#include <IDocumentMarkAccess.hxx> +#include <ndtxt.hxx> +// <-- + /*-------------------------------------------------------------------- Beschreibung: KeyEvents --------------------------------------------------------------------*/ @@ -205,6 +210,38 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) sSuffix.EqualsAscii( pMarkToOLE )) sTxt = sTxt.Copy( 0, nFound - 1); } + // --> OD 2009-08-18 #i104300# + // 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 ) + { + SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode(); + if ( pTxtNode ) + { + sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true ); + + if( sTxt.Len() ) + { + 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# BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 9b1c2bb95d..57f2babbfb 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,6 +50,10 @@ #include <sfx2/request.hxx> #include <sfx2/objface.hxx> #include <svx/hlnkitem.hxx> +// --> OD 2009-07-07 #i73249# +#include <svx/svdview.hxx> +#include <vcl/msgbox.hxx> +// <-- #include <fmturl.hxx> @@ -82,6 +86,9 @@ #include <shells.hrc> #include "swabstdlg.hxx" #include "misc.hrc" +// --> OD 2009-07-14 #i73249# +#include <svx/dialogs.hrc> +// <-- using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -414,8 +421,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) } aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); - if(nSel & nsSelectionType::SEL_OLE) - aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText())); + if( nSel & nsSelectionType::SEL_OLE ) + { + // --> OD 2009-07-13 #i73249# +// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText())); + aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) ); + // <-- + } const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE); SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); @@ -472,7 +484,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) } if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem)) { - rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue()); + // --> OD 2009-07-13 #i73249# +// rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue()); + rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue()); + // <-- } // Vorlagen-AutoUpdate SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); @@ -587,6 +602,40 @@ void SwFrameShell::Execute(SfxRequest &rReq) rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror)); } break; + // --> OD 2009-07-14 #i73249# + case FN_TITLE_DESCRIPTION_SHAPE: + { + bUpdateMgr = FALSE; + SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); + if ( pSdrView && + pSdrView->GetMarkedObjectCount() == 1 ) + { + String aDescription(rSh.GetObjDescription()); + String aTitle(rSh.GetObjTitle()); + + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + OSL_ENSURE(pFact, "Dialogdiet fail!"); + AbstractSvxObjectTitleDescDialog* pDlg = + pFact->CreateSvxObjectTitleDescDialog( NULL, + aTitle, + aDescription, + RID_SVXDLG_OBJECT_TITLE_DESC ); + OSL_ENSURE(pDlg, "Dialogdiet fail!"); + + if ( pDlg->Execute() == RET_OK ) + { + pDlg->GetDescription(aDescription); + pDlg->GetTitle(aTitle); + + rSh.SetObjDescription(aDescription); + rSh.SetObjTitle(aTitle); + } + + delete pDlg; + } + } + break; + // <-- default: ASSERT( !this, "falscher Dispatcher" ); return; @@ -822,6 +871,20 @@ void SwFrameShell::GetState(SfxItemSet& rSet) rSet.DisableItem( nWhich ); } break; + // --> OD 2009-07-07 #i73249# + case FN_TITLE_DESCRIPTION_SHAPE: + { + SwWrtShell &rWrtSh = GetShell(); + SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList(); + if ( !pSdrView || + pSdrView->GetMarkedObjectCount() != 1 ) + { + rSet.DisableItem( nWhich ); + } + + } + break; + // <-- default: /* do nothing */; break; diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 8616e718e1..e0e5ec9178 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -154,8 +154,13 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put( aFrmSize ); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); - if(nSlot == FN_FORMAT_GRAFIC_DLG) - aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText())); + if ( nSlot == FN_FORMAT_GRAFIC_DLG ) + { + // --> OD 2009-07-13 #i73249# +// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText())); + aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) ); + // <-- + } pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT); aFrmSize.SetWidth( pRect->Width() ); @@ -324,10 +329,15 @@ void SwGrfShell::Execute(SfxRequest &rReq) sFilterNm, 0 ); } } - if( SFX_ITEM_SET == pSet->GetItemState( + if ( SFX_ITEM_SET == pSet->GetItemState( FN_SET_FRM_ALT_NAME, TRUE, &pItem )) - rSh.SetAlternateText( - ((const SfxStringItem*)pItem)->GetValue() ); + { + // --> OD 2009-07-13 #i73249# +// rSh.SetAlternateText( +// ((const SfxStringItem*)pItem)->GetValue() ); + rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() ); + // <-- + } SfxItemSet aGrfSet( rSh.GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1 ); |