This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new efe565f8fd Rename FTNNOTE -> FOOTNOTE, cleanup
efe565f8fd is described below

commit efe565f8fd737dbe606d163c30d97295dee428a5
Author: mseidel <[email protected]>
AuthorDate: Fri May 2 14:51:07 2025 +0200

    Rename FTNNOTE -> FOOTNOTE, cleanup
    
    (cherry picked from commit 8ec8361461a80ffa6c1f723a6903e9c5b0ff3b88)
---
 main/sw/source/ui/docvw/docvw.hrc   | 100 +++---
 main/sw/source/ui/docvw/docvw.src   |   4 +-
 main/sw/source/ui/docvw/edtwin2.cxx | 626 ++++++++++++++++++------------------
 3 files changed, 362 insertions(+), 368 deletions(-)

diff --git a/main/sw/source/ui/docvw/docvw.hrc 
b/main/sw/source/ui/docvw/docvw.hrc
index 08d531c4f0..4a9d261436 100644
--- a/main/sw/source/ui/docvw/docvw.hrc
+++ b/main/sw/source/ui/docvw/docvw.hrc
@@ -19,71 +19,67 @@
  *
  *************************************************************/
 
-
-
 #ifndef _DOCVW_HRC
 #define _DOCVW_HRC
 
 #include "rcid.hrc"
 
-#define MN_READONLY_POPUP               (RC_DOCVW_BEGIN + 1)
-#define MN_READONLY_OPENURL             (RC_DOCVW_BEGIN + 2)
-#define MN_READONLY_OPENURLNEW          (RC_DOCVW_BEGIN + 3)
-#define MN_READONLY_EDITDOC             (RC_DOCVW_BEGIN + 4)
-    // FREE, formerly known as MN_READONLY_BROWSE_STOP
-#define MN_READONLY_BROWSE_BACKWARD     (RC_DOCVW_BEGIN + 6)
-#define MN_READONLY_BROWSE_FORWARD      (RC_DOCVW_BEGIN + 7)
-#define MN_READONLY_SELECTION_MODE      (RC_DOCVW_BEGIN + 8)
-#define MN_READONLY_SAVEGRAPHIC         (RC_DOCVW_BEGIN + 11)
-#define MN_READONLY_SAVEBACKGROUND      (RC_DOCVW_BEGIN + 12)
-#define MN_READONLY_COPYLINK            (RC_DOCVW_BEGIN + 13)
-#define MN_READONLY_COPYGRAPHIC         (RC_DOCVW_BEGIN + 14)
-#define MN_READONLY_LOADGRAPHIC         (RC_DOCVW_BEGIN + 15)
-#define MN_READONLY_GRAPHICOFF          (RC_DOCVW_BEGIN + 16)
-#define MN_READONLY_PLUGINOFF           (RC_DOCVW_BEGIN + 17)
-#define MN_READONLY_TOGALLERYLINK       (RC_DOCVW_BEGIN + 18)
-#define MN_READONLY_TOGALLERYCOPY       (RC_DOCVW_BEGIN + 19)
-#define MN_READONLY_SOURCEVIEW          (RC_DOCVW_BEGIN + 20)
-#define MN_READONLY_RELOAD_FRAME        (RC_DOCVW_BEGIN + 21)
-#define MN_READONLY_RELOAD              (RC_DOCVW_BEGIN + 22)
-#define MN_READONLY_COPY                (RC_DOCVW_BEGIN + 23)
+#define MN_READONLY_POPUP                              (RC_DOCVW_BEGIN + 1)
+#define MN_READONLY_OPENURL                            (RC_DOCVW_BEGIN + 2)
+#define MN_READONLY_OPENURLNEW                 (RC_DOCVW_BEGIN + 3)
+#define MN_READONLY_EDITDOC                            (RC_DOCVW_BEGIN + 4)
+// FREE, formerly known as MN_READONLY_BROWSE_STOP
+#define MN_READONLY_BROWSE_BACKWARD            (RC_DOCVW_BEGIN + 6)
+#define MN_READONLY_BROWSE_FORWARD             (RC_DOCVW_BEGIN + 7)
+#define MN_READONLY_SELECTION_MODE             (RC_DOCVW_BEGIN + 8)
+#define MN_READONLY_SAVEGRAPHIC                        (RC_DOCVW_BEGIN + 11)
+#define MN_READONLY_SAVEBACKGROUND             (RC_DOCVW_BEGIN + 12)
+#define MN_READONLY_COPYLINK                   (RC_DOCVW_BEGIN + 13)
+#define MN_READONLY_COPYGRAPHIC                        (RC_DOCVW_BEGIN + 14)
+#define MN_READONLY_LOADGRAPHIC                        (RC_DOCVW_BEGIN + 15)
+#define MN_READONLY_GRAPHICOFF                 (RC_DOCVW_BEGIN + 16)
+#define MN_READONLY_PLUGINOFF                  (RC_DOCVW_BEGIN + 17)
+#define MN_READONLY_TOGALLERYLINK              (RC_DOCVW_BEGIN + 18)
+#define MN_READONLY_TOGALLERYCOPY              (RC_DOCVW_BEGIN + 19)
+#define MN_READONLY_SOURCEVIEW                 (RC_DOCVW_BEGIN + 20)
+#define MN_READONLY_RELOAD_FRAME               (RC_DOCVW_BEGIN + 21)
+#define MN_READONLY_RELOAD                             (RC_DOCVW_BEGIN + 22)
+#define MN_READONLY_COPY                               (RC_DOCVW_BEGIN + 23)
 
-//Bei den folgenden brauchen wir Luft fuer die Gallery-Themen
-#define MN_READONLY_GRAPHICTOGALLERY    (RC_DOCVW_BEGIN + 24)
-#define MN_READONLY_BACKGROUNDTOGALLERY (RC_DOCVW_BEGIN + 60)
+// Bei den folgenden brauchen wir Luft für die Gallery-Themen
+#define MN_READONLY_GRAPHICTOGALLERY   (RC_DOCVW_BEGIN + 24)
+#define MN_READONLY_BACKGROUNDTOGALLERY        (RC_DOCVW_BEGIN + 60)
 
+#define STR_EXPORT_GRAFIK_TITLE                        (RC_DOCVW_BEGIN + 1)
+#define STR_CHAIN_OK                                   (RC_DOCVW_BEGIN + 2)
+#define STR_CHAIN_NOT_EMPTY                            (RC_DOCVW_BEGIN + 3)
+#define STR_CHAIN_IS_IN_CHAIN                  (RC_DOCVW_BEGIN + 4)
+#define STR_CHAIN_WRONG_AREA                   (RC_DOCVW_BEGIN + 5)
+#define STR_CHAIN_NOT_FOUND                            (RC_DOCVW_BEGIN + 6)
+#define STR_CHAIN_SOURCE_CHAINED               (RC_DOCVW_BEGIN + 7)
+#define STR_CHAIN_SELF                                 (RC_DOCVW_BEGIN + 8)
+#define STR_REDLINE_INSERT                             (RC_DOCVW_BEGIN + 9)
+#define STR_REDLINE_DELETE                             (RC_DOCVW_BEGIN + 10)
+#define STR_REDLINE_FORMAT                             (RC_DOCVW_BEGIN + 11)
+#define STR_REDLINE_TABLE                              (RC_DOCVW_BEGIN + 12)
+#define STR_REDLINE_FMTCOLL                            (RC_DOCVW_BEGIN + 13)
+#define STR_ENDNOTE                                            (RC_DOCVW_BEGIN 
+ 14)
+#define STR_FOOTNOTE                                   (RC_DOCVW_BEGIN + 15)
 
-#define STR_EXPORT_GRAFIK_TITLE         (RC_DOCVW_BEGIN + 1)
-#define STR_CHAIN_OK                    (RC_DOCVW_BEGIN + 2)
-#define STR_CHAIN_NOT_EMPTY             (RC_DOCVW_BEGIN + 3)
-#define STR_CHAIN_IS_IN_CHAIN           (RC_DOCVW_BEGIN + 4)
-#define STR_CHAIN_WRONG_AREA            (RC_DOCVW_BEGIN + 5)
-#define STR_CHAIN_NOT_FOUND             (RC_DOCVW_BEGIN + 6)
-#define STR_CHAIN_SOURCE_CHAINED        (RC_DOCVW_BEGIN + 7)
-#define STR_CHAIN_SELF                  (RC_DOCVW_BEGIN + 8)
-#define STR_REDLINE_INSERT              (RC_DOCVW_BEGIN + 9)
-#define STR_REDLINE_DELETE              (RC_DOCVW_BEGIN + 10)
-#define STR_REDLINE_FORMAT              (RC_DOCVW_BEGIN + 11)
-#define STR_REDLINE_TABLE               (RC_DOCVW_BEGIN + 12)
-#define STR_REDLINE_FMTCOLL             (RC_DOCVW_BEGIN + 13)
-#define STR_ENDNOTE                     (RC_DOCVW_BEGIN + 14)
-#define STR_FTNNOTE                     (RC_DOCVW_BEGIN + 15)
+#define STR_TABLE_COL_ADJUST                   (RC_DOCVW_BEGIN + 16)
+#define STR_TABLE_ROW_ADJUST                   (RC_DOCVW_BEGIN + 17)
+#define STR_TABLE_SELECT_ALL                   (RC_DOCVW_BEGIN + 18)
+#define STR_TABLE_SELECT_ROW                   (RC_DOCVW_BEGIN + 19)
+#define STR_TABLE_SELECT_COL                   (RC_DOCVW_BEGIN + 20)
 
-#define STR_TABLE_COL_ADJUST            (RC_DOCVW_BEGIN + 16)
-#define STR_TABLE_ROW_ADJUST            (RC_DOCVW_BEGIN + 17)
-#define STR_TABLE_SELECT_ALL            (RC_DOCVW_BEGIN + 18)
-#define STR_TABLE_SELECT_ROW            (RC_DOCVW_BEGIN + 19)
-#define STR_TABLE_SELECT_COL            (RC_DOCVW_BEGIN + 20)
+#define STR_SMARTTAG_CLICK                             (RC_DOCVW_BEGIN + 21)
 
-#define STR_SMARTTAG_CLICK              (RC_DOCVW_BEGIN + 21)
+#define MSG_READONLY_CONTENT                   (RC_DOCVW_BEGIN + 1)
 
-#define MSG_READONLY_CONTENT            (RC_DOCVW_BEGIN + 1)
-
-#define DOCVW_ACT_END   STR_SMARTTAG_CLICK
+#define DOCVW_ACT_END                                  STR_SMARTTAG_CLICK
 
 #if DOCVW_ACT_END > RC_DOCVW_END
-#error Resource-Id Ueberlauf in #file, #line
+#error Resource-Id overflow in #file, #line
 #endif
 
-
 #endif
diff --git a/main/sw/source/ui/docvw/docvw.src 
b/main/sw/source/ui/docvw/docvw.src
index a19c2193af..6e27fb11e3 100644
--- a/main/sw/source/ui/docvw/docvw.src
+++ b/main/sw/source/ui/docvw/docvw.src
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 #include "docvw.hrc"
 #include "cmdid.h"
 #include "helpid.h"
@@ -251,7 +249,7 @@ String STR_ENDNOTE
 {
        Text [ en-US ] = "Endnote: " ;
 };
-String STR_FTNNOTE
+String STR_FOOTNOTE
 {
        Text [ en-US ] = "Footnote: " ;
 };
diff --git a/main/sw/source/ui/docvw/edtwin2.cxx 
b/main/sw/source/ui/docvw/edtwin2.cxx
index 7433b35109..2b616531b9 100644
--- a/main/sw/source/ui/docvw/edtwin2.cxx
+++ b/main/sw/source/ui/docvw/edtwin2.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,20 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 #include <tools/ref.hxx>
@@ -77,7 +75,7 @@
 // <--
 
 /*--------------------------------------------------------------------
-       Beschreibung:   KeyEvents
+ KeyEvents
  --------------------------------------------------------------------*/
 static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool 
bBalloon )
 {
@@ -106,323 +104,323 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, 
String& rTxt, sal_Bool b
 
 void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 {
-    SwWrtShell &rSh = rView.GetWrtShell();
-    sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | 
HELPMODE_BALLOON ));
-    if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
-        return;
-    sal_Bool bWeiter = sal_True;
-    SET_CURR_SHELL(&rSh);
+       SwWrtShell &rSh = rView.GetWrtShell();
+       sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | 
HELPMODE_BALLOON ));
+       if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
+               return;
+       sal_Bool bWeiter = sal_True;
+       SET_CURR_SHELL(&rSh);
        String sTxt;
        Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() 
) ));
-    sal_Bool bBalloon = static_cast< sal_Bool >(rEvt.GetMode() & 
HELPMODE_BALLOON);
+       sal_Bool bBalloon = static_cast< sal_Bool >(rEvt.GetMode() & 
HELPMODE_BALLOON);
 
        SdrView *pSdrView = rSh.GetDrawView();
 
-    if( bQuickBalloon )
+       if( bQuickBalloon )
        {
                if( pSdrView )
                {
                        SdrPageView* pPV = pSdrView->GetSdrPageView();
-            SwDPage* pPage = pPV ? ((SwDPage*)pPV->GetPage()) : 0;
-            bWeiter = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
+                       SwDPage* pPage = pPV ? ((SwDPage*)pPV->GetPage()) : 0;
+                       bWeiter = pPage && pPage->RequestHelp(this, pSdrView, 
rEvt);
                }
        }
 
-    if( bWeiter && bQuickBalloon)
+       if( bWeiter && bQuickBalloon)
        {
                SwRect aFldRect;
-        sal_uInt16 nStyle = 0; // style of quick help
+               sal_uInt16 nStyle = 0; // style of quick help
                SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD |
                                                                        
SwContentAtPos::SW_INETATTR |
                                                                        
SwContentAtPos::SW_FTN |
                                                                        
SwContentAtPos::SW_REDLINE |
                                                                        
SwContentAtPos::SW_TOXMARK |
                                                                        
SwContentAtPos::SW_REFMARK |
-                                    SwContentAtPos::SW_SMARTTAG |
+                                                                       
SwContentAtPos::SW_SMARTTAG |
 #ifdef DBG_UTIL
-                                    SwContentAtPos::SW_TABLEBOXVALUE |
-                                    ( bBalloon ? SwContentAtPos::SW_CURR_ATTRS 
: 0) |
+                                                                       
SwContentAtPos::SW_TABLEBOXVALUE |
+                                                                       ( 
bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
 #endif
-                                    SwContentAtPos::SW_TABLEBOXFML );
-
-        if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
-        {
-            switch( aCntntAtPos.eCntntAtPos )
-            {
-            case SwContentAtPos::SW_TABLEBOXFML:
-                sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "=" ));
-                sTxt += 
((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
-                break;
+                                                                       
SwContentAtPos::SW_TABLEBOXFML );
+
+               if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, 
&aFldRect ) )
+               {
+                       switch( aCntntAtPos.eCntntAtPos )
+                       {
+                       case SwContentAtPos::SW_TABLEBOXFML:
+                               sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( 
"=" ));
+                               sTxt += 
((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
+                               break;
 #ifdef DBG_UTIL
-            case SwContentAtPos::SW_TABLEBOXVALUE:
-                {
-                    sTxt = UniString(
-                        ByteString::CreateFromDouble(
-                        ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()  )
-                        , gsl_getSystemTextEncoding());
-                }
-                break;
-            case SwContentAtPos::SW_CURR_ATTRS:
-                sTxt = aCntntAtPos.sStr;
-                break;
+                       case SwContentAtPos::SW_TABLEBOXVALUE:
+                               {
+                                       sTxt = UniString(
+                                               ByteString::CreateFromDouble(
+                                               
((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()  )
+                                               , gsl_getSystemTextEncoding());
+                               }
+                               break;
+                       case SwContentAtPos::SW_CURR_ATTRS:
+                               sTxt = aCntntAtPos.sStr;
+                               break;
 #endif
 
-            case SwContentAtPos::SW_INETATTR:
-                {
-                    sTxt = 
((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
-                    sTxt = URIHelper::removePassword( sTxt,
-                        INetURLObject::WAS_ENCODED,
-                        INetURLObject::DECODE_UNAMBIGUOUS);
-                    //#i63832# remove the link target type
-                    xub_StrLen nFound = sTxt.Search(cMarkSeperator);
-                    if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
-                    {
-                        String sSuffix( sTxt.Copy(nFound) );
-                        if( sSuffix.EqualsAscii( pMarkToTable ) ||
-                            sSuffix.EqualsAscii( pMarkToFrame ) ||
-                            sSuffix.EqualsAscii( pMarkToRegion ) ||
-                            sSuffix.EqualsAscii( pMarkToOutline ) ||
-                            sSuffix.EqualsAscii( pMarkToText ) ||
-                            sSuffix.EqualsAscii( pMarkToGraphic ) ||
-                            sSuffix.EqualsAscii( pMarkToOLE ))
-                            sTxt = sTxt.Copy( 0, nFound - 1);
-                    }
-                    // special handling if target is a cross-reference bookmark
-                    {
-                        String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
-                        IDocumentMarkAccess* const pMarkAccess = 
rSh.getIDocumentMarkAccess();
-                        IDocumentMarkAccess::const_iterator_t ppBkmk = 
pMarkAccess->findBookmark( sTmpSearchStr );
-                        if ( ppBkmk != pMarkAccess->getBookmarksEnd()
-                             && IDocumentMarkAccess::GetType( *(ppBkmk->get()) 
) == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
-                        {
-                            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 = '-';
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    sal_Bool bExecHyperlinks = 
rView.GetDocShell()->IsReadOnly();
-                    if ( !bExecHyperlinks )
-                    {
-                        SvtSecurityOptions aSecOpts;
-                        bExecHyperlinks = !aSecOpts.IsOptionSet( 
SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
-
-                        if ( !bExecHyperlinks )
-                        {
-                            sTxt.InsertAscii( ": ", 0 );
-                            sTxt.Insert( 
ViewShell::GetShellRes()->aHyperlinkClick, 0 );
-                        }
-                    }
-                    break;
-                }
-            case SwContentAtPos::SW_SMARTTAG:
-                {
-                    sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
-
-                    KeyCode aCode( KEY_SPACE );
-                    KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
-                    String aModStr( aModifiedCode.GetName() );
-                    aModStr.SearchAndReplace( aCode.GetName(), String() );
-                    aModStr.SearchAndReplaceAllAscii( "+", String() );
-                    sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
-                }
-                break;
-
-            case SwContentAtPos::SW_FTN:
-                if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr )
-                {
-                    const SwFmtFtn* pFtn = (SwFmtFtn*)aCntntAtPos.aFnd.pAttr;
-                    pFtn->GetFtnText( sTxt );
-                    sTxt.Insert( SW_RESSTR( pFtn->IsEndNote()
-                        ? STR_ENDNOTE : STR_FTNNOTE ), 0 );
-                    if( aCntntAtPos.IsInRTLText() )
-                        nStyle |= QUICKHELP_BIDI_RTL;
-                }
-                break;
-
-            case SwContentAtPos::SW_REDLINE:
-                lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
-                break;
-
-            case SwContentAtPos::SW_TOXMARK:
-                sTxt = aCntntAtPos.sStr;
-                if( sTxt.Len() && aCntntAtPos.pFndTxtAttr )
-                {
-                    const SwTOXType* pTType = aCntntAtPos.pFndTxtAttr->
-                        GetTOXMark().GetTOXType();
-                    if( pTType && pTType->GetTypeName().Len() )
-                    {
-                        sTxt.InsertAscii( ": ", 0 );
-                        sTxt.Insert( pTType->GetTypeName(), 0 );
-                    }
-                }
-                break;
-
-            case SwContentAtPos::SW_REFMARK:
-                if(aCntntAtPos.aFnd.pAttr)
-                {
-                    sTxt = SW_RES(STR_CONTENT_TYPE_SINGLE_REFERENCE);
-                    sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": "));
-                    sTxt += ((const 
SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
-                }
-                break;
-
-            default:
-                {
-                    SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
-                    if(!pModOpt->IsHideFieldTips())
-                    {
-                        const SwField* pFld = aCntntAtPos.aFnd.pFld;
-                        switch( pFld->Which() )
-                        {
-                        case RES_SETEXPFLD:
-                        case RES_TABLEFLD:
-                        case RES_GETEXPFLD:
-                            {
-                                sal_uInt16 nOldSubType = pFld->GetSubType();
-                                
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
-                                sTxt = pFld->ExpandField(true);
-                                ((SwField*)pFld)->SetSubType(nOldSubType);
-                            }
-                            break;
-
-                        case RES_POSTITFLD:
-                            {
-                                break;
-                            }
-                        case RES_INPUTFLD:     // BubbleHelp, da der Hinweis 
ggf ziemlich lang sein kann
-                            bBalloon = sal_True;
-                            /* no break */
-                        case RES_JUMPEDITFLD:
-                            sTxt = pFld->GetPar2();
-                            break;
-
-                        case RES_DBFLD:
-                            sTxt = pFld->GetFieldName();
-                            break;
-
-                        case RES_USERFLD:
-                        case RES_HIDDENTXTFLD:
-                            sTxt = pFld->GetPar1();
-                            break;
-
-                        case RES_DOCSTATFLD:
-                            break;
-
-                        case RES_MACROFLD:
-                            sTxt = ((const SwMacroField*)pFld)->GetMacro();
-                            break;
-
-                        case RES_GETREFFLD:
-                            {
-                                const SwGetRefField* pRefFld( 
dynamic_cast<const SwGetRefField*>(pFld) );
-                                ASSERT( pRefFld,
-                                    "<SwEditWin::RequestHelp(..)> - unexpected 
type of <pFld>" );
-                                if ( pRefFld )
-                                {
-                                    if ( 
pRefFld->IsRefToHeadingCrossRefBookmark() ||
-                                        
pRefFld->IsRefToNumItemCrossRefBookmark() )
-                                    {
-                                        sTxt = 
pRefFld->GetExpandedTxtOfReferencedTxtNode();
-                                        if ( sTxt.Len() > 80  )
-                                        {
-                                            sTxt.Erase( 80 );
-                                            sTxt += '.';
-                                            sTxt += '.';
-                                            sTxt += '.';
-                                        }
-                                    }
-                                    else
-                                    {
-                                        sTxt = 
((SwGetRefField*)pFld)->GetSetRefName();
-                                    }
-                                }
-                            }
-                            break;
-                        }
-                    }
-
-                    if( !sTxt.Len() )
-                    {
-                        aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
-                        if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, 
&aFldRect ) )
-                            lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, 
bBalloon );
-                    }
-                }
-            }
-            if (sTxt.Len() )
-            {
-                if( bBalloon )
-                    Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sTxt );
-                else
-                {
-                    // dann zeige die Hilfe mal an:
-                    Rectangle aRect( aFldRect.SVRect() );
-                    Point aPt( OutputToScreenPixel( LogicToPixel( 
aRect.TopLeft() )));
-                    aRect.Left()   = aPt.X();
-                    aRect.Top()    = aPt.Y();
-                    aPt = OutputToScreenPixel( LogicToPixel( 
aRect.BottomRight() ));
-                    aRect.Right()  = aPt.X();
-                    aRect.Bottom() = aPt.Y();
-                    Help::ShowQuickHelp( this, aRect, sTxt, nStyle );
-                }
-            }
-
-            bWeiter = sal_False;
-        }
-        if( bWeiter )
-        {
-            sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos);
-            sal_uInt16 nTabRes = 0;
-            switch(nTabCols)
-            {
-                case SW_TABCOL_HORI:
-                case SW_TABCOL_VERT:
-                    nTabRes = STR_TABLE_COL_ADJUST;
-                    break;
-                case SW_TABROW_HORI:
-                case SW_TABROW_VERT:
-                    nTabRes = STR_TABLE_ROW_ADJUST;
-                    break;
-                case SW_TABSEL_HORI:
-                case SW_TABSEL_HORI_RTL:
-                case SW_TABSEL_VERT:
-                    nTabRes = STR_TABLE_SELECT_ALL;
-                    break;
-                case SW_TABROWSEL_HORI:
-                case SW_TABROWSEL_HORI_RTL:
-                case SW_TABROWSEL_VERT:
-                    nTabRes = STR_TABLE_SELECT_ROW;
-                    break;
-                case SW_TABCOLSEL_HORI:
-                case SW_TABCOLSEL_VERT:
-                    nTabRes = STR_TABLE_SELECT_COL;
-                    break;
-            }
-            if(nTabRes)
-            {
-                sTxt = SW_RESSTR(nTabRes);
-                Size aTxtSize( GetTextWidth(sTxt), GetTextHeight());
-                Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
-                Help::ShowQuickHelp(this, aRect, sTxt);
-            }
-            bWeiter = sal_False;
-        }
-    }
+                       case SwContentAtPos::SW_INETATTR:
+                               {
+                                       sTxt = 
((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
+                                       sTxt = URIHelper::removePassword( sTxt,
+                                               INetURLObject::WAS_ENCODED,
+                                               
INetURLObject::DECODE_UNAMBIGUOUS);
+                                       //#i63832# remove the link target type
+                                       xub_StrLen nFound = 
sTxt.Search(cMarkSeperator);
+                                       if( nFound != STRING_NOTFOUND && 
(++nFound) < sTxt.Len() )
+                                       {
+                                               String sSuffix( 
sTxt.Copy(nFound) );
+                                               if( sSuffix.EqualsAscii( 
pMarkToTable ) ||
+                                                       sSuffix.EqualsAscii( 
pMarkToFrame ) ||
+                                                       sSuffix.EqualsAscii( 
pMarkToRegion ) ||
+                                                       sSuffix.EqualsAscii( 
pMarkToOutline ) ||
+                                                       sSuffix.EqualsAscii( 
pMarkToText ) ||
+                                                       sSuffix.EqualsAscii( 
pMarkToGraphic ) ||
+                                                       sSuffix.EqualsAscii( 
pMarkToOLE ))
+                                                       sTxt = sTxt.Copy( 0, 
nFound - 1);
+                                       }
+                                       // special handling if target is a 
cross-reference bookmark
+                                       {
+                                               String sTmpSearchStr = 
sTxt.Copy( 1, sTxt.Len() );
+                                               IDocumentMarkAccess* const 
pMarkAccess = rSh.getIDocumentMarkAccess();
+                                               
IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findBookmark( 
sTmpSearchStr );
+                                               if ( ppBkmk != 
pMarkAccess->getBookmarksEnd()
+                                                        && 
IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) == 
IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
+                                               {
+                                                       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 = '-';
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+
+                                       sal_Bool bExecHyperlinks = 
rView.GetDocShell()->IsReadOnly();
+                                       if ( !bExecHyperlinks )
+                                       {
+                                               SvtSecurityOptions aSecOpts;
+                                               bExecHyperlinks = 
!aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+
+                                               if ( !bExecHyperlinks )
+                                               {
+                                                       sTxt.InsertAscii( ": ", 
0 );
+                                                       sTxt.Insert( 
ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+                                               }
+                                       }
+                                       break;
+                               }
+                       case SwContentAtPos::SW_SMARTTAG:
+                               {
+                                       sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
+
+                                       KeyCode aCode( KEY_SPACE );
+                                       KeyCode aModifiedCode( KEY_SPACE, 
KEY_MOD1 );
+                                       String aModStr( aModifiedCode.GetName() 
);
+                                       aModStr.SearchAndReplace( 
aCode.GetName(), String() );
+                                       aModStr.SearchAndReplaceAllAscii( "+", 
String() );
+                                       sTxt.SearchAndReplaceAllAscii( "%s", 
aModStr );
+                               }
+                               break;
+
+                       case SwContentAtPos::SW_FTN:
+                               if( aCntntAtPos.pFndTxtAttr && 
aCntntAtPos.aFnd.pAttr )
+                               {
+                                       const SwFmtFtn* pFtn = 
(SwFmtFtn*)aCntntAtPos.aFnd.pAttr;
+                                       pFtn->GetFtnText( sTxt );
+                                       sTxt.Insert( SW_RESSTR( 
pFtn->IsEndNote()
+                                               ? STR_ENDNOTE : STR_FOOTNOTE ), 
0 );
+                                       if( aCntntAtPos.IsInRTLText() )
+                                               nStyle |= QUICKHELP_BIDI_RTL;
+                               }
+                               break;
+
+                       case SwContentAtPos::SW_REDLINE:
+                               lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, 
sTxt, bBalloon );
+                               break;
+
+                       case SwContentAtPos::SW_TOXMARK:
+                               sTxt = aCntntAtPos.sStr;
+                               if( sTxt.Len() && aCntntAtPos.pFndTxtAttr )
+                               {
+                                       const SwTOXType* pTType = 
aCntntAtPos.pFndTxtAttr->
+                                               GetTOXMark().GetTOXType();
+                                       if( pTType && 
pTType->GetTypeName().Len() )
+                                       {
+                                               sTxt.InsertAscii( ": ", 0 );
+                                               sTxt.Insert( 
pTType->GetTypeName(), 0 );
+                                       }
+                               }
+                               break;
+
+                       case SwContentAtPos::SW_REFMARK:
+                               if(aCntntAtPos.aFnd.pAttr)
+                               {
+                                       sTxt = 
SW_RES(STR_CONTENT_TYPE_SINGLE_REFERENCE);
+                                       sTxt.AppendAscii( 
RTL_CONSTASCII_STRINGPARAM( ": "));
+                                       sTxt += ((const 
SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
+                               }
+                               break;
+
+                       default:
+                               {
+                                       SwModuleOptions* pModOpt = 
SW_MOD()->GetModuleConfig();
+                                       if(!pModOpt->IsHideFieldTips())
+                                       {
+                                               const SwField* pFld = 
aCntntAtPos.aFnd.pFld;
+                                               switch( pFld->Which() )
+                                               {
+                                               case RES_SETEXPFLD:
+                                               case RES_TABLEFLD:
+                                               case RES_GETEXPFLD:
+                                                       {
+                                                               sal_uInt16 
nOldSubType = pFld->GetSubType();
+                                                               
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
+                                                               sTxt = 
pFld->ExpandField(true);
+                                                               
((SwField*)pFld)->SetSubType(nOldSubType);
+                                                       }
+                                                       break;
+
+                                               case RES_POSTITFLD:
+                                                       {
+                                                               break;
+                                                       }
+                                               case RES_INPUTFLD:      // 
BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
+                                                       bBalloon = sal_True;
+                                                       /* no break */
+                                               case RES_JUMPEDITFLD:
+                                                       sTxt = pFld->GetPar2();
+                                                       break;
+
+                                               case RES_DBFLD:
+                                                       sTxt = 
pFld->GetFieldName();
+                                                       break;
+
+                                               case RES_USERFLD:
+                                               case RES_HIDDENTXTFLD:
+                                                       sTxt = pFld->GetPar1();
+                                                       break;
+
+                                               case RES_DOCSTATFLD:
+                                                       break;
+
+                                               case RES_MACROFLD:
+                                                       sTxt = ((const 
SwMacroField*)pFld)->GetMacro();
+                                                       break;
+
+                                               case RES_GETREFFLD:
+                                                       {
+                                                               const 
SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
+                                                               ASSERT( pRefFld,
+                                                                       
"<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
+                                                               if ( pRefFld )
+                                                               {
+                                                                       if ( 
pRefFld->IsRefToHeadingCrossRefBookmark() ||
+                                                                               
pRefFld->IsRefToNumItemCrossRefBookmark() )
+                                                                       {
+                                                                               
sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
+                                                                               
if ( sTxt.Len() > 80  )
+                                                                               
{
+                                                                               
        sTxt.Erase( 80 );
+                                                                               
        sTxt += '.';
+                                                                               
        sTxt += '.';
+                                                                               
        sTxt += '.';
+                                                                               
}
+                                                                       }
+                                                                       else
+                                                                       {
+                                                                               
sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
+                                                                       }
+                                                               }
+                                                       }
+                                                       break;
+                                               }
+                                       }
+
+                                       if( !sTxt.Len() )
+                                       {
+                                               aCntntAtPos.eCntntAtPos = 
SwContentAtPos::SW_REDLINE;
+                                               if( rSh.GetContentAtPos( aPos, 
aCntntAtPos, sal_False, &aFldRect ) )
+                                                       lcl_GetRedlineHelp( 
*aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
+                                       }
+                               }
+                       }
+                       if (sTxt.Len() )
+                       {
+                               if( bBalloon )
+                                       Help::ShowBalloon( this, 
rEvt.GetMousePosPixel(), sTxt );
+                               else
+                               {
+                                       // dann zeige die Hilfe mal an:
+                                       Rectangle aRect( aFldRect.SVRect() );
+                                       Point aPt( OutputToScreenPixel( 
LogicToPixel( aRect.TopLeft() )));
+                                       aRect.Left()   = aPt.X();
+                                       aRect.Top()    = aPt.Y();
+                                       aPt = OutputToScreenPixel( 
LogicToPixel( aRect.BottomRight() ));
+                                       aRect.Right()  = aPt.X();
+                                       aRect.Bottom() = aPt.Y();
+                                       Help::ShowQuickHelp( this, aRect, sTxt, 
nStyle );
+                               }
+                       }
+
+                       bWeiter = sal_False;
+               }
+               if( bWeiter )
+               {
+                       sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos);
+                       sal_uInt16 nTabRes = 0;
+                       switch(nTabCols)
+                       {
+                               case SW_TABCOL_HORI:
+                               case SW_TABCOL_VERT:
+                                       nTabRes = STR_TABLE_COL_ADJUST;
+                                       break;
+                               case SW_TABROW_HORI:
+                               case SW_TABROW_VERT:
+                                       nTabRes = STR_TABLE_ROW_ADJUST;
+                                       break;
+                               case SW_TABSEL_HORI:
+                               case SW_TABSEL_HORI_RTL:
+                               case SW_TABSEL_VERT:
+                                       nTabRes = STR_TABLE_SELECT_ALL;
+                                       break;
+                               case SW_TABROWSEL_HORI:
+                               case SW_TABROWSEL_HORI_RTL:
+                               case SW_TABROWSEL_VERT:
+                                       nTabRes = STR_TABLE_SELECT_ROW;
+                                       break;
+                               case SW_TABCOLSEL_HORI:
+                               case SW_TABCOLSEL_VERT:
+                                       nTabRes = STR_TABLE_SELECT_COL;
+                                       break;
+                       }
+                       if(nTabRes)
+                       {
+                               sTxt = SW_RESSTR(nTabRes);
+                               Size aTxtSize( GetTextWidth(sTxt), 
GetTextHeight());
+                               Rectangle aRect(rEvt.GetMousePosPixel(), 
aTxtSize);
+                               Help::ShowQuickHelp(this, aRect, sTxt);
+                       }
+                       bWeiter = sal_False;
+               }
+       }
 
 /*
 aktuelle Zeichenvorlage anzeigen?
@@ -432,7 +430,7 @@ aktuelle Zeichenvorlage anzeigen?
 
        }
 */
-    if( bWeiter && pSdrView && bQuickBalloon)
+       if( bWeiter && pSdrView && bQuickBalloon)
        {
                SdrViewEvent aVEvt;
                SdrHitKind eHit = pSdrView->PickAnything(aPos, aVEvt);
@@ -452,7 +450,7 @@ aktuelle Zeichenvorlage anzeigen?
                }
                if (bWeiter && eHit == SDRHIT_TEXTEDIT)
                {
-                       // URL-Feld in zum Editieren ge?ffneten DrawText-Objekt 
suchen
+                       // URL-Feld in zum Editieren geöffneten DrawText-Objekt 
suchen
                        OutlinerView* pOLV = 
pSdrView->GetTextEditOutlinerView();
                        const SvxFieldItem* pFieldItem;
 
@@ -467,9 +465,9 @@ aktuelle Zeichenvorlage anzeigen?
                        if (pObj && pObj->ISA(SdrTextObj) && pOLV &&
                                        (pFieldItem = 
pOLV->GetFieldUnderMousePointer()) != 0)
                        {
-                pField = dynamic_cast<const 
SvxURLField*>(pFieldItem->GetField());
+                               pField = dynamic_cast<const 
SvxURLField*>(pFieldItem->GetField());
 
-                if (pField )
+                               if (pField )
                                {
                                        sTxt = ((const SvxURLField*) 
pField)->GetURL();
                                        bWeiter = sal_False;
@@ -500,10 +498,10 @@ void SwEditWin::PrePaint()
 {
        SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
 
-    if(pWrtShell)
-    {
+       if(pWrtShell)
+       {
                pWrtShell->PrePaint();
-    }
+       }
 }
 
 void  SwEditWin::Paint(const Rectangle& rRect)
@@ -525,29 +523,29 @@ void  SwEditWin::Paint(const Rectangle& rRect)
        if( pShadCrsr )
        {
                Rectangle aRect( pShadCrsr->GetRect());
-               // liegt vollstaendig drin?
+               // liegt vollständig drin?
                if( rRect.IsInside( aRect ) )
                        // dann aufheben
                        delete pShadCrsr, pShadCrsr = 0;
                else if( rRect.IsOver( aRect ))
                {
-                       // liegt irgendwie drueber, dann ist alles ausserhalb 
geclippt
-                       // und wir muessen den "inneren Teil" am Ende vom Paint
+                       // liegt irgendwie drüber, dann ist alles ausserhalb 
geclippt
+                       // und wir müssen den "inneren Teil" am Ende vom Paint
                        // wieder sichtbar machen. Sonst kommt es zu 
Paintfehlern!
                        bPaintShadowCrsr = sal_True;
                }
        }
 /*
-    //TODO/LATER: what's the replacement for this? Do we need it?
+       // TODO/LATER: What's the replacement for this? Do we need it?
        SwDocShell* pDocShell = GetView().GetDocShell();
 
   SvInPlaceEnvironment *pIpEnv =  pDocShell ?
                                                                  
pDocShell->GetIPEnv() : 0;
        if ( pIpEnv && pIpEnv->GetRectsChangedLockCount() )
-               //Wir stehen in Groessenverhandlungen (MM), Paint verzoegern
+               //Wir stehen in Groessenverhandlungen (MM), Paint verzögern
                Invalidate( rRect );
-    else */
-    if ( GetView().GetVisArea().GetWidth()  <= 0 ||
+       else */
+       if ( GetView().GetVisArea().GetWidth()  <= 0 ||
                          GetView().GetVisArea().GetHeight() <= 0 )
                Invalidate( rRect );
        else
@@ -556,3 +554,5 @@ void  SwEditWin::Paint(const Rectangle& rRect)
        if( bPaintShadowCrsr )
                pShadCrsr->Paint();
 }
+
+/* vim: set noet sw=4 ts=4: */


Reply via email to