summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r--sw/source/ui/uiview/makefile.mk3
-rw-r--r--sw/source/ui/uiview/view.cxx2
-rw-r--r--sw/source/ui/uiview/view.hrc4
-rw-r--r--sw/source/ui/uiview/view.src14
-rw-r--r--sw/source/ui/uiview/view0.cxx5
-rw-r--r--sw/source/ui/uiview/view2.cxx42
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx49
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx14
8 files changed, 64 insertions, 69 deletions
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
index cc0fa1ca1392..2aa5e12e2631 100644
--- a/sw/source/ui/uiview/makefile.mk
+++ b/sw/source/ui/uiview/makefile.mk
@@ -54,7 +54,8 @@ EXCEPTIONSFILES= \
$(SLO)$/uivwimp.obj \
$(SLO)$/view.obj \
$(SLO)$/view2.obj \
- $(SLO)$/viewling.obj
+ $(SLO)$/viewling.obj \
+ $(SLO)$/viewmdi.obj \
SLOFILES = \
$(SLO)$/view0.obj \
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 0087471de8d0..f5e84ee1048b 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -674,7 +674,7 @@ void SwView::_CheckReadonlyState()
SID_REDO, SID_REPEAT, SID_PASTE,
FN_PASTESPECIAL, SID_SBA_BRW_INSERT,
SID_BACKGROUND_COLOR, FN_INSERT_BOOKMARK,
- FN_INSERT_SYMBOL, FN_INSERT_SOFT_HYPHEN,
+ SID_CHARMAP, FN_INSERT_SOFT_HYPHEN,
FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_BREAK,
FN_INSERT_LINEBREAK, FN_INSERT_COLUMN_BREAK, FN_INSERT_BREAK_DLG,
FN_DELETE_SENT, FN_DELETE_BACK_SENT, FN_DELETE_WORD,
diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc
index f3061d2e1b3f..2c6d31277f0e 100644
--- a/sw/source/ui/uiview/view.hrc
+++ b/sw/source/ui/uiview/view.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: view.hrc,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.240.1 $
*
* This file is part of OpenOffice.org.
*
@@ -39,8 +39,6 @@
// STR -------------------------------------------------------------------
-#define STR_NOGLOS1 (RC_VIEW_BEGIN + 1)
-#define STR_NOGLOS2 (RC_VIEW_BEGIN + 2)
#define STR_NUM_LEVEL (RC_VIEW_BEGIN + 3)
#define STR_NUM_OUTLINE (RC_VIEW_BEGIN + 4)
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index 277cf8748d7a..beb4f423ba28 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: view.src,v $
- * $Revision: 1.52 $
+ * $Revision: 1.52.110.1 $
*
* This file is part of OpenOffice.org.
*
@@ -136,18 +136,6 @@ InfoBox MSG_SCAN_NOSOURCE
{
Message [ en-US ] = "Source not specified." ;
};
-String STR_NOGLOS1
-{
- Text [ en-US ] = "AutoText for Shortcut '" ;
-};
-String STR_NOGLOS2
-{
- /* ### ACHTUNG: Neuer Text in Resource? ' nicht gefunden. : '' nicht gefunden. */
- /* ### ACHTUNG: Neuer Text in Resource? ' nicht gefunden. : '' nicht gefunden. */
- /* ### ACHTUNG: Neuer Text in Resource? ' nicht gefunden. : '' nicht gefunden. */
- /* ### ACHTUNG: Neuer Text in Resource? ' nicht gefunden. : '' nicht gefunden. */
- Text [ en-US ] = "' not found." ;
-};
String STR_NUM_LEVEL
{
Text [ en-US ] = "Level " ;
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 4936bcb28907..2e9a3bc783e7 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -497,14 +497,13 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
{
SwDocShell *pDocSh = GetDocShell();
SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : NULL;
- SwRootFrm *pRootFrm = pDoc ? pDoc->GetRootFrm() : NULL;
// right now we don't have view options for automatic grammar checking. Thus...
sal_Bool bIsAutoGrammar = sal_False;
aCfg.GetProperty( C2U( UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
- if (pDoc && pRootFrm && bIsAutoGrammar)
- StartGrammarChecking( *pDoc, *pRootFrm );
+ if (pDoc && bIsAutoGrammar)
+ StartGrammarChecking( *pDoc );
}
}
break;
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index c48ad073411e..c063c72c5892 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -119,7 +119,7 @@
#include <pagedesc.hxx>
#include <section.hxx>
#include <usrpref.hxx>
-#include <bookmrk.hxx>
+#include <IMark.hxx>
#include <navipi.hxx>
#include <tox.hxx>
#include <workctrl.hxx>
@@ -1246,7 +1246,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
break;
case SID_ATTR_ZOOM:
{
- if ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
SvxZoomType eZoom = (SvxZoomType) pVOpt->GetZoomType();
@@ -1268,7 +1268,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
break;
case SID_ATTR_VIEWLAYOUT:
{
- if ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
const USHORT nColumns = pVOpt->GetViewLayoutColumns();
@@ -1282,7 +1282,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
break;
case SID_ATTR_ZOOMSLIDER:
{
- if ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
const USHORT nCurrentZoom = pVOpt->GetZoom();
@@ -1566,10 +1566,18 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
{
- USHORT nDest;
- nDest = ((const SfxUInt16Item *)pItem)->GetValue();
- rSh.EnterStdMode();
- rSh.GotoBookmark( nDest );
+ const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
+ const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+ if(nIdx < pMarkAccess->getBookmarksCount())
+ {
+ const IDocumentMarkAccess::const_iterator_t ppBookmark = rSh.getIDocumentMarkAccess()->getBookmarksBegin() + nIdx;
+ rSh.EnterStdMode();
+ rSh.GotoMark( ppBookmark->get() );
+ }
+ else
+ OSL_ENSURE(false,
+ "SwView::ExecuteStatusLine(..)"
+ " - Ignoring out of range bookmark index");
}
}
break;
@@ -1582,13 +1590,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
break;
case SID_ATTR_ZOOM:
{
- if ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SfxItemSet *pSet = 0;
AbstractSvxZoomDialog *pDlg = 0;
if ( pArgs )
pSet = pArgs;
- else if ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ else
{
const SwViewOption& rViewOptions = *rSh.GetViewOptions();
SfxItemSet aCoreSet(pShell->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM, SID_ATTR_VIEWLAYOUT, SID_ATTR_VIEWLAYOUT, 0 );
@@ -1653,7 +1661,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_VIEWLAYOUT:
{
if ( pArgs && !rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
- GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pItem ))
@@ -1676,7 +1684,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_ZOOMSLIDER:
{
- if ( pArgs && GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ))
@@ -1871,6 +1879,8 @@ BOOL SwView::JumpToSwMark( const String& rMark )
sMark.Search( cMarkSeperator, nPos + 1 )) )
nPos = nLastPos;
+ IDocumentMarkAccess::const_iterator_t ppMark;
+ IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
if( STRING_NOTFOUND != nPos &&
( sCmp = sMark.Copy( nPos + 1 ) ).EraseAllChars().Len() )
{
@@ -1919,8 +1929,8 @@ BOOL SwView::JumpToSwMark( const String& rMark )
bRet = TRUE;
}
}
- else if( USHRT_MAX != ( nPos = pWrtShell->FindBookmark( sMark ) ))
- pWrtShell->GotoBookmark( nPos, FALSE, TRUE ), bRet = TRUE;
+ else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
+ pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
@@ -1941,8 +1951,8 @@ BOOL SwView::JumpToSwMark( const String& rMark )
}
}
}
- else if( USHRT_MAX != ( nPos = pWrtShell->FindBookmark( sMark ) ))
- pWrtShell->GotoBookmark( nPos, FALSE, TRUE ), bRet = TRUE;
+ else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
+ pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 08067ee76807..702c0790012f 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -58,7 +58,7 @@
#include <uitool.hxx>
#include <edtwin.hxx>
#include <pagedesc.hxx>
-#include <bookmrk.hxx>
+#include <IMark.hxx>
#include <fldbas.hxx>
#include <workctrl.hxx>
#include <usrpref.hxx>
@@ -88,7 +88,8 @@
#include <postit.hxx>
USHORT SwView::nMoveType = NID_PGE;
-USHORT SwView::nActMark = 0;
+sal_Int32 SwView::nActMark = 0;
+
#define VIEW_IMAGECOLOR COL_LIGHTBLUE
@@ -455,37 +456,37 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_MARK:
{
- // Selektionen aufheben
+ // unselect
rSh.MoveCrsr();
rSh.EnterStdMode();
- const USHORT nBookCnt = rSh.GetBookmarkCnt();
- USHORT nMarkCount = 0;
- USHORT nRealIdx[MAX_MARKS];
- for( USHORT nCount = 0; nCount < nBookCnt; ++nCount )
+
+ // collect navigator reminders
+ IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
+ ::std::vector< const ::sw::mark::IMark* > vNavMarks;
+ for( IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getMarksBegin();
+ ppMark != pMarkAccess->getMarksEnd();
+ ppMark++)
{
- if( rSh.GetBookmark( nCount ).IsMark() )
- {
- nRealIdx[nMarkCount] = nCount;
- ++nMarkCount;
- }
+ if( IDocumentMarkAccess::GetType(**ppMark) == IDocumentMarkAccess::NAVIGATOR_REMINDER )
+ vNavMarks.push_back(ppMark->get());
}
- if (nMarkCount)
+
+ // move
+ if(vNavMarks.size())
{
- if(!bNext)
+ if(bNext)
{
- if (nActMark > 1)
- --nActMark;
- else
- nActMark = nMarkCount;
+ nActMark++;
+ if (nActMark >= MAX_MARKS || nActMark >= static_cast<sal_Int32>(vNavMarks.size()))
+ nActMark = 0;
}
else
{
- ++nActMark;
- if (nActMark > MAX_MARKS || nActMark > nMarkCount)
- nActMark = 1;
+ nActMark--;
+ if (nActMark < 0 || nActMark >= static_cast<sal_Int32>(vNavMarks.size()))
+ nActMark = vNavMarks.size()-1;
}
-
- rSh.GotoBookmark( nRealIdx[nActMark - 1] );
+ rSh.GotoMark(vNavMarks[nActMark]);
}
}
break;
@@ -701,7 +702,7 @@ void SwView::SetMoveType(USHORT nSet)
/*-----------------20.06.97 11:18-------------------
--------------------------------------------------*/
-void SwView::SetActMark(BYTE nSet)
+void SwView::SetActMark(sal_Int32 nSet)
{
nActMark = nSet;
}
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index a6369123f5d0..c5602411f324 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -106,7 +106,7 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
{
Window* pWin;
if( pSrchDlg && pSrchDlg->IsVisible() )
- pWin = pSrchDlg;
+ pWin = LAYOUT_THIS_WINDOW (pSrchDlg);
else
pWin = 0;
return pWin;
@@ -168,7 +168,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
if ( pWrp )
{
- pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg = static_cast <SvxSearchDialog*> (pWrp->getDialog ());
// die Search / Replace -Items merken wir uns
const SearchAttrItemList* pList = pSrchDlg->GetSearchItemList();
if( pList && pList->Count() )
@@ -189,7 +189,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
SwView::SetMoveType(NID_SRCH_REP);
if ( pWrp )
{
- pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg = static_cast <SvxSearchDialog*> (pWrp->getDialog ());
}
else
pSrchDlg = 0;
@@ -493,7 +493,7 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
- pSrchDlg = pWrp ? (SvxSearchDialog*)(pWrp->GetWindow()) : 0;
+ pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0;
// falls Startposition am Dokumentende / -anfang
if (aOpts.bDontWrap)
@@ -728,19 +728,17 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
return nFound;
}
-
-Dialog* SwView::GetSearchDialog()
+LAYOUT_NS Dialog* SwView::GetSearchDialog()
{
const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId);
if ( pWrp )
- pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg = pWrp->getDialog ();
else
pSrchDlg = 0;
return pSrchDlg;
}
-
void SwView::StateSearch(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);