Kaydet (Commit) de34ef76 authored tarafından Matthias Freund's avatar Matthias Freund Kaydeden (comit) Miklos Vajna

fdo#39468 Comment translation GER-ENG in sw/source/ui/uiview (Part 2)

Translations and cleanups.

Change-Id: I1894cf896ebfcbbad16323f620c0e986670279d1
Reviewed-on: https://gerrit.libreoffice.org/4192Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst 92207231
...@@ -41,10 +41,8 @@ SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) : ...@@ -41,10 +41,8 @@ SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) :
SwScrollbar::~SwScrollbar() {} SwScrollbar::~SwScrollbar() {}
/*------------------------------------------------------------------------ // Will be called after a change of the document size
Beschreibung: wird nach einer Aenderung der Dokumentgroesse gerufen, um den // to refresh the range of the scrollbars.
Range des Scrollbars neu einzustellen.
------------------------------------------------------------------------*/
void SwScrollbar::DocSzChgd( const Size &rSize ) void SwScrollbar::DocSzChgd( const Size &rSize )
{ {
...@@ -55,11 +53,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize ) ...@@ -55,11 +53,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
SetPageSize( nVisSize * 77 / 100 ); SetPageSize( nVisSize * 77 / 100 );
} }
/*------------------------------------------------------------------------ // Will be called after a change of the visible view section.
Beschreibung: wird nach einer Veraenderung des sichtbaren Ausschnittes
gerufen.
------------------------------------------------------------------------*/
void SwScrollbar::ViewPortChgd( const Rectangle &rRect ) void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
{ {
...@@ -104,11 +98,11 @@ void SwScrollbar::SetAuto(sal_Bool bSet) ...@@ -104,11 +98,11 @@ void SwScrollbar::SetAuto(sal_Bool bSet)
{ {
bAuto = bSet; bAuto = bSet;
// automatisch versteckt - dann anzeigen // hide autmatically - automatisch versteckt - then show
if(!bAuto && bVisible && !ScrollBar::IsVisible()) if(!bAuto && bVisible && !ScrollBar::IsVisible())
ExtendedShow(sal_True); ExtendedShow(sal_True);
else if(bAuto) else if(bAuto)
AutoShow(); // oder automatisch verstecken AutoShow(); // or hide automatically
} }
} }
......
...@@ -102,7 +102,7 @@ using ::com::sun::star::util::SearchOptions; ...@@ -102,7 +102,7 @@ using ::com::sun::star::util::SearchOptions;
#define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL)) #define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL))
// Druckraender -> wie Basic - Ide // Printing margins -> like Basic - Ide
#define LMARGPRN 1700 #define LMARGPRN 1700
#define RMARGPRN 900 #define RMARGPRN 900
#define TMARGPRN 2000 #define TMARGPRN 2000
...@@ -143,7 +143,7 @@ static void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt1 ...@@ -143,7 +143,7 @@ static void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt1
long nFontHeight = rOutDev.GetTextHeight(); long nFontHeight = rOutDev.GetTextHeight();
// 1.Border => Strich, 2+3 Border = Freiraum. // 1.Border => Line, 2+3 Border = Space.
long nYTop = TMARGPRN-3*nBorder-nFontHeight; long nYTop = TMARGPRN-3*nBorder-nFontHeight;
long nXLeft = nLeftMargin-nBorder; long nXLeft = nLeftMargin-nBorder;
...@@ -202,14 +202,14 @@ static void lcl_ConvertTabsToSpaces( String& rLine ) ...@@ -202,14 +202,14 @@ static void lcl_ConvertTabsToSpaces( String& rLine )
{ {
if ( rLine.GetChar(nPos) == '\t' ) if ( rLine.GetChar(nPos) == '\t' )
{ {
// Nicht 4 Blanks, sondern an 4er TabPos: // Not 4 blanks, but on 4th TabPos:
OUStringBuffer aBlanker; OUStringBuffer aBlanker;
comphelper::string::padToLength(aBlanker, ( 4 - ( nPos % 4 ) ), ' '); comphelper::string::padToLength(aBlanker, ( 4 - ( nPos % 4 ) ), ' ');
rLine.Erase( nPos, 1 ); rLine.Erase( nPos, 1 );
rLine.Insert(aBlanker.makeStringAndClear(), nPos); rLine.Insert(aBlanker.makeStringAndClear(), nPos);
nMax = rLine.Len(); nMax = rLine.Len();
} }
nPos++; // Nicht optimal, falls Tab, aber auch nicht verkehrt... nPos++; // Not optimally, if tab, but not wrong...
} }
} }
} }
...@@ -227,7 +227,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) : ...@@ -227,7 +227,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SwSrcView::~SwSrcView() SwSrcView::~SwSrcView()
{ {
SwDocShell* pDocShell = GetDocShell(); SwDocShell* pDocShell = GetDocShell();
OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?"); OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Why no WebDocShell?");
const TextSelection& rSel = aEditWin.GetTextView()->GetSelection(); const TextSelection& rSel = aEditWin.GetTextView()->GetSelection();
((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) ); ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) );
...@@ -256,8 +256,8 @@ void SwSrcView::Init() ...@@ -256,8 +256,8 @@ void SwSrcView::Init()
SetName(OUString("Source")); SetName(OUString("Source"));
SetWindow( &aEditWin ); SetWindow( &aEditWin );
SwDocShell* pDocShell = GetDocShell(); SwDocShell* pDocShell = GetDocShell();
// wird das Doc noch geladen, dann muss die DocShell das Load // If the doc is still loading, then the DocShell must fire up
// anwerfen, wenn das Laden abgeschlossen ist // the Load if the loading is completed.
if(!pDocShell->IsLoading()) if(!pDocShell->IsLoading())
Load(pDocShell); Load(pDocShell);
else else
...@@ -364,7 +364,7 @@ void SwSrcView::Execute(SfxRequest& rReq) ...@@ -364,7 +364,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
const SfxItemSet* pTmpArgs = rReq.GetArgs(); const SfxItemSet* pTmpArgs = rReq.GetArgs();
sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 ); sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
OSL_ENSURE( nWhich, "Wich fuer SearchItem ?" ); OSL_ENSURE( nWhich, "Which for SearchItem ?" );
const SfxPoolItem& rItem = pTmpArgs->Get( nWhich ); const SfxPoolItem& rItem = pTmpArgs->Get( nWhich );
SetSearchItem( (const SvxSearchItem&)rItem); SetSearchItem( (const SvxSearchItem&)rItem);
StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() ); StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() );
...@@ -679,7 +679,7 @@ sal_Int32 SwSrcView::PrintSource( ...@@ -679,7 +679,7 @@ sal_Int32 SwSrcView::PrintSource(
if (!pOutDev || nPage <= 0) if (!pOutDev || nPage <= 0)
return 0; return 0;
//! this a lgorithm for printing the n-th page is very poor since it //! This logarithm for printing the n-th page is very poor since it
//! needs to go over the text of all previous pages to get to the correct one. //! needs to go over the text of all previous pages to get to the correct one.
//! But since HTML source code is expected to be just a small number of pages //! But since HTML source code is expected to be just a small number of pages
//! even this poor algorithm should be enough... //! even this poor algorithm should be enough...
...@@ -704,7 +704,7 @@ sal_Int32 SwSrcView::PrintSource( ...@@ -704,7 +704,7 @@ sal_Int32 SwSrcView::PrintSource(
aPaperSz.Width() -= (LMARGPRN + RMARGPRN); aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
aPaperSz.Height() -= (TMARGPRN + BMARGPRN); aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen... // nLinepPage is not true, if lines have to be wrapped...
sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight); sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight);
sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth(OUString('X'))); sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth(OUString('X')));
sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() ); sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() );
...@@ -712,7 +712,7 @@ sal_Int32 SwSrcView::PrintSource( ...@@ -712,7 +712,7 @@ sal_Int32 SwSrcView::PrintSource(
sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 ); sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 );
sal_uInt16 nCurPage = 1; sal_uInt16 nCurPage = 1;
// Header drucken... // Print header...
if (!bCalcNumPagesOnly && nPage == nCurPage) if (!bCalcNumPagesOnly && nPage == nCurPage)
lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle ); lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
const Point aStartPos( LMARGPRN, TMARGPRN ); const Point aStartPos( LMARGPRN, TMARGPRN );
...@@ -757,7 +757,7 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -757,7 +757,7 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
) )
) )
{ {
// Broadcast kommt nur einmal! // Broadcast only comes once!
const SwDocShell* pDocSh = GetDocShell(); const SwDocShell* pDocSh = GetDocShell();
const sal_Bool bReadonly = pDocSh->IsReadOnly(); const sal_Bool bReadonly = pDocSh->IsReadOnly();
aEditWin.SetReadonly(bReadonly); aEditWin.SetReadonly(bReadonly);
...@@ -849,10 +849,10 @@ void SwSrcView::Load(SwDocShell* pDocShell) ...@@ -849,10 +849,10 @@ void SwSrcView::Load(SwDocShell* pDocShell)
eLoadEncoding = eDestEnc; eLoadEncoding = eDestEnc;
if(bDocModified) if(bDocModified)
pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt pDocShell->SetModified();// The flag will be reset in between times.
// AutoLoad abschalten // Disable AutoLoad
pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False); pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False);
OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?"); OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Why no WebDocShell?");
sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara(); sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
aEditWin.SetStartLine(nLine); aEditWin.SetStartLine(nLine);
aEditWin.GetTextEngine()->ResetUndo(); aEditWin.GetTextEngine()->ResetUndo();
......
...@@ -41,14 +41,13 @@ SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObj ...@@ -41,14 +41,13 @@ SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObj
void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect ) void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
{ {
//Der Server moechte die Clientgrosse verandern. // The server wants to change the client size.
//Wir stecken die Wunschgroesse in die Core. Die Attribute des Rahmens // We put the desired size in the core. The attributes of the frame
//werden auf den Wunschwert eingestellt. Dieser Wert wird also auch an // are set to the desired value. This value will be passed on to the
//den InPlaceClient weitergegeben. // InPlaceClient.
//Die Core aktzeptiert bzw. formatiert die eingestellten Werte nicht // The core accepts or formats the adjusted values ​​not necessarily.
//zwangslaeufig. Wenn der Ole-Frm formatiert wurde wird das CalcAndSetScale() // If the Ole-Frm is formatted, then the CalcAndSetScale() of the WrtShell
//der WrtShell gerufen. Dort wird ggf. die Scalierung des SwOleClient // will be called. There the scaling of the SwOleClient is set if necessary.
//eingestellt.
SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell(); SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell();
...@@ -101,16 +100,17 @@ void SwOleClient::ViewChanged() ...@@ -101,16 +100,17 @@ void SwOleClient::ViewChanged()
{ {
// the iconified object seems not to need such a scaling handling // the iconified object seems not to need such a scaling handling
// since the replacement image and the size a completely controlled by the container // since the replacement image and the size a completely controlled by the container
// TODO/LATER: when the icon exchange is implemented the scaling handling might be required again here // TODO/LATER: when the icon exchange is implemented the scaling handling
// might be required again here
return; return;
} }
SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell(); SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell();
//Einstellen der Groesse des Objektes in der Core. Die Scalierung muss // Adjust the size of the object in the core. The Scaling must
//beruecksichtigt werden. Rueckwirkung auf das Objekt werden von // be considered. Repercussions on the object are considered by
//CalcAndSetScale() der WrtShell beruecksichtig, wenn die Groesse/Pos des // CalcAndSetScale() of the WrtShell if the size / position of
//Rahmens in der Core sich veraendert. // the frame in the core changes.
// TODO/LEAN: getMapUnit can switch object to running state // TODO/LEAN: getMapUnit can switch object to running state
awt::Size aSz; awt::Size aSz;
...@@ -130,8 +130,8 @@ void SwOleClient::ViewChanged() ...@@ -130,8 +130,8 @@ void SwOleClient::ViewChanged()
Size aVisSize( aSz.Width, aSz.Height ); Size aVisSize( aSz.Width, aSz.Height );
// solange keine vernuenftige Size vom Object kommt, // As long as from the object comes no reasonable size
// kann nichts skaliert werden // nothing can be scaled.
if( !aVisSize.Width() || !aVisSize.Height() ) if( !aVisSize.Width() || !aVisSize.Height() )
return; return;
...@@ -146,7 +146,7 @@ void SwOleClient::ViewChanged() ...@@ -146,7 +146,7 @@ void SwOleClient::ViewChanged()
aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight(); aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight();
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize ); SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
rSh.LockView( sal_True ); //Scrollen im EndAction verhindern rSh.LockView( sal_True ); // Prevent scrolling in the EndAction
rSh.StartAllAction(); rSh.StartAllAction();
rSh.RequestObjectResize( aRect, GetObject() ); rSh.RequestObjectResize( aRect, GetObject() );
rSh.EndAllAction(); rSh.EndAllAction();
......
...@@ -118,9 +118,7 @@ extern bool bNoInterrupt; // in mainwn.cxx ...@@ -118,9 +118,7 @@ extern bool bNoInterrupt; // in mainwn.cxx
#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \ #define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \
SFX_VIEW_HAS_PRINTOPTIONS) SFX_VIEW_HAS_PRINTOPTIONS)
/*-------------------------------------------------------------------- // Statics
Beschreibung: Statics
--------------------------------------------------------------------*/
int bDocSzUpdated = 1; int bDocSzUpdated = 1;
...@@ -168,10 +166,8 @@ void SwView::ImpSetVerb( int nSelType ) ...@@ -168,10 +166,8 @@ void SwView::ImpSetVerb( int nSelType )
} }
} }
/*-------------------------------------------------------------------- // Called by the SwEditWin when it gets the focus.
Description:
called by the SwEditWin when it gets the focus
--------------------------------------------------------------------*/
void SwView::GotFocus() const void SwView::GotFocus() const
{ {
// if we got the focus, and the form shell *is* on the top of the dispatcher // if we got the focus, and the form shell *is* on the top of the dispatcher
...@@ -203,12 +199,9 @@ void SwView::GotFocus() const ...@@ -203,12 +199,9 @@ void SwView::GotFocus() const
} }
} }
/*-------------------------------------------------------------------- // called by the FormShell when a form control is focused. This is
Description: // a request to put the form shell on the top of the dispatcher stack
called by the FormShell when a form control is focused. This is
a request to put the form shell on the top of the dispatcher
stack
--------------------------------------------------------------------*/
IMPL_LINK_NOARG(SwView, FormControlActivated) IMPL_LINK_NOARG(SwView, FormControlActivated)
{ {
// if a form control has been activated, and the form shell is not on the top // if a form control has been activated, and the form shell is not on the top
...@@ -231,20 +224,19 @@ IMPL_LINK_NOARG(SwView, FormControlActivated) ...@@ -231,20 +224,19 @@ IMPL_LINK_NOARG(SwView, FormControlActivated)
void SwView::SelectShell() void SwView::SelectShell()
{ {
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// Achtung: SelectShell fuer die WebView mitpflegen // Attention: Maintain the SelectShell for the WebView additionally
//
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if(m_bInDtor) if(m_bInDtor)
return; return;
// Entscheidung, ob UpdateTable gerufen werden muss // Decision if the UpdateTable has to be called
sal_Bool bUpdateTable = sal_False; sal_Bool bUpdateTable = sal_False;
const SwFrmFmt* pCurTableFmt = m_pWrtShell->GetTableFmt(); const SwFrmFmt* pCurTableFmt = m_pWrtShell->GetTableFmt();
if(pCurTableFmt && pCurTableFmt != m_pLastTableFormat) if(pCurTableFmt && pCurTableFmt != m_pLastTableFormat)
{ {
bUpdateTable = sal_True; // kann erst spaeter ausgefuehrt werden bUpdateTable = sal_True; // can only be executed later
} }
m_pLastTableFormat = pCurTableFmt; m_pLastTableFormat = pCurTableFmt;
...@@ -260,7 +252,7 @@ void SwView::SelectShell() ...@@ -260,7 +252,7 @@ void SwView::SelectShell()
GetViewFrame()->GetBindings().InvalidateAll( sal_False ); GetViewFrame()->GetBindings().InvalidateAll( sal_False );
if ( m_nSelectionType & nsSelectionType::SEL_OLE || if ( m_nSelectionType & nsSelectionType::SEL_OLE ||
m_nSelectionType & nsSelectionType::SEL_GRF ) m_nSelectionType & nsSelectionType::SEL_GRF )
//Fuer Grafiken und OLE kann sich natuerlich das Verb aendern! // For graphs and OLE the verb can be modified of course!
ImpSetVerb( nNewSelectionType ); ImpSetVerb( nNewSelectionType );
} }
else else
...@@ -271,9 +263,8 @@ void SwView::SelectShell() ...@@ -271,9 +263,8 @@ void SwView::SelectShell()
if ( m_pShell ) if ( m_pShell )
{ {
rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen rDispatcher.Flush(); // Really erase all cached shells
//Remember to the old selection which toolbar was visible
//Zur alten Selektion merken welche Toolbar sichtbar war
sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT )); sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
if ( nId ) if ( nId )
pBarCfg->SetTopToolbar( m_nSelectionType, nId ); pBarCfg->SetTopToolbar( m_nSelectionType, nId );
...@@ -439,10 +430,9 @@ void SwView::SelectShell() ...@@ -439,10 +430,9 @@ void SwView::SelectShell()
GetEditWin().SetInputContext( aCntxt ); GetEditWin().SetInputContext( aCntxt );
} }
//Zur neuen Selektion die Toolbar aktivieren, die auch beim letzten Mal // Activate the toolbar to the new selection which also was active last time.
//aktiviert war // Before a flush () must be, but does not affect the UI according to MBA and
//Vorher muss ein Flush() sein, betrifft aber lt. MBA nicht das UI und ist // is not a performance problem.
//kein Performance-Problem
// TODO/LATER: maybe now the Flush() command is superfluous?! // TODO/LATER: maybe now the Flush() command is superfluous?!
rDispatcher.Flush(); rDispatcher.Flush();
...@@ -455,7 +445,7 @@ void SwView::SelectShell() ...@@ -455,7 +445,7 @@ void SwView::SelectShell()
m_pFormShell->SetView(PTR_CAST(FmFormView, pDView)); m_pFormShell->SetView(PTR_CAST(FmFormView, pDView));
} }
//Guenstiger Zeitpunkt fuer die Kommunikation mit OLE-Objekten? // Opportune time for the communication with OLE objects?
if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() ) if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
GetDocShell()->GetDoc()->PrtOLENotify( sal_False ); GetDocShell()->GetDoc()->PrtOLENotify( sal_False );
...@@ -466,11 +456,11 @@ void SwView::SelectShell() ...@@ -466,11 +456,11 @@ void SwView::SelectShell()
GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged(); GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
} }
//Zusammenspiel: AttrChangedNotify() und TimeoutHdl. // Interaction: AttrChangedNotify() and TimeoutHdl.
//Falls noch Actions offen sind keine Aktualisierung, da der // No Update if actions are still open, since the cursor on the core side
//Cursor auf der Core-Seite im Wald stehen kann. // can be somewhere in no man's land.
//Da wir aber keine Stati mehr liefern koennen und wollen locken wir // But since we can no longer supply status and we want instead lock
//stattdessen den Dispatcher. // the dispatcher.
extern "C" extern "C"
{ {
...@@ -485,8 +475,7 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify) ...@@ -485,8 +475,7 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify)
if ( GetEditWin().IsChainMode() ) if ( GetEditWin().IsChainMode() )
GetEditWin().SetChainMode( sal_False ); GetEditWin().SetChainMode( sal_False );
//Opt: Nicht wenn PaintLocked. Beim Unlock wird dafuer nocheinmal ein //Opt: Not if PaintLocked. During unlock a notify will be once more triggered.
//Notify ausgeloest.
if( !m_pWrtShell->IsPaintLocked() && !bNoInterrupt && if( !m_pWrtShell->IsPaintLocked() && !bNoInterrupt &&
GetDocShell()->IsReadOnly() ) GetDocShell()->IsReadOnly() )
_CheckReadonlyState(); _CheckReadonlyState();
...@@ -563,11 +552,11 @@ IMPL_LINK_NOARG(SwView, TimeoutHdl) ...@@ -563,11 +552,11 @@ IMPL_LINK_NOARG(SwView, TimeoutHdl)
void SwView::_CheckReadonlyState() void SwView::_CheckReadonlyState()
{ {
SfxDispatcher &rDis = GetDispatcher(); SfxDispatcher &rDis = GetDispatcher();
//Um erkennen zu koennen ob bereits disabled ist! // To be able to recognize if it is already disabled!
SfxItemState eStateRO, eStateProtAll; SfxItemState eStateRO, eStateProtAll;
const SfxPoolItem *pItem; const SfxPoolItem *pItem;
// von einem nur uns bekannten Slot den Status abfragen. // Query the status from a slot which is only known to us.
// Ansonsten kennen andere den Slot; wie z.B. die BasidIde // Otherwise the slot is known from other; like the BasidIde
eStateRO = rDis.QueryState( FN_INSERT_BOOKMARK, pItem ); eStateRO = rDis.QueryState( FN_INSERT_BOOKMARK, pItem );
eStateProtAll = rDis.QueryState( FN_EDIT_REGION, pItem ); eStateProtAll = rDis.QueryState( FN_EDIT_REGION, pItem );
sal_Bool bChgd = sal_False; sal_Bool bChgd = sal_False;
...@@ -661,10 +650,10 @@ void SwView::_CheckReadonlySelection() ...@@ -661,10 +650,10 @@ void SwView::_CheckReadonlySelection()
if( (SW_DISABLE_ON_PROTECTED_CURSOR & nDisableFlags ) != if( (SW_DISABLE_ON_PROTECTED_CURSOR & nDisableFlags ) !=
(SW_DISABLE_ON_PROTECTED_CURSOR & rDis.GetDisableFlags() ) ) (SW_DISABLE_ON_PROTECTED_CURSOR & rDis.GetDisableFlags() ) )
{ {
// zusaetzlich am Window den InputContext umsetzen, damit in // Additionally move at the Window the InputContext, so that
// japanischen / chinesischen Versionen die externe Eingabe // in japanese / chinese versions the external input will be
// ab-/angeschaltet wird. Das aber nur wenn auch die richtige // turned on or off. This but only if the correct shell is on
// Shell auf dem Stack steht. // the stack.
switch( m_pViewImpl->GetShellMode() ) switch( m_pViewImpl->GetShellMode() )
{ {
case SHELL_MODE_TEXT: case SHELL_MODE_TEXT:
...@@ -672,12 +661,12 @@ void SwView::_CheckReadonlySelection() ...@@ -672,12 +661,12 @@ void SwView::_CheckReadonlySelection()
case SHELL_MODE_TABLE_TEXT: case SHELL_MODE_TABLE_TEXT:
case SHELL_MODE_TABLE_LIST_TEXT: case SHELL_MODE_TABLE_LIST_TEXT:
{ {
// temporaere Loesung!!! Sollte bei jeder Cursorbewegung // Temporary solution!!! Should set the font of the current insertion point
// den Font von der akt. Einfuegeposition setzen, also ausserhalb // at each cursor movement, so outside of this "if". But TH does not
// dieses if's. Aber TH wertet den Font zur Zeit nicht aus und // evaluates the font at this time and the "purchase" appears to me
// das besorgen erscheint mir hier zu teuer zu sein. // as too expensive.
// Ausserdem haben wir keinen Font, sondern nur Attribute aus denen // Moreover, we don't have a font, but only attributes from which the
// die Textformatierung dann den richtigen Font zusammen baut. // text formatting and the correct font will be build together.
InputContext aCntxt( GetEditWin().GetInputContext() ); InputContext aCntxt( GetEditWin().GetInputContext() );
aCntxt.SetOptions( SW_DISABLE_ON_PROTECTED_CURSOR & nDisableFlags aCntxt.SetOptions( SW_DISABLE_ON_PROTECTED_CURSOR & nDisableFlags
...@@ -830,7 +819,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -830,7 +819,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
else else
aUsrPref.setBrowseMode( rDoc.get(IDocumentSettingAccess::BROWSE_MODE) ); aUsrPref.setBrowseMode( rDoc.get(IDocumentSettingAccess::BROWSE_MODE) );
//Fuer den BrowseMode wollen wir keinen Factor uebernehmen. //For the BrowseMode we do not assume a factor.
if( aUsrPref.getBrowseMode() && aUsrPref.GetZoomType() != SVX_ZOOM_PERCENT ) if( aUsrPref.getBrowseMode() && aUsrPref.GetZoomType() != SVX_ZOOM_PERCENT )
{ {
aUsrPref.SetZoomType( SVX_ZOOM_PERCENT ); aUsrPref.SetZoomType( SVX_ZOOM_PERCENT );
...@@ -881,8 +870,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -881,8 +870,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// isn't reset, if document is already modified. // isn't reset, if document is already modified.
const bool bIsDocModified = m_pWrtShell->GetDoc()->IsModified(); const bool bIsDocModified = m_pWrtShell->GetDoc()->IsModified();
// damit unter anderem das HRuler im // Thus among other things, the HRuler is not displayed in the read-only case.
// ReadonlyFall nicht angezeigt wird
aUsrPref.SetReadonly( m_pWrtShell->GetViewOptions()->IsReadonly() ); aUsrPref.SetReadonly( m_pWrtShell->GetViewOptions()->IsReadonly() );
// no margin for OLE! // no margin for OLE!
...@@ -892,9 +880,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -892,9 +880,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
m_pWrtShell->SetBrowseBorder( aBrwsBorder ); m_pWrtShell->SetBrowseBorder( aBrwsBorder );
// Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber // In CTOR no shell changes may take place, which must be temporarily stored
// den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX // with the timer. Otherwise, the SFX removes them from the stack!
// sie wieder vom Stack!
bool bOld = bNoInterrupt; bool bOld = bNoInterrupt;
bNoInterrupt = true; bNoInterrupt = true;
...@@ -925,18 +912,18 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -925,18 +912,18 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
m_pHRuler->SetCharWidth( 371 ); // default character width m_pHRuler->SetCharWidth( 371 ); // default character width
m_pVRuler->SetLineHeight( 551 ); // default line height m_pVRuler->SetLineHeight( 551 ); // default line height
// DocShell setzen // Set DocShell
pDocSh->SetView( this ); pDocSh->SetView( this );
SW_MOD()->SetView( this ); SW_MOD()->SetView( this );
m_pPostItMgr = new SwPostItMgr(this); m_pPostItMgr = new SwPostItMgr(this);
// Die DocSize erfragen und verarbeiten. Ueber die Handler konnte // Check and process the DocSize. Via the handler, the shell could not
// die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase // be found, because the shell is not known in the SFX management
// nicht in der SFX-Verwaltung bekannt ist. // within the CTOR phase.
DocSzChgd( m_pWrtShell->GetDocSize() ); DocSzChgd( m_pWrtShell->GetDocSize() );
// AttrChangedNotify Link setzen // Set AttrChangedNotify link
m_pWrtShell->SetChgLnk(LINK(this, SwView, AttrChangedNotify)); m_pWrtShell->SetChgLnk(LINK(this, SwView, AttrChangedNotify));
if( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && if( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
...@@ -981,22 +968,22 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -981,22 +968,22 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
m_pWrtShell->GetDoc()->SetUpdateExpFldStat( sal_False ); m_pWrtShell->GetDoc()->SetUpdateExpFldStat( sal_False );
} }
// ggfs. alle Verzeichnisse updaten: // Update all tables if necessary:
if( m_pWrtShell->GetDoc()->IsUpdateTOX() ) if( m_pWrtShell->GetDoc()->IsUpdateTOX() )
{ {
SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() ); SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aSfxRequest ); Execute( aSfxRequest );
m_pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // wieder zurueck setzen m_pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // reset again
m_pWrtShell->SttEndDoc(sal_True); m_pWrtShell->SttEndDoc(sal_True);
} }
// kein ResetModified, wenn es schone eine View auf dieses Doc gibt // No ResetModified, if there is already a view to this doc.
SfxViewFrame* pVFrame = GetViewFrame(); SfxViewFrame* pVFrame = GetViewFrame();
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh); SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
// zur Zeit(360) wird die View erst nach dem Ctor eingetragen // Currently(360) the view is registered firstly after the CTOR,
// der folgende Ausdruck funktioniert auch, wenn sich das aendert // the following expression is also working if this changes.
// wenn per Undo nicht mehr die Modifizierung aufhebar ist, // If the modification cannot be canceled by undo, then do NOT set
// so setze das Modified NICHT zurueck. // the modify back.
// no reset of modified state, if document // no reset of modified state, if document
// was already modified. // was already modified.
if (!m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() && if (!m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
...@@ -1008,7 +995,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -1008,7 +995,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
bNoInterrupt = bOld; bNoInterrupt = bOld;
// wird ein GlobalDoc neu angelegt, soll auch der Navigator erzeugt werden // If a new GlobalDoc will be created, the navigator will also be generated.
if( pDocSh->IsA(SwGlobalDocShell::StaticType()) && if( pDocSh->IsA(SwGlobalDocShell::StaticType()) &&
!pVFrame->GetChildWindow( SID_NAVIGATOR )) !pVFrame->GetChildWindow( SID_NAVIGATOR ))
{ {
...@@ -1079,7 +1066,7 @@ SwView::~SwView() ...@@ -1079,7 +1066,7 @@ SwView::~SwView()
EndListening(*GetDocShell()); EndListening(*GetDocShell());
delete m_pScrollFill; delete m_pScrollFill;
delete m_pWrtShell; delete m_pWrtShell;
m_pWrtShell = 0; // Auf 0 setzen, damit folgende DToren nicht drauf zugreifen m_pWrtShell = 0; // Set to 0, so that it is not accessable by the following dtors cannot.
m_pShell = 0; m_pShell = 0;
delete m_pHScrollbar; delete m_pHScrollbar;
delete m_pVScrollbar; delete m_pVScrollbar;
...@@ -1101,14 +1088,13 @@ SwDocShell* SwView::GetDocShell() ...@@ -1101,14 +1088,13 @@ SwDocShell* SwView::GetDocShell()
return PTR_CAST(SwDocShell, pDocShell); return PTR_CAST(SwDocShell, pDocShell);
} }
/*-------------------------------------------------------------------- // Remember CursorPos
Beschreibung: CursorPos merken
--------------------------------------------------------------------*/
void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse ) void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse )
{ {
//Das Browse-Flag wird vom Sfx durchgereicht, wenn Dokumente gebrowsed // The browse flag will be passed from Sfx when documents are browsed
//werden (nicht zu verwechseln mit dem BrowseMode). // (not to be confused with the BrowseMode).
//Die dann gespeicherten Daten sind nicht persistent!! // Then that stored data are not persistent!
const SwRect& rRect = m_pWrtShell->GetCharRect(); const SwRect& rRect = m_pWrtShell->GetCharRect();
const Rectangle& rVis = GetVisArea(); const Rectangle& rVis = GetVisArea();
...@@ -1133,9 +1119,8 @@ void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse ) ...@@ -1133,9 +1119,8 @@ void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse )
rUserData += FRMTYPE_NONE == m_pWrtShell->GetSelFrmType() ? '0' : '1'; rUserData += FRMTYPE_NONE == m_pWrtShell->GetSelFrmType() ? '0' : '1';
} }
/*-------------------------------------------------------------------- // Set CursorPos
Beschreibung: CursorPos setzen
--------------------------------------------------------------------*/
static bool lcl_IsOwnDocument( SwView& rView ) static bool lcl_IsOwnDocument( SwView& rView )
{ {
uno::Reference<document::XDocumentPropertiesSupplier> xDPS( uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
...@@ -1153,8 +1138,8 @@ static bool lcl_IsOwnDocument( SwView& rView ) ...@@ -1153,8 +1138,8 @@ static bool lcl_IsOwnDocument( SwView& rView )
void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse ) void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
{ {
if ( comphelper::string::getTokenCount(rUserData, ';') > 1 && if ( comphelper::string::getTokenCount(rUserData, ';') > 1 &&
//Fuer Dokumente ohne Layout nur im OnlineLayout oder beim // For document without layout only in the onlinelayout or
//Forward/Backward // while forward/backward
(!m_pWrtShell->IsNewLayout() || m_pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) ) (!m_pWrtShell->IsNewLayout() || m_pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )
{ {
bool bIsOwnDocument = lcl_IsOwnDocument( *this ); bool bIsOwnDocument = lcl_IsOwnDocument( *this );
...@@ -1163,8 +1148,8 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse ) ...@@ -1163,8 +1148,8 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
sal_Int32 nPos = 0; sal_Int32 nPos = 0;
// Nein, es ist *keine* gute Idee GetToken gleich im Point-Konstr. // No it is *no* good idea to call GetToken within Point-Konstr. immediately,
// aufzurufen, denn welcher Parameter wird zuerst ausgewertet? // because which parameter is evaluated first?
long nX = rUserData.GetToken( 0, ';', nPos ).ToInt32(), long nX = rUserData.GetToken( 0, ';', nPos ).ToInt32(),
nY = rUserData.GetToken( 0, ';', nPos ).ToInt32(); nY = rUserData.GetToken( 0, ';', nPos ).ToInt32();
Point aCrsrPos( nX, nY ); Point aCrsrPos( nX, nY );
...@@ -1583,8 +1568,8 @@ ErrCode SwView::DoVerb( long nVerb ) ...@@ -1583,8 +1568,8 @@ ErrCode SwView::DoVerb( long nVerb )
return ERRCODE_NONE; return ERRCODE_NONE;
} }
/* only return sal_True for a text selection // only return sal_True for a text selection
*/
sal_Bool SwView::HasSelection( sal_Bool bText ) const sal_Bool SwView::HasSelection( sal_Bool bText ) const
{ {
return bText ? GetWrtShell().SwCrsrShell::HasSelection() return bText ? GetWrtShell().SwCrsrShell::HasSelection()
...@@ -1636,7 +1621,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -1636,7 +1621,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break; break;
case SFX_HINT_MODECHANGED: case SFX_HINT_MODECHANGED:
{ {
// Modalmodus-Umschaltung? // Modal mode change-over?
sal_Bool bModal = GetDocShell()->IsInModalMode(); sal_Bool bModal = GetDocShell()->IsInModalMode();
m_pHRuler->SetActive( !bModal ); m_pHRuler->SetActive( !bModal );
m_pVRuler->SetActive( !bModal ); m_pVRuler->SetActive( !bModal );
...@@ -1659,7 +1644,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -1659,7 +1644,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else else
KillTab(); KillTab();
bool bReadonly = GetDocShell()->IsReadOnly(); bool bReadonly = GetDocShell()->IsReadOnly();
// if document is to be opened in alive-mode then this has to be regarded while switching from readonly-mode to edit-mode // if document is to be opened in alive-mode then this has to be
// regarded while switching from readonly-mode to edit-mode
if( !bReadonly ) if( !bReadonly )
{ {
SwDrawDocument * pDrawDoc = 0; SwDrawDocument * pDrawDoc = 0;
...@@ -1827,9 +1813,8 @@ void SwView::NotifyDBChanged() ...@@ -1827,9 +1813,8 @@ void SwView::NotifyDBChanged()
GetViewImpl()->GetUNOObject_Impl()->NotifyDBChanged(); GetViewImpl()->GetUNOObject_Impl()->NotifyDBChanged();
} }
/*-------------------------------------------------------------------- // Printing
Printing
--------------------------------------------------------------------*/
SfxObjectShellLock SwView::CreateTmpSelectionDoc() SfxObjectShellLock SwView::CreateTmpSelectionDoc()
{ {
SwXTextView *const pImpl = GetViewImpl()->GetUNOObject_Impl(); SwXTextView *const pImpl = GetViewImpl()->GetUNOObject_Impl();
......
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
#include "rcid.hrc" #include "rcid.hrc"
// BTN ------------------------------------------------------------------- // BTN
#define BTN_PAGEDOWN (RC_VIEW_BEGIN) #define BTN_PAGEDOWN (RC_VIEW_BEGIN)
#define BTN_PAGEUP (RC_VIEW_BEGIN + 1) #define BTN_PAGEUP (RC_VIEW_BEGIN + 1)
// STR ------------------------------------------------------------------- // STR
#define STR_NUM_LEVEL (RC_VIEW_BEGIN + 3) #define STR_NUM_LEVEL (RC_VIEW_BEGIN + 3)
#define STR_NUM_OUTLINE (RC_VIEW_BEGIN + 4) #define STR_NUM_OUTLINE (RC_VIEW_BEGIN + 4)
...@@ -58,18 +58,18 @@ ...@@ -58,18 +58,18 @@
#define STR_TEXTOPTIONS (RC_VIEW_BEGIN + 33) #define STR_TEXTOPTIONS (RC_VIEW_BEGIN + 33)
#define STR_SAVEACOPY_SRC (RC_VIEW_BEGIN + 34) #define STR_SAVEACOPY_SRC (RC_VIEW_BEGIN + 34)
// MSG ------------------------------------------------------------------- // MSG
#define MSG_ERR_INSERT_GLOS (RC_VIEW_BEGIN) #define MSG_ERR_INSERT_GLOS (RC_VIEW_BEGIN)
#define MSG_ERR_NO_FAX (RC_VIEW_BEGIN + 5) #define MSG_ERR_NO_FAX (RC_VIEW_BEGIN + 5)
#define MSG_ERR_SRCSTREAM (RC_VIEW_BEGIN + 6) #define MSG_ERR_SRCSTREAM (RC_VIEW_BEGIN + 6)
// DLG ------------------------------------------------------------------- // DLG
#define DLG_SPECIAL_FORCED (RC_VIEW_BEGIN) #define DLG_SPECIAL_FORCED (RC_VIEW_BEGIN)
// Ueberlaufpruefung ----------------------------------------------------- // Overflow checking
#define VIEW_ACT_END STR_EDIT_FOOTNOTE #define VIEW_ACT_END STR_EDIT_FOOTNOTE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment