diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-09 07:49:49 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-09 07:49:49 +0000 |
commit | 5dfb59695fbe0e94a75f3abd4683bf691d811abe (patch) | |
tree | b92b39845191fd931dafe5a54519a850401ae206 /sw | |
parent | f3441a12bae954cc81d639ded54bc0720c7ff675 (diff) |
CWS-TOOLING: integrate CWS os121
2008-11-28 13:44:51 +0100 os r264551 : Copy Hyperlink Location added
2008-11-28 13:36:20 +0100 os r264547 : Copy Hyperlink Location added
2008-11-25 15:43:53 +0100 os r264311 : label of EditHyperlink fixed
2008-11-25 15:42:42 +0100 os r264310 : use ResetAttr to remove hyperlink
2008-11-25 10:08:02 +0100 os r264276 : edit/remove hyperlink names fixed
2008-11-11 15:47:22 +0100 os r263565 : typo fixed
2008-11-10 18:46:00 +0100 os r263536 : CWS-TOOLING: rebase CWS os121 to trunk@263288 (milestone: DEV300:m35)
2008-11-07 15:34:41 +0100 os r263422 : #i6191# accept/reject changes;#i7311# remove hyperlink
2008-11-07 15:34:05 +0100 os r263421 : #i6191# accept/reject changes;#i7311# remove hyperlink
2008-11-06 17:26:18 +0100 os r263402 : #i43971# words from online help documents must not be added to AutoCompletion
2008-11-06 16:08:27 +0100 os r263397 : #i6191# accept/reject changes added to context menu
2008-11-06 16:07:49 +0100 os r263396 : #i6191# accept/reject changes added to context menu
2008-11-06 16:07:16 +0100 os r263395 : #i6191# accept/reject changes added to context menu
2008-11-06 16:06:18 +0100 os r263394 : #i6191# accept/reject changes added to context menu
2008-10-30 14:31:32 +0100 os r262826 : #i84980# less options changed to fewer options
2008-10-30 11:44:41 +0100 os r262824 : #i95624# don't add paragraph numbering in getString()
2008-10-27 10:46:04 +0100 os r262665 : #i88235# SvCheckListBox::SelectEntryPos() paints a CheckBox to the wrong device if page is not visible, yet - call moved to ::Reset()
2008-10-24 15:49:27 +0200 os r262648 : #i77230# make repeating headers the default
2008-10-23 16:49:42 +0200 os r262625 : #i95350# RTL output of table window fixed
2008-10-23 15:37:40 +0200 os r262623 : #i76723# RTL related patch removed - it is now done by vcl
2008-10-22 14:05:58 +0200 os r262601 : #b6297019#,#i49754# LoadStyles: restore outline settings
2008-10-22 14:05:17 +0200 os r262600 : #b6297019#,#i49754# LoadStyles: restore outline settings
2008-10-20 15:39:18 +0200 os r262323 : #i95059# border attribute: which id of SID_ATTR_BORDER_INNER fixed
2008-10-20 09:30:28 +0200 os r262305 : #i95123# conflict css::util::Color and ::Color solved
2008-10-17 11:44:16 +0200 os r262280 : #i93714# merge to PDF: convert fields to text before export
2008-10-17 10:30:11 +0200 os r262275 : #i94364#
2008-10-17 10:11:56 +0200 os r262274 : +i94536# default font ListBoxes: prevent entry duplication if 'Back' button is pressed
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/cmdid.h | 5 | ||||
-rw-r--r-- | sw/inc/shellio.hxx | 1 | ||||
-rw-r--r-- | sw/sdi/_textsh.sdi | 12 | ||||
-rw-r--r-- | sw/sdi/_viewsh.sdi | 13 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 102 | ||||
-rw-r--r-- | sw/source/core/doc/acmplwrd.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ascii/ascatr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 22 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbmgr.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/inc/swmn_tmpl.hrc | 33 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 41 | ||||
-rw-r--r-- | sw/source/ui/uiview/srcview.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 24 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewstat.cxx | 9 |
19 files changed, 276 insertions, 23 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 257fc5aa8b3b..ebd5e5d5cb43 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -263,6 +263,11 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_EDIT_HYPERLINK (FN_EDIT2 + 35) /* edit hyperlink */ #define FN_NUM_CONTINUE (FN_EDIT2 + 36) /* continue previous numbering */ +#define FN_REDLINE_ACCEPT_DIRECT (FN_EDIT2 + 37) /* accept redline at current position*/ +#define FN_REDLINE_REJECT_DIRECT (FN_EDIT2 + 38) /* reject redline at current position*/ +#define FN_REMOVE_HYPERLINK (FN_EDIT2 + 39) /* remove hyperlink attribute */ +#define FN_COPY_HYPERLINK_LOCATION (FN_EDIT2 + 40) /* copy hyperlink URL to clipboard */ + /*-------------------------------------------------------------------- Bereich: Bearbeiten --------------------------------------------------------------------*/ diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 1598cffdeb09..d40320cf0543 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -477,6 +477,7 @@ public: BOOL bASCII_ParaAsBlanc : 1; BOOL bASCII_NoLastLineEnd : 1; BOOL bUCS2_WithStartChar : 1; + BOOL bExportPargraphNumbering : 1; BOOL bBlock : 1; BOOL bOrganizerMode : 1; diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 4a19ad3d4cf0..73bf1625c9c7 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -364,6 +364,18 @@ interface BaseText StateMethod = GetState; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + FN_REMOVE_HYPERLINK + [ + ExecMethod = Execute ; + StateMethod = GetState; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + FN_COPY_HYPERLINK_LOCATION + [ + ExecMethod = Execute ; + StateMethod = GetState; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] FN_TABLE_UNSET_READ_ONLY // status(final|play) [ ExecMethod = Execute ; diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index cc71d2791cd4..b4ce49dbfe11 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -125,6 +125,19 @@ interface BaseTextEditView : View StateMethod = GetState ; DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR"; ] + FN_REDLINE_ACCEPT_DIRECT + [ + ExecMethod = Execute ; + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR"; + ] + FN_REDLINE_REJECT_DIRECT + [ + ExecMethod = Execute ; + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR"; + ] + SID_DOCUMENT_COMPARE // status(play) [ ExecMethod = Execute ; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index e59d04b13b3b..6d4b9e29bf35 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -10211,4 +10211,106 @@ SfxBoolItem SpellingAndGrammarDialog FN_SPELL_GRAMMAR_DIALOG ToolBoxConfig = TRUE, GroupId = GID_EDIT; ] +//-------------------------------------------------------------------------- +SfxVoidItem AcceptTracedChange FN_REDLINE_ACCEPT_DIRECT +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_EDIT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem RejectTracedChange FN_REDLINE_REJECT_DIRECT +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_EDIT; +] +//-------------------------------------------------------------------------- +SfxVoidItem RemoveHyperlink FN_REMOVE_HYPERLINK +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_EDIT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem CopyHyperlinkLocation FN_COPY_HYPERLINK_LOCATION +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_EDIT; +] diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 526597ddb0d4..95e793d323a8 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -47,6 +47,8 @@ #include <svx/svxacorr.hxx> #include <svx/acorrcfg.hxx> +#include <sfx2/docfile.hxx> +#include <docsh.hxx> #include <vector> /* -----------------------------05.08.2002 12:43------------------------------ @@ -284,6 +286,16 @@ SwAutoCompleteWord::~SwAutoCompleteWord() BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc ) { + SwDocShell* pDocShell = rDoc.GetDocShell(); + SfxMedium* pMedium = pDocShell ? pDocShell->GetMedium() : 0; + // strings from help module should not be added + if( pMedium ) + { + const INetURLObject& rURL = pMedium->GetURLObject(); + if ( rURL.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP ) + return sal_False; + } + String aNewWord(rWord); aNewWord.EraseAllChars( CH_TXTATR_INWORD ); aNewWord.EraseAllChars( CH_TXTATR_BREAKWORD ); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index ae207bde83b7..c9da7ef96296 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -289,6 +289,7 @@ void SwXTextCursor::getTextFromPam(SwPaM& aCrsr, OUString& rBuffer) { SwWriter aWriter( aStream, aCrsr ); xWrt->bASCII_NoLastLineEnd = sal_True; + xWrt->bExportPargraphNumbering = sal_False; SwAsciiOptions aOpt = xWrt->GetAsciiOptions(); aOpt.SetCharSet( RTL_TEXTENCODING_UNICODE ); xWrt->SetAsciiOptions( aOpt ); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index fc37c2b31685..f59ca89a8ce8 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -180,7 +180,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) SwASC_AttrIter aAttrIter( (SwASCWriter&)rWrt, rNd, nStrPos ); - if( !nStrPos ) + if( !nStrPos && rWrt.bExportPargraphNumbering ) rWrt.Strm().WriteUnicodeOrByteText( rNd.GetNumString() ); String aStr( rNd.GetTxt() ); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 8b553746c25a..12daf9e5dc85 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -151,6 +151,7 @@ Writer::Writer() bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = bWriteClipboardDoc = bWriteOnlyFirstTable = bBlock = bOrganizerMode = false; + bExportPargraphNumbering = sal_True; } Writer::~Writer() diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 328c86e0e146..44744f0d18a2 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -382,10 +382,11 @@ TYPEINIT1( SwXMLDocStylesContext_Impl, SwXMLDocContext_Impl ); void SwXMLDocStylesContext_Impl::EndElement() { - // --> OD 2006-10-11 #i69629# // assign paragraph styles to list levels of outline style after all styles // are imported and finished. - GetImport().GetTextImport()->SetOutlineStyles( sal_True ); + SwXMLImport& rSwImport = dynamic_cast<SwXMLImport&>( GetImport()); + GetImport().GetTextImport()->SetOutlineStyles( + (rSwImport.GetStyleFamilyMask() & SFX_STYLE_FAMILY_PARA ) ? sal_True : sal_False); // <-- } // <-- diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 253e1815b712..51608929475a 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -157,7 +157,6 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe } m_aOptionsLB.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aOptionsLB.SetHighlightRange(); - m_aOptionsLB.SelectEntryPos( 0 ); FreeResource(); @@ -623,6 +622,8 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) void SwCompatibilityOptPage::Reset( const SfxItemSet& ) { + m_aOptionsLB.SelectEntryPos( 0 ); + ULONG nOptions = GetDocumentOptions(); SetCurrentOptions( nOptions ); m_nSavedOptions = nOptions; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 14a3bfa44905..082269122539 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -941,15 +941,19 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) bDeletePrinter = TRUE; } pFontList = new FontList( pPrt ); - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) - { - const String &rString = pPrt->GetFont(i)->GetName(); - aStandardBox.InsertEntry( rString ); - aTitleBox .InsertEntry( rString ); - aListBox .InsertEntry( rString ); - aLabelBox .InsertEntry( rString ); - aIdxBox .InsertEntry( rString ); + // #i94536# prevent duplication of font entries when 'reset' button is pressed + if( !aStandardBox.GetEntryCount() ) + { + const USHORT nCount = pPrt->GetFontCount(); + for (USHORT i = 0; i < nCount; ++i) + { + const String &rString = pPrt->GetFont(i)->GetName(); + aStandardBox.InsertEntry( rString ); + aTitleBox .InsertEntry( rString ); + aListBox .InsertEntry( rString ); + aLabelBox .InsertEntry( rString ); + aIdxBox .InsertEntry( rString ); + } } if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem)) { diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index d13311ed0828..bf6bef6959b3 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1563,6 +1563,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData))); } + //convert fields to text if we are exporting to PDF + //this prevents a second merge while updating the fields in SwXTextDocument::getRendererCount() + if( pStoreToFilter && pStoreToFilter->GetFilterName().EqualsAscii("writer_pdf_Export")) + rWorkShell.ConvertFieldsToText(); xWorkDocSh->DoSaveAs(*pDstMed); xWorkDocSh->DoSaveCompleted(pDstMed); if( xWorkDocSh->GetError() ) diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index d7367fd8b084..93577032de34 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -225,6 +225,20 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ Text [ en-US ] = "Inde~x Entry..." ; \ }; + +#define _MN_EDIT_REDLINE \ + MenuItem \ + { \ + Identifier = FN_REDLINE_ACCEPT_DIRECT; \ + HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ + Text [ en-US ] = "Accept Change" ; \ + };\ + MenuItem \ + { \ + Identifier = FN_REDLINE_REJECT_DIRECT ; \ + HelpID = FN_REDLINE_REJECT_DIRECT ; \ + Text [ en-US ] = "Reject Change" ; \ + }; #define _MN_EDIT_BIB_ENTRY_DLG \ MenuItem \ { \ @@ -238,6 +252,24 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ ITEM_OPEN_HYPERLINK \ + };\ + MenuItem \ + { \ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpID = FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "Edit Hyperlink..."; \ + }; \ + MenuItem \ + { \ + Identifier = FN_COPY_HYPERLINK_LOCATION; \ + HelpID = FN_COPY_HYPERLINK_LOCATION; \ + Text [ en-US ] = "Copy Hyperlink ~Location"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_HYPERLINK ; \ + HelpID = FN_REMOVE_HYPERLINK ; \ + Text [ en-US ] = "Remo~ve Hyperlink"; \ }; #define _MN_EDIT_OPEN_SMARTTAGMENU \ @@ -259,6 +291,7 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml _MN_EDIT_FOOTNOTE \ _MN_EDIT_IDX_ENTRY_DLG \ _MN_EDIT_BIB_ENTRY_DLG \ + _MN_EDIT_REDLINE \ MenuItem \ { \ ITEM_POPUP_TEMPLATE_EDIT \ diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index c2ea1e18cbe6..123247c8a164 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -55,9 +55,8 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objitem.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif +#include <vcl/unohelp2.hxx> #include <sfx2/request.hxx> #include <svtools/eitem.hxx> #include <svtools/macitem.hxx> @@ -816,6 +815,27 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_EDIT_HYPERLINK: GetView().GetViewFrame()->ToggleChildWindow(SID_HYPERLINK_DIALOG); break; + case FN_REMOVE_HYPERLINK: + { + BOOL bSel = rWrtSh.HasSelection(); + if(!bSel) + { + rWrtSh.StartAction(); + rWrtSh.Push(); + if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT )) + rWrtSh.SelWrd(); + } + //now remove the attribute + SvUShortsSort aAttribs; + aAttribs.Insert( RES_TXTATR_INETFMT ); + rWrtSh.ResetAttr( &aAttribs ); + if(!bSel) + { + rWrtSh.Pop(FALSE); + rWrtSh.EndAction(); + } + } + break; case SID_ATTR_BRUSH_CHAR : case SID_ATTR_CHAR_SCALEWIDTH : case SID_ATTR_CHAR_ROTATED : @@ -1242,6 +1262,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } break; case SID_OPEN_HYPERLINK: + case FN_COPY_HYPERLINK_LOCATION: { SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, @@ -1249,8 +1270,16 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.GetCurAttr(aSet); if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE )) { - const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE); - rWrtSh.ClickToINetAttr((const SwFmtINetFmt&)rItem, URLLOAD_NOFILTER); + const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) ); + if( nSlot == FN_COPY_HYPERLINK_LOCATION ) + { + ::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard(); + vcl::unohelper::TextDataObject::CopyStringTo( + rINetFmt.GetValue(), + xClipboard ); + } + else + rWrtSh.ClickToINetAttr(rINetFmt, URLLOAD_NOFILTER); } } break; @@ -1530,6 +1559,8 @@ void SwTextShell::GetState( SfxItemSet &rSet ) GetViewFrame()->GetChildWindow( nWhich ) )); break; case FN_EDIT_HYPERLINK: + case FN_REMOVE_HYPERLINK: + case FN_COPY_HYPERLINK_LOCATION: { SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, @@ -1537,7 +1568,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSh.GetCurAttr(aSet); if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel()) { - rSet.DisableItem(FN_EDIT_HYPERLINK); + rSet.DisableItem(nWhich); } } break; diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 471c549f2179..ea42b91fd9b9 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <hintids.hxx> #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/util/SearchFlags.hpp> @@ -124,11 +123,9 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> - using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::i18n; @@ -690,7 +687,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, pTextView->SetSelection( TextSelection( aPaM, aPaM )); } - SearchOptions aSearchOpt( rSearchItem.GetSearchOptions() ); + util::SearchOptions aSearchOpt( rSearchItem.GetSearchOptions() ); aSearchOpt.Locale = SvxCreateLocale( static_cast< LanguageType >( GetAppLanguage() ) ); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 4bff6735a3e0..d2cb9c01956c 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -937,7 +937,11 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) aUsrPref.SetZoom( 100 ); } if(pDocSh->IsPreview()) + { aUsrPref.SetZoomType( SVX_ZOOM_WHOLEPAGE ); + aUsrPref.SetViewLayoutBookMode( false ); + aUsrPref.SetViewLayoutColumns( 1 ); + } pWrtShell = new SwWrtShell( rDoc, pEditWin, *this, &aUsrPref ); //#97610# creating an SwView from a SwPagePreView needs to // add the ViewShell to the ring of the other ViewShell(s) diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 625b8defba40..5f14993f66e6 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -688,7 +688,29 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) case FN_REDLINE_ACCEPT: GetViewFrame()->ToggleChildWindow(nSlot); break; - + case FN_REDLINE_ACCEPT_DIRECT: + case FN_REDLINE_REJECT_DIRECT: + { + SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE ); + Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True ); + if( pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) ) + { + USHORT nCount = pWrtShell->GetRedlineCount(); + for( USHORT nRedline = 0; nRedline < nCount; ++nRedline ) + { + const SwRedline& rRedline = pWrtShell->GetRedline( nRedline ); + if( *aCntntAtPos.aFnd.pRedl == rRedline ) + { + if( FN_REDLINE_ACCEPT_DIRECT == nSlot ) + pWrtShell->AcceptRedline( nRedline ); + else + pWrtShell->RejectRedline( nRedline ); + break; + } + } + } + } + break; case SID_DOCUMENT_COMPARE: case SID_DOCUMENT_MERGE: { diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index 8990e6da23f3..7563a7b5e779 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -297,6 +297,15 @@ void SwView::GetState(SfxItemSet &rSet) rSet.DisableItem(nWhich); } break; + case FN_REDLINE_ACCEPT_DIRECT: + case FN_REDLINE_REJECT_DIRECT: + { + SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE ); + Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True ); + if( !pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) ) + rSet.DisableItem( nWhich ); + } + break; case FN_THESAURUS_DLG: { SwWrtShell &rSh = GetWrtShell(); |