diff options
Diffstat (limited to 'sfx2/source/view')
-rwxr-xr-x | sfx2/source/view/frame.cxx | 71 | ||||
-rwxr-xr-x | sfx2/source/view/frame2.cxx | 3 | ||||
-rwxr-xr-x | sfx2/source/view/orgmgr.cxx | 263 | ||||
-rwxr-xr-x | sfx2/source/view/printer.cxx | 32 | ||||
-rwxr-xr-x | sfx2/source/view/sfxbasecontroller.cxx | 6 | ||||
-rwxr-xr-x | sfx2/source/view/userinputinterception.cxx | 2 | ||||
-rwxr-xr-x | sfx2/source/view/viewfrm.cxx | 346 | ||||
-rwxr-xr-x | sfx2/source/view/viewfrm2.cxx | 62 | ||||
-rwxr-xr-x | sfx2/source/view/viewprn.cxx | 68 | ||||
-rwxr-xr-x | sfx2/source/view/viewsh.cxx | 471 |
10 files changed, 639 insertions, 685 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 09e624c27c99..42ab08eed43a 100755 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -125,7 +125,7 @@ SfxFrame::~SfxFrame() if ( pChildArr ) { - DBG_ASSERT( !pChildArr->Count(), "Childs nicht entfernt!" ); + DBG_ASSERT( !pChildArr->Count(), "Children are not removed!" ); delete pChildArr; } @@ -134,7 +134,7 @@ SfxFrame::~SfxFrame() sal_Bool SfxFrame::DoClose() { - // Eigentlich wird noch ein PrepareClose gebraucht !!! + // Actually, one more PrepareClose is still needed! sal_Bool bRet = sal_False; if ( !pImp->bClosing ) { @@ -177,7 +177,7 @@ sal_Bool SfxFrame::DoClose_Impl() if ( pImp->pCurrentViewFrame ) pBindings = &pImp->pCurrentViewFrame->GetBindings(); - // Bei internen Tasks m"ussen Controller und Tools abger"aumt werden + // For internal tasks Controllers and Tools must be cleared if ( pImp->pWorkWin ) pImp->pWorkWin->DeleteControllers_Impl(); @@ -257,7 +257,7 @@ SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const { if ( pChildArr && pChildArr->Count() > nPos ) { - DBG_ASSERT( nPos < pChildArr->Count(), "Falscher Index!"); + DBG_ASSERT( nPos < pChildArr->Count(), "Wrong Index!"); return (*pChildArr)[nPos]; } @@ -266,7 +266,7 @@ SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame ) { - DBG_ASSERT( pChildArr, "Unbekannter Frame!"); + DBG_ASSERT( pChildArr, "Unknown Frame!"); sal_uInt16 nPos = pChildArr->GetPos(pFrame); pChildArr->Remove( nPos ); }; @@ -306,7 +306,7 @@ void SfxFrame::CancelTransfers( sal_Bool /*bCancelLoadEnv*/ ) for( pFrm = SfxViewFrame::GetFirst( pObj ); pFrm && &pFrm->GetFrame() == this; pFrm = SfxViewFrame::GetNext( *pFrm, pObj ) ) ; - // Keine anderer Frame mehr auf Doc -> Cancel + // No more Frame in Document -> Cancel if( !pFrm ) { pObj->CancelTransfers(); @@ -314,12 +314,12 @@ void SfxFrame::CancelTransfers( sal_Bool /*bCancelLoadEnv*/ ) } } - // zuerst Nachladende Frames stoppen + // First stop multiload Frames sal_uInt16 nCount = GetChildFrameCount(); for( sal_uInt16 n = 0; n<nCount; n++ ) GetChildFrame( n )->CancelTransfers(); - // ggf. StarOne-Loader canceln + // Check if StarOne-Loader should be canceled SfxFrameWeak wFrame( this ); if (wFrame.Is()) pImp->bInCancelTransfers = sal_False; @@ -362,9 +362,10 @@ void SfxFrame::SetFrameType_Impl( sal_uInt32 n ) void SfxFrame::GetViewData_Impl() { - // Alle zwischen Laden und Entfernen "anderbaren Daten aktualisieren; die - // festen Daten werden nur einmal ( nach PrepareForDoc_Impl in UpdateDescriptor ) - // geholt, um Zeit zu sparen. + // Update all modifiable data between load and unload, the + // fixed data is only processed once (after PrepareForDoc_Impl in + // updateDescriptor) to save time. + SfxViewFrame* pViewFrame = GetCurrentViewFrame(); if( pViewFrame && pViewFrame->GetViewShell() ) { @@ -385,7 +386,7 @@ void SfxFrame::GetViewData_Impl() pSet->Put( SfxUInt16Item( SID_VIEW_ID, pViewFrame->GetCurViewId() ) ); if ( pChildArr ) { - // Bei Framesets m"ussen auch die Daten der ChildViews geholt werden + // For Framesets also the data from the ChildViews hace to be processed sal_uInt16 nCount = pChildArr->Count(); for ( sal_uInt16 n=nCount; n>0; n--) { @@ -400,15 +401,15 @@ void SfxFrame::GetViewData_Impl() void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc ) { - // Beim PrepareForDoc_Impl wird der Descriptor des Frames aktualisiert - // und sein ItemSet neu initialisiert. Alle Daten, die f"ur ein sp"ateres - // Restaurieren der View n"otig sind, sind damit festgehalten. - // Soll das Dokument ersetzt werden, wird durch GetViewData_Impl (s.o.) - // die neueste Information hinzugef"ugt. Alles zusammen wird dann in der - // Browse-History gesichert. Beim Aktivieren eines solchen FramePickEntry - // wird das komplette ItemSet und der Descriptor im OpenDoc mitgeschickt. - // Hier werden nur die festen Eigenschaften gesichert; die "anderbaren werden - // durch GetViewData geholt ( spart Zeit ). + // For PrepareForDoc_Impl frames, the descriptor of the updated + // and new itemset to be initialized. All data fir restoring the view + // are thus saved. If the document be replaced, GetViewData_Impl (so) + // the latest information hinzugef by "added. All together then the + // browser-history saved in. When you activate such frame pick entry + // is complete itemsets and the descriptor in the OpenDoc sent;. + // Here only the fixed properties identified "other adjustable, the + // retrieved by GetViewData (saves time). + DBG_ASSERT( pDoc, "NULL-Document inserted ?!" ); GetParentFrame(); @@ -420,7 +421,7 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc ) GetDescriptor()->SetEditable( bEditable ); - // FileOpen-Parameter merken + // Mark FileOpen parameter SfxItemSet* pItemSet = pMed->GetItemSet(); String aMedName( pMed->GetName() ); @@ -435,7 +436,7 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc ) SfxItemSet *pSet = GetDescriptor()->GetArgs(); - // Alle alten Items l"oschen + // Delete all old Items pSet->ClearItem(); if ( pRefererItem ) @@ -456,13 +457,13 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc ) void SfxFrame::SetDescriptor( SfxFrameDescriptor *pD ) { - DBG_ASSERT( pD, "Kein Descriptor!" ); - DBG_ASSERT( pD != pImp->pDescr, "Descriptor ist schon gesetzt!" ); + DBG_ASSERT( pD, "No Descriptor!" ); + DBG_ASSERT( pD != pImp->pDescr, "Descriptor is already set!" ); if ( pImp->pDescr ) { - // Nur TopLevel-Frames verwalten ihren Descriptor selbst, bei den - // anderen tut es das Frameset + // Only TopLevel-Frames handels their Descriptor, for the others + // this is done by the Frameset if ( !pParentFrame ) delete pImp->pDescr; } @@ -473,12 +474,12 @@ void SfxFrame::SetDescriptor( SfxFrameDescriptor *pD ) SfxFrameDescriptor* SfxFrame::GetDescriptor() const { - // On Demand einen FrameDescriptor anlegen; wenn es kein TopLevel-Frame - // ist, f"uhrt es zu Fehlern, da keine g"ulige Verkettung hergestellt wird + // Create a FrameDescriptor On Demand; if there is no TopLevel-Frame + // will result in an error, as no valid link is created. if ( !pImp->pDescr ) { - DBG_ASSERT( !GetParentFrame(), "Kein TopLevel-Frame, aber kein Descriptor!" ); + DBG_ASSERT( !GetParentFrame(), "No TopLevel-Frame, but no Descriptor!" ); pImp->pDescr = new SfxFrameDescriptor; if ( GetCurrentDocument() ) pImp->pDescr->SetURL( GetCurrentDocument()->GetMedium()->GetOrigURL() ); @@ -492,7 +493,7 @@ void SfxFrame::GetTargetList( TargetList& rList ) const { if ( !GetParentFrame() ) { - // Einen Leerstring f"ur 'Kein Target' + // An empty string for 'No Target' rList.push_back( new String() ); rList.push_back( new String( DEFINE_CONST_UNICODE( "_top" ) ) ); rList.push_back( new String( DEFINE_CONST_UNICODE( "_parent" ) ) ); @@ -685,19 +686,19 @@ SfxFrameIterator::SfxFrameIterator( const SfxFrame& rFrame, sal_Bool bRecur ) SfxFrame* SfxFrameIterator::FirstFrame() { - // GetFirst beginnt die Iteration beim ersten ChildFrame + // GetFirst starts the iteration at the first child frame return pFrame->GetChildFrame( 0 ); } SfxFrame* SfxFrameIterator::NextFrame( SfxFrame& rPrev ) { - // Zuerst auf Kinder testen, wenn Rekursion erw"unscht + // If recursion is requested testing is done first on Children. SfxFrame *pRet = NULL; if ( bRecursive ) pRet = rPrev.GetChildFrame( 0 ); if ( !pRet ) { - // Anderenfalls mit den Geschwistern von rPrev weitermachen + // In other case continue with the siblings of rPrev pRet = NextSibling_Impl( rPrev ); } @@ -873,7 +874,7 @@ void SfxFrame::CreateWorkWindow_Impl() } catch(Exception&) { - OSL_ENSURE(0,"SfxFrame::CreateWorkWindow_Impl: Exception cachted. Please try to submit a repoducable bug !"); + OSL_FAIL("SfxFrame::CreateWorkWindow_Impl: Exception cachted. Please try to submit a repoducable bug !"); } } diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 0f3f80097bfb..72843c57789e 100755 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -122,7 +122,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) { if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() ) { - DBG_TRACE("SfxFrame: GotFocus"); + OSL_TRACE("SfxFrame: GotFocus"); pView->MakeActive_Impl( sal_False ); } @@ -438,7 +438,6 @@ void SfxFrame::PositionWindow_Impl( const Rectangle& rWinArea ) const { Window *pWin = pImp->pExternalContainerWindow; - // Groesse setzen const Size aAppWindow( pImp->pExternalContainerWindow->GetDesktopRectPixel().GetSize() ); Point aPos( rWinArea.TopLeft() ); Size aSz( rWinArea.GetSize() ); diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx index 5979d64e1b7b..c923135dbdc4 100755 --- a/sfx2/source/view/orgmgr.cxx +++ b/sfx2/source/view/orgmgr.cxx @@ -57,23 +57,22 @@ using namespace ::com::sun::star; //========================================================================= -/* [Beschreibung] - - Implementierungsklasse; einzelner Eintrag in der Dateiansicht +/* [Description] + Implementation class, single entry in the file view. */ struct _FileListEntry { - String aFileName; // Dateiname mit komplettem Pfad - String aBaseName; // Dateiname + String aFileName; // File Name with complete path + String aBaseName; // File Name const CollatorWrapper* pCollator; - SfxObjectShellLock aDocShell; // ObjectShell als Ref-Klasse + SfxObjectShellLock aDocShell; // ObjectShell as reference class - sal_Bool bFile; // als Datei auf Platte - // (!= unbenannt1, nicht als Dok. geladen; - // diese werden nicht gespeichert!) - sal_Bool bOwner; // selbst erzeugt + sal_Bool bFile; // As File on disk + // (!= not processed, not loaded as document + // these are not saved!) + sal_Bool bOwner; // self-generated sal_Bool bNoName; sal_Bool bOwnFormat; @@ -139,22 +138,21 @@ SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*) sal_Bool _FileListEntry::DeleteObjectShell() -/* [Beschreibung] - - Freigabe der DokumentShell +/* [Description] - [Returnwert] sal_True: alles Ok - sal_False: es ist ein Fehler aufgetreten (das - Dokument konnte nicht gesichert werden) + Release of ther DocumentShell + [Return value] TRUE: Everything is ok + FALSE: An error occured + (the document could not be saved) */ { sal_Bool bRet = sal_True; - //Falls wir die Shell angelegt haben und sie veraendert wurde + if(bOwner && aDocShell.Is() && aDocShell->IsModified()) { - //Mussten wir konvertieren? + // Converted? if( bOwnFormat ) { if(!aDocShell->Save() ) @@ -178,7 +176,7 @@ sal_Bool _FileListEntry::DeleteObjectShell() } else { - // Falls konvertiert im eigenen Format speichern + // If converted save in native format INetURLObject aObj( aFileName ); String aTitle = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); @@ -234,13 +232,9 @@ SfxOrganizeMgr::SfxOrganizeMgr( SfxOrganizeListBox_Impl *pLeft, bDeleteTemplates(pTempl == 0), bModified(0) -/* [Beschreibung] - - Konstruktor - - Das aktuelle Dokument wird in die Liste der Dokumente - aufgenommen. +/* [Description] + Constructor. The current document is added to the list of documents. */ { pImpl->pDocList = new SfxObjectList; @@ -275,17 +269,17 @@ SfxOrganizeMgr::~SfxOrganizeMgr() SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx ) -/* [Beschreibung] +/* [Description] - Zugriff auf die DokumentShell an der Position nIdx + Access to the DocumentShell at the position nIdx. - [Returnwert] Referenz auf die DokumentShell + [Return value] Reference to the DocumentShell */ { _FileListEntry* pEntry = (*pImpl->pDocList)[nIdx]; - // andernfalls Doc-Shell anlegen + // otherwise create Doc-Shell if ( !pEntry->aDocShell.Is() ) { INetURLObject aFileObj( pEntry->aFileName ); @@ -336,14 +330,13 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx ) sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx) -/* [Beschreibung] +/* [Description] - Freigabe der DokumentShell an der Position nIdx - - [Returnwert] sal_True: alles Ok - sal_False: es ist ein Fehler aufgetreten (das - Dokument konnte nicht gesichert werden) + Release DocumentShell at position nIdx + [Return value] TRUE: Everything is ok + FALSE: An error occured + (the document could not be saved) */ { return (*pImpl->pDocList)[nIdx]->DeleteObjectShell(); @@ -353,12 +346,12 @@ sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx) SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx) -/* [Beschreibung] +/* [Description] - Zugriff auf die DokumentShell an der Position nIdx im Bereich - nRegion (Dokumentvorlage) + Access to the DocumentShell at Position nIdx in Region + nRegion (Document template) - [Returnwert] Referenz auf die DokumentShell + [Return value] Reference to the DocumentShell */ { @@ -369,15 +362,14 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion, sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx) -/* [Beschreibung] - - Freigabe der DokumentShell an der Position nIdx im Bereich - nRegion (Dokumentvorlage) +/* [Description] - [Returnwert] sal_True: alles Ok - sal_False: es ist ein Fehler aufgetreten (das - Dokument konnte nicht gesichert werden) + Release of the DocumentShell at Position nIdx in Region + nRegion (Document template) + [Return value] TRUE: Everything is ok + FALSE: An error occured + (the document could not be saved) */ { @@ -391,22 +383,22 @@ sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx) -/* [Beschreibung] +/* [Description] - Kopieren einer Dokumentvorlage + Copy of a Document Template [Parameter] - sal_uInt16 nTargetRegion Index des Zielbereiches - sal_uInt16 nTargetIdx Index Zielposition - sal_uInt16 nSourceRegion Index des Quellbereiches - sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden - Dokumentvorlage + sal_uInt16 nTargetRegion Index of the Target Region + sal_uInt16 nTargetIdx Index of the Target Position + sal_uInt16 nSourceRegion Index of the Source Region + sal_uInt16 nSourceIdx Index of the template to be + copied/moved. - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + [Return value] Success (TRUE) or Failure (FALSE) - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::Copy(sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, @@ -416,7 +408,7 @@ sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion, */ { - if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse kopieren + if(nSourceIdx == USHRT_MAX) // No directories copied return sal_False ; const sal_Bool bOk = pTemplates->Copy(nTargetRegion, nTargetIdx, nSourceRegion, nSourceIdx); @@ -432,32 +424,30 @@ sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx) -/* [Beschreibung] +/* [Description] - Verschieben einer Dokumentvorlage + Moving a template [Parameter] - sal_uInt16 nTargetRegion Index des Zielbereiches - sal_uInt16 nTargetIdx Index Zielposition - sal_uInt16 nSourceRegion Index des Quellbereiches - sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden - Dokumentvorlage - - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + sal_uInt16 nTargetRegion Index of the Target Region + sal_uInt16 nTargetIdx Index of the Target Position + sal_uInt16 nSourceRegion Index of the Source Region + sal_uInt16 nSourceIdx Index of the template to be + copied/moved. + [Return value] Success (TRUE) or Failure (FALSE) - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::Move(sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx)> - */ { - if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben + if(nSourceIdx == USHRT_MAX) // No directory moved return sal_False ; const sal_Bool bOk = pTemplates->Move(nTargetRegion, nTargetIdx, nSourceRegion, nSourceIdx); @@ -471,24 +461,21 @@ sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion, sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, sal_uInt16 nRegion, sal_uInt16 nIdx) -/* [Beschreibung] +/* [Description] - "oschen einer Dokumentvorlage + Delete a Document Template [Parameter] - SfxOrganizeListBox *pCaller rufende ListBox; da dieses - Event durch das Men"u oder - durch das Keyboard angetriggert wird, - mu"s das Model der ListBox anschlie"send - aktualisiert werden. - sal_uInt16 nRegion Index des Bereiches - sal_uInt16 nIdx Index der Dokumentvorlage - - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + SfxOrganizeListBox *pCaller calling ListBox, since this event + is triggered by the menu or the + keyboard, the ListBox must be updated. + sal_uInt16 nRegion Index for Region + sal_uInt16 nIdx Index of Document template + [Return value] Success (TRUE) or Failure (FALSE) - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::Delete(sal_uInt16 nRegion, sal_uInt16 nIdx)> @@ -541,7 +528,7 @@ sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, if(bOk) { bModified = 1; - // zu loeschender Eintrag + // Entry to be deleted. SvLBoxEntry *pEntryToDelete = pCaller->SvLBox::GetEntry(pCaller->SvLBox::GetEntry(nRegion), nIdx); pCaller->GetModel()->Remove(pEntryToDelete); @@ -555,26 +542,20 @@ sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, sal_Bool SfxOrganizeMgr::InsertDir ( - SfxOrganizeListBox_Impl* pCaller,/* rufende ListBox; da dieses Event - durch das Men"u oder durch das - Keyboard angetriggert wird, - mu\s das Model der ListBox - anschlie\send aktualisiert werden */ - const String& rText, // logischer Name des Bereiches - sal_uInt16 nRegion // Index des Bereiches + SfxOrganizeListBox_Impl* pCaller, /* calling ListBox, since this event + is triggered by the menu or the + keyboard, the ListBox must be updated. */ + const String& rText, // logical Name of Region + sal_uInt16 nRegion // Index of Region ) -/* [Beschreibung] +/* [Description] - Einf"ugen eines Bereiches + Insert Region. + [Return value] Success (TRUE) or Failure (FALSE) - [R"uckgabewert] - - Erfolg (sal_True) oder Mi\serfolg (sal_False) - - - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::InsertDir(const String &, sal_uInt16 nRegion)> */ @@ -599,23 +580,21 @@ sal_Bool SfxOrganizeMgr::InsertDir sal_Bool SfxOrganizeMgr::SetName(const String &rName, sal_uInt16 nRegion, sal_uInt16 nIdx) -/* [Beschreibung] +/* [Description] - "Andern eines (logischen) Namens + Set (logical) Name [Parameter] - const String &rName der neue Name - sal_uInt16 nRegion Index des Bereiches - sal_uInt16 nIdx Index der Dokumentvorlage + const String &rName The new Name + sal_uInt16 nRegion Index of Region + sal_uInt16 nIdx Index of Document template - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + [Return value] Success (TRUE) or Failure (FALSE) - - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::SetName(const String &, sal_uInt16 nRegion, sal_uInt16 nIdx)> - */ { @@ -629,23 +608,21 @@ sal_Bool SfxOrganizeMgr::SetName(const String &rName, sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const -/* [Beschreibung] +/* [Description] - Export einer Vorlage + Export of a Template [Parameter] - sal_uInt16 nRegion Index des Bereiches - sal_uInt16 nIdx Index der Dokumentvorlage - const String &rName Dateiname + sal_uInt16 nRegion Index of Region + sal_uInt16 nIdx Index of Document Template + const String &rName File name - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + [Return value] Success (TRUE) or Failure (FALSE) - - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)> - */ { @@ -657,27 +634,25 @@ sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const Strin sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName) -/* [Beschreibung] +/* [Description] - Import einer Vorlage + Import of Document Template [Parameter] - SfxOrganizeListBox *pCaller rufende ListBox; da dieses - Event durch das Men"u angetriggert wird, - mu"s das Model der ListBox anschlie"send - aktualisiert werden. - sal_uInt16 nRegion Index des Bereiches - sal_uInt16 nIdx Index der Dokumentvorlage - String &rName Dateiname + SfxOrganizeListBox *pCaller calling ListBox, since this event + is triggered by the menu or the + keyboard, the ListBox must be updated. - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + sal_uInt16 nRegion Index of Region + sal_uInt16 nIdx Index of Document Template + String &rName File name + [Return value] Success (TRUE) or Failure (FALSE) - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::CopyFrom( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)> - */ { @@ -686,7 +661,7 @@ sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, pParent = pCaller->GetParent(pParent); if( pTemplates->CopyFrom( nRegion, nIdx, rName ) ) { - // pCaller aktualisieren + // Update pCaller if( nIdx == USHRT_MAX ) nIdx = 0; else nIdx++; @@ -710,20 +685,19 @@ sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName ) -/* [Beschreibung] +/* [Description] - Eine Datei in der Dateiansicht hinzuf"ugen + Insert a file in the file view. [Parameter] - SfxOrganizeListBox *pCaller rufende ListBox; da dieses - Event durch das Men"u angetriggert wird, - mu"s das Model der ListBox anschlie"send - aktualisiert werden. - const String &rFileName Name der hinzuf"ugenden Datei + SfxOrganizeListBox *pCaller calling ListBox, since this event + is triggered by the menu or the + keyboard, the ListBox must be updated. - [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) + const String &rFileName Name of inserted File. + [Return value] Success (TRUE) or Failure (FALSE) */ { @@ -744,16 +718,16 @@ sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const Str sal_Bool SfxOrganizeMgr::Rescan() -/* [Beschreibung] +/* [Description] - Aktualisieren der Datenbasis + Updating the database. - [R"uckgabewert] + [Return value] - sal_True es bestanden Unterschiede - FALSE keine "Anderung + TRUE Changes were made + FALSE No changes - [Querverweise] + [Cross-reference] <SfxDocumentTemplates::Rescan()> */ @@ -771,14 +745,13 @@ sal_Bool SfxOrganizeMgr::Rescan() void SfxOrganizeMgr::SaveAll(Window *pParent) -/* [Beschreibung] +/* [Description] - Schreiben aller ge"anderten Dokumente + Save all Documents that have been modified [Parameter] - Window *pParent Parent der Boxen f"ur Fehlermeldungen - + Window *pParent Parent of the Error message Box */ { diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index fb362b7814ea..5f044c94dc0b 100755 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -73,23 +73,23 @@ struct SfxPrintOptDlg_Impl SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions ) -/* [Beschreibung] +/* [Description] - Erzeugt einen <SfxPrinter> aus dem Stream. Geladen wird genaugenommen - nur ein JobSetup. Falls ein solcher Drucker auf dem System nicht - verf"augbar ist, wird das Original als Orig-JobSetup gemerkt und - ein "anhlicher exisitierender Drucker genommen. + Creates a <SfxPrinter> from the stream. Loading is really only a jobsetup. + If such a printer is not available on the system, then the original is + marked as the original Job-setup and a comparable printer is selected from + existing ones. - Die 'pOptions' werden in den erzeugten SfxPrinter "ubernommen, - der Returnwert geh"ort dem Caller. + The 'pOptions' are taken over in the generated SfxPrinter, the return + value belongs to the caller. */ { - // JobSetup laden + // Load JobSetup JobSetup aFileJobSetup; rStream >> aFileJobSetup; - // Drucker erzeugen + // Get printers SfxPrinter *pPrinter = new SfxPrinter( pOptions, aFileJobSetup ); return pPrinter; } @@ -98,9 +98,9 @@ SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions ) SvStream& SfxPrinter::Store( SvStream& rStream ) const -/* [Beschreibung] +/* [Description] - Speichert das verwendete JobSetup des <SfxPrinter>s. + Saves the used JobSetup of <SfxPrinter>s. */ { @@ -111,9 +111,9 @@ SvStream& SfxPrinter::Store( SvStream& rStream ) const SfxPrinter::SfxPrinter( SfxItemSet* pTheOptions ) : -/* [Beschreibung] +/* [Description] - Dieser Ctor erzeugt einen Standard-Drucker. + This constructor creates a default printer. */ pOptions( pTheOptions ), @@ -226,7 +226,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent, { SetText( SfxResId( STR_PRINT_OPTIONS_TITLE ) ); - // TabPage einh"angen + // Insert TabPage pPage = pViewSh->CreatePrintOptionsPage( this, *pOptions ); DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" ); if( pPage ) @@ -236,7 +236,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent, pPage->Show(); } - // Dialoggr"o\se bestimmen + // Set dialog size Size a6Sz = LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); Size aBtnSz = LogicToPixel( Size( 50, 14 ), MAP_APPFONT ); Size aOutSz( pPage ? pPage->GetSizePixel() : Size() ); @@ -245,7 +245,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent, nWidth += a6Sz.Width(); aOutSz.Width() += nWidth; if ( aOutSz.Height() < 90 ) - // mindestens die H"ohe der 3 Buttons + // at least the height of the 3 buttons aOutSz.Height() = 90; SetOutputSizePixel( aOutSz ); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index e361d866a3d8..1b49688489be 100755 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -692,7 +692,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com:: getFrame()->removeFrameActionListener( m_pData->m_xListener ) ; SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ; - // weitere View auf dasselbe Doc? + // More Views on the same document? SfxObjectShell* pDocShell = m_pData->m_pViewShell->GetObjectShell() ; sal_Bool bOther = sal_False ; @@ -1209,7 +1209,7 @@ throw (::com::sun::star::uno::RuntimeException) SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); - // Gruppe anw"ahlen ( Gruppe 0 ist intern ) + // Select Group ( Group 0 is internal ) for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ ) { String aName = pSlotPool->SeekGroup( i ); @@ -1400,7 +1400,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) rFrame.GetWindow().Show(); } - // Jetzt UpdateTitle, hidden TopFrames haben sonst keinen Namen! + // UpdateTitle now, hidden TopFrames have otherwise no Name! pViewFrame->UpdateTitle(); if ( !rFrame.IsInPlace() ) diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx index 845ba8cc70d0..19c6ff50e5c9 100755 --- a/sfx2/source/view/userinputinterception.cxx +++ b/sfx2/source/view/userinputinterception.cxx @@ -267,7 +267,7 @@ namespace sfx2 break; default: - OSL_ENSURE( false, "UserInputInterception::handleNotifyEvent: illegal event type!" ); + OSL_FAIL( "UserInputInterception::handleNotifyEvent: illegal event type!" ); break; } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 6e137c1a9513..6d5d0930370a 100755 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -111,7 +111,7 @@ using ::com::sun::star::document::XViewDataSupplier; using ::com::sun::star::container::XIndexContainer; namespace css = ::com::sun::star; -// wg. ViewFrame::Current +// Due to ViewFrame::Current #include "appdata.hxx" #include <sfx2/taskpane.hxx> #include <sfx2/app.hxx> @@ -307,7 +307,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) SfxFrame *pParent = GetFrame().GetParentFrame(); if ( rReq.GetSlot() == SID_RELOAD ) { - // Bei CTRL-Reload den aktiven Frame reloaden + // When CTRL-Reload, reload the active Frame SfxViewFrame* pActFrame = this; while ( pActFrame ) pActFrame = pActFrame->GetActiveChildFrame_Impl(); @@ -322,8 +322,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } } - // Wenn nur ein Reload der Graphiken eines oder mehrerer ChildFrames - // gemacht werden soll + // If only a reload of the graphics for one or more child frames + // should be made SfxFrame& rFrame = GetFrame(); if ( pParent == &rFrame && rFrame.GetChildFrameCount() ) { @@ -342,14 +342,14 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pChild = pNext; } - // Der TopLevel-Frame selbst het keine Graphiken! + // The top level frame itself has no graphics! if ( bReloadAvailable ) return; } } else { - // Bei CTRL-Edit den TopFrame bearbeiten + // When CTRL-Edit, edit the TopFrame. sal_uInt16 nModifier = rReq.GetModifier(); if ( ( nModifier & KEY_MOD1 ) && pParent ) @@ -368,9 +368,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( GetFrame().HasComponent() ) break; - // Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch - // m"oglich, da\s der Slot zwar enabled ist, aber Ctrl-Click - // trotzdem nicht geht! + // Due to Double occupancy in toolboxes (with or without Ctrl), + // it is also possible that the slot is enabled, but Ctrl-click + // despite this is not! if( !pSh || !pSh->HasName() || !(pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT )) break; @@ -407,7 +407,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) sal_Bool bNeedsReload = sal_False; if ( !pSh->IsReadOnly() ) { - // Speichern und Readonly Reloaden + // Save and reload Readonly if( pSh->IsModified() ) { if ( pSh->PrepareClose() ) @@ -450,11 +450,11 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) return; } - // Parameter auswerten + // Evaluate Parameter // sal_Bool bReload = sal_True; if ( rReq.IsAPI() ) { - // per API steuern ob r/w oder r/o + // Control through API if r/w or r/o SFX_REQUEST_ARG(rReq, pEditItem, SfxBoolItem, SID_EDITDOC, sal_False); if ( pEditItem ) nOpenMode = pEditItem->GetValue() ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY; @@ -518,12 +518,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pSh->DoSaveCompleted( pMed ); } - // r/o-Doc kann nicht in Editmode geschaltet werden? + // Readonly document can not be switched to edit mode? rReq.Done( sal_False ); if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() ) { - // dem ::com::sun::star::sdbcx::User anbieten, als Vorlage zu oeffnen + // ::com::sun::star::sdbcx::User offering to open it as a template QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) ); if ( RET_YES == aBox.Execute() ) { @@ -576,9 +576,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) case SID_RELOAD: { - // Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch - // m"oglich, da\s der Slot zwar enabled ist, aber Ctrl-Click - // trotzdem nicht geht! + // Due to Double occupancy in toolboxes (with or without Ctrl), + // it is also possible that the slot is enabled, but Ctrl-click + // despite this is not! if ( !pSh || !pSh->CanReload_Impl() ) break; SfxApplication* pApp = SFX_APP(); @@ -590,7 +590,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if( pImp->bReloading || pSh->IsInModalMode() ) return; - // AutoLoad ist ggf. verboten + // AutoLoad is prohibited if possible SFX_REQUEST_ARG(rReq, pAutoLoadItem, SfxBoolItem, SID_AUTOLOAD, sal_False); if ( pAutoLoadItem && pAutoLoadItem->GetValue() && GetFrame().IsAutoLoadLocked_Impl() ) @@ -600,12 +600,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pImp->bReloading = sal_True; SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem, SID_FILE_NAME, sal_False); - // editierbar "offnen? + // Open as editable? sal_Bool bForEdit = !pSh->IsReadOnly(); if ( rReq.GetSlot() == SID_EDITDOC ) bForEdit = !bForEdit; - // ggf. beim User nachfragen + // If possible ask the User sal_Bool bDo = ( GetViewShell()->PrepareClose() != sal_False ); SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False); if ( bDo && GetFrame().DocIsModified_Impl() && @@ -619,15 +619,15 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) { SfxMedium *pMedium = xOldObj->GetMedium(); - // Frameset abziehen, bevor FramesetView evtl. verschwindet + // Remove Frameset before the FramesetView may disappear String aURL = pURLItem ? pURLItem->GetValue() : pMedium->GetName(); sal_Bool bHandsOff = ( pMedium->GetURLObject().GetProtocol() == INET_PROT_FILE && !xOldObj->IsDocShared() ); - // bestehende SfxMDIFrames f"ur dieses Doc leeren - // eigenes Format oder R/O jetzt editierbar "offnen? + // Emty existing SfxMDIFrames for this Document + // in native format or R/O, open it now for editing? SfxObjectShellLock xNewObj; // collect the views of the document @@ -680,9 +680,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pNewSet->ClearItem( SID_DOC_READONLY ); } - // Falls eine salvagede Datei vorliegt, nicht nochmals die - // OrigURL mitschicken, denn die Tempdate ist nach Reload - // ungueltig + // If a salvaged file is present, do not enclose the OrigURL + // again, since the Tempdate is invalid after reload. SFX_ITEMSET_ARG( pNewSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False); if( pSalvageItem ) { @@ -691,7 +690,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } // TODO/LATER: Temporary solution, the SfxMedium must know the original URL as aLogicName - // SfxMedium::Transfer_Impl() will be vorbidden then. + // SfxMedium::Transfer_Impl() will be forbidden then. if ( xOldObj->IsDocShared() ) pNewSet->Put( SfxStringItem( SID_FILE_NAME, xOldObj->GetSharedFileURL() ) ); @@ -704,7 +703,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) xOldObj->CancelTransfers(); - // eigentliches Reload + // Real Reload //pNewSet->Put( SfxFrameItem ( SID_DOCFRAME, GetFrame() ) ); if ( pSilentItem && pSilentItem->GetValue() ) @@ -727,8 +726,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pNewSet->Put( SfxUInt16Item(SID_UPDATEDOCMODE,::com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG) ); xOldObj->SetModified( sal_False ); - // Altes Dok nicht cachen! Gilt nicht, wenn anderes - // Doc geladen wird. + // Do not chache the old Document! Is invalid when loading + // another document. SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSavedOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False); SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSavedReferer, SfxStringItem, SID_REFERER, sal_False); @@ -857,14 +856,14 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), xOldObj ) ); } - // als erledigt recorden + // Record as done rReq.Done( sal_True ); rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_True)); return; } else { - // als nicht erledigt recorden + // Record as not done rReq.Done(); rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_False)); pImp->bReloading = sal_False; @@ -879,7 +878,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) { SfxObjectShell* pSh = GetObjectShell(); if ( !pSh ) - // Ich bin gerade am Reloaden und Yielde so vor mich hin ... + // I'm just on reload and am yielding myself ... return; GetFrame().GetParentFrame(); @@ -888,8 +887,8 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) { if ( GetFrame().HasComponent() ) { - // Wenn die Komponente es nicht selbst dispatched, dann - // macht es auch keinen Sinn! + // If the component is not self-dispatched, then + // it makes no sense! rSet.DisableItem( nWhich ); continue; } @@ -920,8 +919,8 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) rSet.DisableItem(nWhich); else { - // Wenn irgendein ChildFrame reloadable ist, wird der Slot - // enabled, damit man CTRL-Reload machen kann + // If any ChildFrame is reloadable, the slot is enabled, + // so you can perfom CTRL-Reload sal_Bool bReloadAvailable = sal_False; SfxFrameIterator aFrameIter( *pFrame, sal_True ); for( SfxFrame* pNextFrame = aFrameIter.FirstFrame(); @@ -951,7 +950,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) //-------------------------------------------------------------------- void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq ) { - // gibt es an der obersten Shell einen Undo-Manager? + // Is there an Undo-Manager on the top Shell? SfxShell *pSh = GetDispatcher()->GetShell(0); ::svl::IUndoManager* pShUndoMgr = pSh->GetUndoManager(); sal_Bool bOK = sal_False; @@ -985,7 +984,7 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq ) } else if ( GetViewShell() ) { - // der SW hat eigenes Undo an der View + // The SW has its own undo in the View const SfxPoolItem *pRet = GetViewShell()->ExecuteSlot( rReq ); if ( pRet ) bOK = ((SfxBoolItem*)pRet)->GetValue(); @@ -998,16 +997,16 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq ) //-------------------------------------------------------------------- void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) { - // Undo-Manager suchen + // Search for Undo-Manager SfxShell *pSh = GetDispatcher()->GetShell(0); if ( !pSh ) - // Ich bin gerade am Reloaden und Yielde so vor mich hin ... + // I'm just on reload and am yielding myself ... return; ::svl::IUndoManager *pShUndoMgr = pSh->GetUndoManager(); if ( !pShUndoMgr ) { - // der SW hat eigenes Undo an der View + // The SW has its own undo in the View SfxWhichIter aIter( rSet ); SfxViewShell *pViewSh = GetViewShell(); if( !pViewSh ) return; @@ -1076,20 +1075,19 @@ void SfxViewFrame::PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell ) //-------------------------------------------------------------------- void SfxViewFrame::ReleaseObjectShell_Impl() -/* [Beschreibung] +/* [Description] - Diese Methode entleert den SfxViewFrame, d.h. nimmt die <SfxObjectShell> - vom Dispatcher und beendet seine <SfxListener>-Beziehung zu dieser - SfxObjectShell (wodurch sie sich ggf. selbst zerst"ort). + This method empties the SfxViewFrame, i.e. takes the <SfxObjectShell> + from the dispatcher and ends its <SfxListener> Relationship to this + SfxObjectShell (by which they may even destroy themselves). - Somit kann durch Aufruf von ReleaseObjectShell() und SetObjectShell() - die SfxObjectShell ausgetauscht werden. + Thus, by invoking ReleaseObjectShell() and SetObjectShell() the + SfxObjectShell can be replaced. - Zwischen RealeaseObjectShell() und SetObjectShell() darf die Kontrolle - nicht an das System abgegeben werden. + Between RealeaseObjectShell() and SetObjectShell() can the control not + be handed over to the system. - - [Querverweise] + [Cross-reference] <SfxViewFrame::SetObjectShell(SfxObjectShell&)> */ @@ -1114,7 +1112,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl() } #ifdef DBG_UTIL else - OSL_FAIL("Keine Shell"); + OSL_FAIL("No Shell"); #endif if ( xObjSh.Is() ) @@ -1153,8 +1151,8 @@ sal_Bool SfxViewFrame::Close() DBG_ASSERT( GetFrame().IsClosing_Impl() || !GetFrame().GetFrameInterface().is(), "ViewFrame closed too early!" ); - // Wenn bis jetzt noch nicht gespeichert wurde, sollen eingebettete Objekte - // auch nicht mehr automatisch gespeichert werden! + // If no saving have been made up until now, then embedded Objects should + // not be saved automatically anymore. if ( GetViewShell() ) GetViewShell()->DiscardClients_Impl(); Broadcast( SfxSimpleHint( SFX_HINT_DYING ) ); @@ -1162,8 +1160,8 @@ sal_Bool SfxViewFrame::Close() if (SfxViewFrame::Current() == this) SfxViewFrame::SetViewFrame( NULL ); - // Da der Dispatcher leer ger"aumt wird, kann man ihn auch nicht mehr - // vern"unftig verwenden - also besser still legen + // Since the Dispatcher is emptied, it can not be used in any reasnable + // manner, thus it is better to let the dispatcher be. GetDispatcher()->Lock(sal_True); delete this; @@ -1179,8 +1177,8 @@ void SfxViewFrame::DoActivate( sal_Bool bUI, SfxViewFrame* pOldFrame ) pDispatcher->DoActivate_Impl( bUI, pOldFrame ); - // Wenn ich einen parent habe und dieser ist kein parent des alten - // ViewFrames, erh"alt er ein ParentActivate + // If this ViewFrame has got a parent and this is not a parent of the + // old ViewFrames, it gets a ParentActivate. if ( bUI ) { SfxViewFrame *pFrame = GetParentViewFrame(); @@ -1200,8 +1198,8 @@ void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame ) SFX_APP(); pDispatcher->DoDeactivate_Impl( bUI, pNewFrame ); - // Wenn ich einen parent habe und dieser ist kein parent des neuen - // ViewFrames, erh"alt er ein ParentDeactivate + // If this ViewFrame has got a parent and this is not a parent of the + // new ViewFrames, it gets a ParentDeactivate. if ( bUI ) { SfxViewFrame *pFrame = GetParentViewFrame(); @@ -1305,7 +1303,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) if ( !xObjSh.Is() ) break; - // r/o Umschaltung? + // Switch r/o? SfxBindings& rBind = GetBindings(); rBind.Invalidate( SID_RELOAD ); SfxDispatcher *pDispat = GetDispatcher(); @@ -1313,7 +1311,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) sal_Bool bIsReadOnly = xObjSh->IsReadOnly(); if ( !bWasReadOnly != !bIsReadOnly ) { - // Dann auch TITLE_CHANGED + // Then also TITLE_CHANGED UpdateTitle(); rBind.Invalidate( SID_FILE_NAME ); rBind.Invalidate( SID_DOCINFO_TITLE ); @@ -1322,11 +1320,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) pDispat->GetBindings()->InvalidateAll(sal_True); pDispat->SetReadOnly_Impl( bIsReadOnly ); - // Dispatcher-Update nur erzwingen, wenn es nicht sowieso - // demn"achst kommt, anderenfalls ist Zappelei oder gar - // GPF m"oglich, da Writer z.B. gerne mal im Resize irgendwelche - // Aktionen t"atigt, die ein SetReadOnlyUI am Dispatcher zur - // Folge haben! + // Only force and Dispatcher-Update, if it is done next + // anyway, otherwise flickering or GPF is possibel since + // the Writer for example prefers in Resize preform some + // actions which has a SetReadOnlyUI in Dispatcher as a + // result! + if ( pDispat->IsUpdated_Impl() ) pDispat->Update_Impl(sal_True); } @@ -1361,9 +1360,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } else if ( rHint.IsA(TYPE(SfxEventHint)) ) { - // Wenn das Document asynchron geladen wurde, wurde der Dispatcher - // auf ReadOnly gesetzt, was zur"?ckgenommen werden mu\s, wenn - // das Document selbst nicht ReadOnly ist und das Laden fertig ist. + // When the Document is loaded asynchronously, was the Dispatcher + // set as ReadOnly, to what must be returned when the document itself + // is not read only, and the loading is finished. switch ( ((SfxEventHint&)rHint).GetEventId() ) { case SFX_EVENT_MODIFYCHANGED: @@ -1387,8 +1386,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) rBind.Invalidate( SID_EDITDOC ); if ( !xObjSh->IsReadOnly() ) { - // Im Gegensatz zu oben (TITLE_CHANGED) mu\s das UI nicht - // upgedated werden, da es nicht gehidet war! + // In contrast to above (TITLE_CHANGED) does the UI not + // have to be updated because it was not obstructed // #i21560# InvalidateAll() causes the assertion // 'SfxBindings::Invalidate while in update" when @@ -1461,7 +1460,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh ) pDispatcher->Flush(); } - SfxViewFrame *pThis = this; // wegen der kranken Array-Syntax + SfxViewFrame *pThis = this; // this due to the sick Array syntax SfxViewFrameArr_Impl &rViewArr = SFX_APP()->GetViewFrames_Impl(); rViewArr.C40_INSERT(SfxViewFrame, pThis, rViewArr.Count() ); } @@ -1472,11 +1471,11 @@ SfxViewFrame::SfxViewFrame SfxObjectShell* pObjShell ) -/* [Beschreibung] +/* [Description] - Ctor des SfxViewFrame f"ur eine <SfxObjectShell> aus der Ressource. - Die 'nViewId' der zu erzeugenden <SfxViewShell> kann angegeben werden - (default ist die zuerst registrierte SfxViewShell-Subklasse). + Constructor of SfxViewFrame for a <SfxObjectShell> from the Resource. + The 'nViewId' to the created <SfxViewShell> can be returned. + (default is the SfxViewShell-Subclass that was registered first). */ : pImp( new SfxViewFrame_Impl( rFrame ) ) @@ -1509,7 +1508,7 @@ SfxViewFrame::~SfxViewFrame() ReleaseObjectShell_Impl(); if ( GetFrame().OwnsBindings_Impl() ) - // Die Bindings l"oscht der Frame! + // The Bindings delete the Frame! KillDispatcher_Impl(); delete pImp->pWindow; @@ -1517,13 +1516,13 @@ SfxViewFrame::~SfxViewFrame() if ( GetFrame().GetCurrentViewFrame() == this ) GetFrame().SetCurrentViewFrame_Impl( NULL ); - // von Frame-Liste abmelden + // Unregister from the Frame List. SfxApplication *pSfxApp = SFX_APP(); SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl(); const SfxViewFrame *pThis = this; rFrames.Remove( rFrames.GetPos(pThis) ); - // Member l"oschen + // Delete Member KillDispatcher_Impl(); delete pImp; @@ -1532,7 +1531,7 @@ SfxViewFrame::~SfxViewFrame() //------------------------------------------------------------------------ void SfxViewFrame::KillDispatcher_Impl() -// Dispatcher abr"aumen und l"oschen +// Remove and delete the Dispatcher. { DBG_CHKTHIS(SfxViewFrame, 0); @@ -1559,9 +1558,9 @@ SfxViewFrame* SfxViewFrame::Current() //-------------------------------------------------------------------- sal_uInt16 SfxViewFrame::Count() -/* [Beschreibung] +/* [Description] - Liefert die Anzahl der sichtbaren <SfxViewFrame>-Instanzen. + Returns the number of visable <SfxViewFrame> instances. */ { @@ -1672,7 +1671,7 @@ SfxIniManager* SfxViewFrame::GetIniManager() const #endif //-------------------------------------------------------------------- -void SfxViewFrame::DoAdjustPosSizePixel //! teilen in Inner.../Outer... +void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer... ( SfxViewShell* pSh, const Point& rPos, @@ -1681,7 +1680,7 @@ void SfxViewFrame::DoAdjustPosSizePixel //! teilen in Inner.../Outer... { DBG_CHKTHIS(SfxViewFrame, 0); - // Components benutzen diese Methode nicht! + // Components do not use this Method! if( pSh && pSh->GetWindow() && !nAdjustPosPixelLock ) { nAdjustPosPixelLock++; @@ -1715,10 +1714,10 @@ SfxPoolItem* SfxViewFrameItem::Clone( SfxItemPool *) const //-------------------------------------------------------------------- void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh ) -/* [Beschreibung] +/* [Description] - Interne Methode zum setzen der jeweils aktuellen <SfxViewShell>-Instanz, - die in diesem SfxViewFrame aktiv ist. + Internal Method to set the current <SfxViewShell> Instance, + that is active int this SfxViewFrame at the moment. */ { @@ -1730,9 +1729,9 @@ void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh ) } //-------------------------------------------------------------------- -/* - Beschreibung: - Der ParentViewFrame ist der ViewFrame des Containers bei internem InPlace +/* [Description] + + The ParentViewFrame of the Containers ViewFrame in the internal InPlace */ //TODO/LATER: is it still necessary? is there a replacement for GetParentViewFrame_Impl? @@ -1775,7 +1774,7 @@ void SfxViewFrame::DoAdjustPosSize( SfxViewShell *pSh, //-------------------------------------------------------------------- void SfxViewFrame::GetDocNumber_Impl() { - DBG_ASSERT( GetObjectShell(), "Kein Dokument!" ); + DBG_ASSERT( GetObjectShell(), "No Document!" ); GetObjectShell()->SetNamedVisibility_Impl(); pImp->nDocViewNo = GetObjectShell()->GetNoSet_Impl().GetFreeIndex()+1; } @@ -1823,22 +1822,23 @@ void SfxViewFrame::Enable( sal_Bool bEnable ) //-------------------------------------------------------------------- void SfxViewFrame::Show() -/* [Beschreibung] +/* [Description] - Diese Methode macht das Frame-Window sichtbar und ermittelt vorher - den Fenstername. Au\serdem wird das Dokument festgehalten. Man darf - i.d.R. nie das Window direkt showen! + This method makes the Frame-Window visible and before transmitts the + window name. In addition, the document is held. In general one can never + show the window directly! */ { - // zuerst locken damit in UpdateTitle() gilt: IsVisible() == sal_True (:#) + // First lock the objectShell so that UpdateTitle() is valid: + // IsVisible() == sal_True (:#) if ( xObjSh.Is() ) { xObjSh->GetMedium()->GetItemSet()->ClearItem( SID_HIDDEN ); if ( !pImp->bObjLocked ) LockObjectShell_Impl( sal_True ); - // Doc-Shell Titel-Nummer anpassen, get unique view-no + // Adjust Doc-Shell titel nummer, get unique view-no if ( 0 == pImp->nDocViewNo ) { GetDocNumber_Impl(); @@ -1848,8 +1848,8 @@ void SfxViewFrame::Show() else UpdateTitle(); - // Frame-Window anzeigen, aber nur wenn der ViewFrame kein eigenes Window - // hat oder wenn er keine Component enth"alt + // Display Frame-window, but only if the ViewFrame has no window of its + // own or if it does not contain a Component if ( &GetWindow() == &GetFrame().GetWindow() || !GetFrame().HasComponent() ) GetWindow().Show(); GetFrame().GetWindow().Show(); @@ -1878,9 +1878,9 @@ void SfxViewFrame::Hide() //-------------------------------------------------------------------- void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock ) { - DBG_ASSERT( pImp->bObjLocked != bLock, "Falscher Locked-Status!" ); + DBG_ASSERT( pImp->bObjLocked != bLock, "Wrong Locked status!" ); - DBG_ASSERT( GetObjectShell(), "Kein Dokument!" ); + DBG_ASSERT( GetObjectShell(), "No Document!" ); GetObjectShell()->OwnerLock(bLock); pImp->bObjLocked = bLock; } @@ -1970,7 +1970,7 @@ void SfxViewFrame::SetActiveChildFrame_Impl( SfxViewFrame *pViewFrame ) if ( pViewFrame ) xActive = pViewFrame->GetFrame().GetFrameInterface(); - if ( xFrame.is() ) // PB: #74432# xFrame cann be NULL + if ( xFrame.is() ) // PB: #74432# xFrame can be NULL xFrame->setActiveFrame( xActive ); } } @@ -2177,7 +2177,7 @@ void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId ) { // can't say anything about the view, the respective application did not yet migrate its code to // named view factories => bail out - OSL_ENSURE( false, "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" ); + OSL_FAIL( "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" ); return; } OSL_ENSURE( !sNewViewName.Equals( sCurrentViewName ), "SfxViewFrame::SaveCurrentViewData_Impl: suspicious: new and old view name are identical!" ); @@ -2231,38 +2231,35 @@ void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId ) sal_Bool SfxViewFrame::SwitchToViewShell_Impl ( sal_uInt16 nViewIdOrNo, /* > 0 - Registrierungs-Id der View, auf die umge- - schaltet werden soll, bzw. die erstmalig - erzeugt werden soll. + Registration-Id of the View, to which the + the method should switch, for example the one + that will be created. == 0 - Es soll die Default-View verwendet werden. */ + First use the Default view. */ sal_Bool bIsIndex /* sal_True - 'nViewIdOrNo' ist keine Registrations-Id sondern - ein Index in die f"ur die in diesem - <SfxViewFrame> dargestellte <SfxObjectShell>. + 'nViewIdOrNo' is no Registration-Id instead + an Index of <SfxViewFrame> in <SfxObjectShell>. */ ) -/* [Beschreibung] +/* [Description] - Interne Methode zum Umschalten auf eine andere <SfxViewShell>-Subklasse, - die in diesem SfxMDIFrame erzeugt werden soll. Existiert noch - keine SfxViewShell in diesem SfxMDIFrame, so wird erstmalig eine - erzeugt. + Internal Method for switching to another <SfxViewShell> subclass, + which should be created in this SfxMDIFrame. If no SfxViewShell exist + in this SfxMDIFrame, then one will first be created. - [R"uckgabewert] + [Return Value] sal_Bool sal_True - die angeforderte SfxViewShell wurde erzeugt - und eine ggf. bestehende gel"oscht + requested SfxViewShell was created and a + possibly existing one deleted sal_False - die angeforderte SfxViewShell konnte nicht - erzeugt werden, die bestehende SfxViewShell - existiert daher weiterhin + SfxViewShell requested could not be created, + the existing SfxViewShell thus continue to exist */ { @@ -2338,19 +2335,19 @@ sal_uInt16 SfxViewFrame::GetCurViewId() const //------------------------------------------------------------------------- void SfxViewFrame::ExecView_Impl ( - SfxRequest& rReq // der auszuf"uhrende <SfxRequest> + SfxRequest& rReq // The executable <SfxRequest> ) -/* [Beschreibung] +/* [Description] - Interne Methode zum Ausf"uhren der f"ur die <SfxShell> Subklasse - SfxViewFrame in der <SVIDL> beschriebenen Slots. + Internal method to run the slot for the <SfxShell> Subclass in the + SfxViewFrame <SVIDL> described slots. */ { DBG_CHKTHIS(SfxViewFrame, 0); - // Wenn gerade die Shells ausgetauscht werden... + // If the Shells are just being replaced... if ( !GetObjectShell() || !GetViewShell() ) return; @@ -2392,14 +2389,14 @@ void SfxViewFrame::ExecView_Impl case SID_NEWWINDOW: { - // Hack. demnaechst virtuelle Funktion + // Hack. at the moment a virtual Function if ( !GetViewShell()->NewWindowAllowed() ) { - OSL_ENSURE( false, "You should have disabled the 'Window/New Window' slot!" ); + OSL_FAIL( "You should have disabled the 'Window/New Window' slot!" ); return; } - // ViewData bei FrameSets rekursiv holen + // Get ViewData of FrameSets recursivly. GetFrame().GetViewData_Impl(); SfxMedium* pMed = GetObjectShell()->GetMedium(); @@ -2490,8 +2487,9 @@ sal_Bool impl_maxOpenDocCountReached() ++nOpenDocs; } catch(const css::uno::Exception&) - // A IndexOutOfBoundException can happen in multithreaded environments, - // where any other thread can change this container ! + // A IndexOutOfBoundException can happen in multithreaded + // environments, where any other thread can change this + // container ! { continue; } } @@ -2509,22 +2507,20 @@ sal_Bool impl_maxOpenDocCountReached() //------------------------------------------------------------------------- void SfxViewFrame::StateView_Impl ( - SfxItemSet& rSet /* leeres <SfxItemSet> mit <Which-Ranges>, - welche die Ids der zu erfragenden - Slots beschreiben. */ + SfxItemSet& rSet /* empty <SfxItemSet> with <Which-Ranges>, + which describes the Slot Ids */ ) -/* [Beschreibung] +/* [Description] - Diese interne Methode liefert in 'rSet' die Status der f"ur die - <SfxShell> Subklasse SfxViewFrame in der <SVIDL> beschriebenen <Slots>. + This internal methode returns in 'rSet' the Status for the <SfxShell> + Subclass SfxViewFrame in the <SVIDL> described <Slots>. - In 'rSet' sind dabei genau die vom SFx als ung"ultig erkannten - Slot-Ids als Which-ranges enthalten. Falls der an dieser Shell gesetzte - <SfxItemPool> f"ur einzelne Slot-Ids ein Mapping hat, werden die - entsprechenden Which-Ids verwendet, so da\s Items ggf. direkt mit - einer mit Which-Ids arbeitenden Core-::com::sun::star::script::Engine ausgetauscht werden - k"onnen. + Thus exactly those Slots-IDs that are recognized as beeing invalid by Sfx + are included as Which-ranges in 'rSet'. If there exists a mapping for + single slot-IDs of the <SfxItemPool> set in the shell, then the respective + Which-IDs are used so that items can be replaced directly with a working + Core::sun::com::star::script::Engine of the Which-IDs if possible. . */ { @@ -2533,11 +2529,11 @@ void SfxViewFrame::StateView_Impl SfxObjectShell *pDocSh = GetObjectShell(); if ( !pDocSh ) - // Ich bin gerade am Reloaden und Yielde so vor mich hin ... + // I'm just on reload and am yielding myself ... return; const sal_uInt16 *pRanges = rSet.GetRanges(); - DBG_ASSERT(pRanges, "Set ohne Bereich"); + DBG_ASSERT(pRanges, "Set with no Range"); while ( *pRanges ) { for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich ) @@ -2600,9 +2596,9 @@ void SfxViewFrame::ToTop() //------------------------------------------------------------------------- SfxViewFrame* SfxViewFrame::GetParentViewFrame() const -/* - Beschreibung: - Der ParentViewFrame ist der ViewFrame des ParentFrames +/* [Description] + + The ParentViewFrame is the ViewFrame of the ParentFrames. */ { SfxFrame *pFrame = GetFrame().GetParentFrame(); @@ -2611,9 +2607,9 @@ SfxViewFrame* SfxViewFrame::GetParentViewFrame() const //------------------------------------------------------------------------- SfxFrame& SfxViewFrame::GetFrame() const -/* - Beschreibung: - GetFrame liefert den Frame, in dem sich der ViewFrame befindet +/* [Description] + + GetFrame returns the Frame, in which the ViewFrame is located. */ { return pImp->rFrame; @@ -2692,11 +2688,11 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa nStartPos = rStr.indexOf( LINE_SEP, nStartPos ); if( nStartPos == -1 ) break; - nStartPos++; // nicht das \n. + nStartPos++; // not the \n. nLine++; } - DBG_ASSERTWARNING( nStartPos != STRING_NOTFOUND, "CutLines: Startzeile nicht gefunden!" ); + DBG_ASSERTWARNING( nStartPos != STRING_NOTFOUND, "CutLines: Start row not found!" ); if ( nStartPos != -1 ) { @@ -2704,7 +2700,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa for ( sal_Int32 i = 0; i < nLines; i++ ) nEndPos = rStr.indexOf( LINE_SEP, nEndPos+1 ); - if ( nEndPos == -1 ) // kann bei letzter Zeile passieren + if ( nEndPos == -1 ) // Can happen at the last row. nEndPos = rStr.getLength(); else nEndPos++; @@ -2730,9 +2726,9 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa } /* - add new recorded dispatch macro script into the application global basic lib container - It generates a new unique id for it and insert the macro by using this number as name for - the modul + add new recorded dispatch macro script into the application global basic + lib container. It generates a new unique id for it and insert the macro + by using this number as name for the modul */ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro ) { @@ -3014,7 +3010,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) if ( xLayoutManager.is() ) { rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )); - // Parameter auswerten + // Evaluate parameter. SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), sal_False); sal_Bool bShow( sal_True ); if ( !pShowItem ) @@ -3106,7 +3102,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet) DBG_MEMTEST(); const sal_uInt16 *pRanges = rSet.GetRanges(); - DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich"); + DBG_ASSERT(pRanges && *pRanges, "Set without range"); while ( *pRanges ) { for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich) @@ -3115,7 +3111,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet) { case SID_CURRENT_URL: { - // Bei internem InPlace den ContainerFrame nehmen + // Get the ContainerFrame, when internal InPlace. SfxViewFrame *pFrame = this; if ( pFrame->GetParentViewFrame_Impl() ) pFrame = pFrame->GetParentViewFrame_Impl(); @@ -3216,7 +3212,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet) } default: - //! DBG_ASSERT(FALSE, "Falscher Server fuer GetState"); break; } } @@ -3227,17 +3222,16 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet) void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) -/* [Beschreibung] +/* [Description] - Diese Methode kann in der Execute-Methode f"ur das ein- und ausschalten - von Child-Windows eingesetzt werden, um dieses inkl. API-Anbindung zu - implementieren. + This method can be included in the Execute method for the on- and off- + switching of ChildWindows, to implement this and API-bindings. - Einfach in der IDL als 'ExecuteMethod' eintragen. + Simply include as 'ExecuteMethod' in the IDL. */ { - // Parameter auswerten + // Evaluate Parameter sal_uInt16 nSID = rReq.GetSlot(); SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False); @@ -3291,14 +3285,14 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) sal_Bool bHasChild = HasChildWindow(nSID); bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; - // ausf"uhren + // Perform action. if ( !pShowItem || bShow != bHasChild ) ToggleChildWindow( nSID ); GetBindings().Invalidate( nSID ); GetDispatcher()->Update_Impl( sal_True ); - // ggf. recorden + // Record if possible. if ( nSID == SID_HYPERLINK_DIALOG || nSID == SID_SEARCH_DLG ) { rReq.Ignore(); @@ -3314,12 +3308,12 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) -/* [Beschreibung] +/* [Description] - Diese Methode kann in der Status-Methode f"ur das Ein- und Ausschalt- - Zustand von Child-Windows eingesetzt werden, um dieses zu implementieren. + This method can be used in the state method for the on and off-state + of child-windows, in order to implement this. - Einfach in der IDL als 'StateMethod' eintragen. + Just register the IDL as 'StateMethod'. */ { @@ -3357,7 +3351,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) { if ( !KnowsChildWindow( nSID ) ) { - OSL_ENSURE( false, "SID_TASKPANE state requested, but no task pane child window exists for this ID!" ); + OSL_FAIL( "SID_TASKPANE state requested, but no task pane child window exists for this ID!" ); rState.DisableItem( nSID ); } else if ( !moduleHasToolPanels( *pImp ) ) diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 78f26f34cb28..b43051b22d45 100755 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -146,21 +146,20 @@ static String _getTabString() //-------------------------------------------------------------------- String SfxViewFrame::UpdateTitle() -/* [Beschreibung] +/* [Description] - Mit dieser Methode kann der SfxViewFrame gezwungen werden, sich sofort - den neuen Titel vom der <SfxObjectShell> zu besorgen. + With this method, can the SfxViewFrame be forced to immediately provide + the new title from the <SfxObjectShell>. - [Anmerkung] + [Note] - Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener - zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren - m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxTopViewFrames) - jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung - nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden. + This is for example necessary if one listens to the SfxObjectShell as + SfxListener and then react on the <SfxSimpleHint> SFX_HINT_TITLECHANGED, + then query the title of his views. However these views (SfxTopViewFrames) + are also SfxListener and because the order of notifications might not be + fixed, the title update will be enforced in advance. - - [Beispiel] + [Example] void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { @@ -194,7 +193,7 @@ String SfxViewFrame::UpdateTitle() return String(); // if ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) -// // kein UpdateTitle mit Embedded-ObjectShell +// // No UpdateTitle with Embedded-ObjectShell // return String(); const SfxMedium *pMedium = pObjSh->GetMedium(); @@ -207,10 +206,10 @@ String SfxViewFrame::UpdateTitle() } if ( aURL != pImp->aActualURL ) - // URL hat sich ge"andert + // URL has changed pImp->aActualURL = aURL; - // gibt es noch eine weitere View? + // Is there another view? sal_uInt16 nViews=0; for ( SfxViewFrame *pView= GetFirst(pObjSh); pView && nViews<2; @@ -219,15 +218,15 @@ String SfxViewFrame::UpdateTitle() !IsDowning_Impl()) nViews++; - // Titel des Fensters + // Window Title String aTitle; if ( nViews == 2 || pImp->nDocViewNo > 1 ) - // dann die Nummer dranh"angen + // Then attach the number aTitle = pObjSh->UpdateTitle( NULL, pImp->nDocViewNo ); else aTitle = pObjSh->UpdateTitle(); - // Name des SbxObjects + // SbxObjects name String aSbxName = pObjSh->SfxShell::GetName(); if ( IsVisible() ) { @@ -271,7 +270,7 @@ String SfxViewFrame::UpdateTitle() void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) { - // Wenn gerade die Shells ausgetauscht werden... + // If presently the shells are replaced... if ( !GetObjectShell() || !GetViewShell() ) return; @@ -284,20 +283,19 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False); sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0; - // ausfuehren SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl(); if ( bShow ) { - // Zuerst die Floats auch anzeigbar machen + // First, make the floats viewable pWorkWin->MakeChildsVisible_Impl( bShow ); GetDispatcher()->Update_Impl( sal_True ); - // Dann anzeigen + // Then view it GetBindings().HidePopups( !bShow ); } else { - // Alles hiden + // Hide all SfxBindings *pBind = &GetBindings(); while ( pBind ) { @@ -357,7 +355,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) if ( GetViewShell()->PrepareClose() ) { - // weitere Views auf dasselbe Doc? + // More Views on the same Document? SfxObjectShell *pDocSh = GetObjectShell(); int bOther = sal_False; for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh ); @@ -365,14 +363,14 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) ) bOther = (pFrame != this); - // Doc braucht nur gefragt zu werden, wenn keine weitere View + // Document only needs to be queried, if no other View present. sal_Bool bClosed = sal_False; sal_Bool bUI = sal_True; if ( ( bOther || pDocSh->PrepareClose( bUI ) ) ) { if ( !bOther ) pDocSh->SetModified( sal_False ); - rReq.Done(); // unbedingt vor Close() rufen! + rReq.Done(); // Must call this before Close()! bClosed = sal_False; try { @@ -402,7 +400,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet ) return; const sal_uInt16 *pRanges = rSet.GetRanges(); - DBG_ASSERT(pRanges, "Set ohne Bereich"); + DBG_ASSERT(pRanges, "Set without Range"); while ( *pRanges ) { for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich ) @@ -462,7 +460,7 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest ) { case SID_BROWSE_FORWARD: case SID_BROWSE_BACKWARD: - OSL_ENSURE( false, "SfxViewFrame::INetExecute_Impl: SID_BROWSE_FORWARD/BACKWARD are dead!" ); + OSL_FAIL( "SfxViewFrame::INetExecute_Impl: SID_BROWSE_FORWARD/BACKWARD are dead!" ); break; case SID_CREATELINK: { @@ -494,7 +492,7 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet ) rItemSet.DisableItem( SID_BROWSE_FORWARD ); rItemSet.DisableItem( SID_BROWSE_BACKWARD ); - // Add/SaveToBookmark bei BASIC-IDE, QUERY-EDITOR etc. disablen + // Add/SaveToBookmark at BASIC-IDE, QUERY-EDITOR etc. disable SfxObjectShell *pDocSh = GetObjectShell(); sal_Bool bPseudo = pDocSh && !( pDocSh->GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC ); sal_Bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED; @@ -509,18 +507,18 @@ void SfxViewFrame::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY void SfxViewFrame::Activate( sal_Bool bMDI ) { - DBG_ASSERT(GetViewShell(), "Keine Shell"); + DBG_ASSERT(GetViewShell(), "No Shell"); if ( bMDI ) pImp->bActive = sal_True; -//(mba): hier evtl. wie in Beanframe NotifyEvent ?! +//(mba): here maybe as in Beanframe NotifyEvent ?! } void SfxViewFrame::Deactivate( sal_Bool bMDI ) { - DBG_ASSERT(GetViewShell(), "Keine Shell"); + DBG_ASSERT(GetViewShell(), "No Shell"); if ( bMDI ) pImp->bActive = sal_False; -//(mba): hier evtl. wie in Beanframe NotifyEvent ?! +//(mba): here maybe as in Beanframe NotifyEvent ?! } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 1fb0e3f8e171..4c02651073c2 100755 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -356,13 +356,12 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt class SfxDialogExecutor_Impl -/* [Beschreibung] +/* [Description] - Eine Instanz dieser Klasse wird f"ur die Laufzeit des Printer-Dialogs - erzeugt, um im dessen Click-Handler f"ur die Zus"atze den per - virtueller Methode von der abgeleiteten SfxViewShell erzeugten - Print-Options-Dialog zu erzeugen und die dort eingestellten Optionen - als SfxItemSet zu zwischenzuspeichern. + An instance of this class is created for the life span of the + printer dialogue, to create in its click handler for the additions by the + virtual method of the derived SfxViewShell generated print options dialogue + and to cache the options set there as SfxItemSet. */ { @@ -401,7 +400,7 @@ SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSe IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG ) { - // Options lokal merken + // Options noted locally if ( !_pOptions ) { DBG_ASSERT( _pSetupParent, "no dialog parent" ); @@ -409,7 +408,7 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG ) _pOptions = ( (SfxPrinter*)_pSetupParent->GetPrinter() )->GetOptions().Clone(); } - // Dialog ausf"uhren + // Create Dialog SfxPrintOptionsDialog* pDlg = new SfxPrintOptionsDialog( static_cast<Window*>(_pSetupParent), _pViewSh, _pOptions ); if ( _bHelpDisabled ) @@ -429,15 +428,16 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG ) SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) -/* Interne Methode zum Setzen der Unterschiede von 'pNewPrinter' zum - aktuellen Printer. pNewPrinter wird entweder "ubernommen oder gel"oscht. + +/* Internal method for setting the differences between 'pNewPrinter' to the + current printer. pNewPrinter is either taken over or deleted. */ { - // aktuellen Printer holen + // get current Printer SfxPrinter *pDocPrinter = GetPrinter(); - // Printer-Options auswerten + // Evaluate Printer Options bool bOriToDoc = false; bool bSizeToDoc = false; if ( &pDocPrinter->GetOptions() ) @@ -449,15 +449,15 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False; } - // vorheriges Format und Size feststellen + // Determine the previous format and size Orientation eOldOri = pDocPrinter->GetOrientation(); Size aOldPgSz = pDocPrinter->GetPaperSizePixel(); - // neues Format und Size feststellen + // Determine the new format and size Orientation eNewOri = pNewPrinter->GetOrientation(); Size aNewPgSz = pNewPrinter->GetPaperSizePixel(); - // "Anderungen am Seitenformat feststellen + // Determine the changes in page format sal_Bool bOriChg = (eOldOri != eNewOri) && bOriToDoc; sal_Bool bPgSzChg = ( aOldPgSz.Height() != ( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) || @@ -465,7 +465,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) ( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) && bSizeToDoc; - // Message und Flags f"ur Seitenformat-"Anderung zusammenstellen + // Message and Flags for page format, summaries changes String aMsg; sal_uInt16 nNewOpt=0; if( bOriChg && bPgSzChg ) @@ -484,49 +484,49 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) nNewOpt = SFX_PRINTER_CHG_SIZE; } - // in dieser Variable sammeln, was sich so ge"aendert hat + // Summaries in this variable what has been changed. sal_uInt16 nChangedFlags = 0; - // ggf. Nachfrage, ob Seitenformat vom Drucker "ubernommen werden soll + // Ask if possible, if page format should be taken over from printer. if ( ( bOriChg || bPgSzChg ) && RET_YES == QueryBox(0, WB_YES_NO | WB_DEF_OK, aMsg).Execute() ) - // Flags mit "Anderungen f"ur <SetPrinter(SfxPrinter*)> mitpflegen + // Flags wich changes for <SetPrinter(SfxPrinter*)> are maintained nChangedFlags |= nNewOpt; - // fuer den MAC sein "temporary of class String" im naechsten if() + // For the MAC to have its "temporary of class String" in next if() String aTempPrtName = pNewPrinter->GetName(); String aDocPrtName = pDocPrinter->GetName(); - // Wurde der Drucker gewechselt oder von Default auf Specific - // oder umgekehrt geaendert? + // Was the printer selection changed from Default to Specific + // or the other way around? if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) ) { - // neuen Printer "ubernehmen + // Get the new printer // pNewPrinter->SetOrigJobSetup( pNewPrinter->GetJobSetup() ); nChangedFlags |= SFX_PRINTER_PRINTER|SFX_PRINTER_JOBSETUP; pDocPrinter = pNewPrinter; } else { - // Extra-Optionen vergleichen + // Compare extra options if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) ) { - // Options haben sich geaendert + // Option have changed pDocPrinter->SetOptions( pNewPrinter->GetOptions() ); nChangedFlags |= SFX_PRINTER_OPTIONS; } - // JobSetups vergleichen + // Compare JobSetups JobSetup aNewJobSetup = pNewPrinter->GetJobSetup(); JobSetup aOldJobSetup = pDocPrinter->GetJobSetup(); if ( aNewJobSetup != aOldJobSetup ) { - // JobSetup hat sich geaendert (=> App mu\s neu formatieren) + // JobSetup has chaged => App must be formatted again) // pDocPrinter->SetOrigJobSetup( aNewJobSetup ); nChangedFlags |= SFX_PRINTER_JOBSETUP; } - // alten, ver"anderten Printer behalten + // Keep old changed Printer. pDocPrinter->SetPrinterProps( pNewPrinter ); delete pNewPrinter; } @@ -538,10 +538,9 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) } //------------------------------------------------------------------------- -// Unter WIN32 tritt leider das Problem auf, dass nichts gedruckt -// wird, wenn SID_PRINTDOCDIRECT auflaueft; bisher bekannte, -// einzige Abhilfe ist in diesem Fall das Abschalten der Optimierungen -// (KA 17.12.95) +// Sadly enough the problem arises with WIN32 that nothing is printed when +// SID_PRINTDOCDIRECT auflaueft. At the moment the only known solution in this +// case is to turn off the optimazation. #ifdef _MSC_VER #pragma optimize ( "", off ) #endif @@ -609,7 +608,8 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) //FIXME: how to transport "bPrintOnHelp"? // no help button in dialogs if called from the help window - // (pressing help button would exchange the current page inside the help document that is going to be printed!) + // (pressing help button would exchange the current page inside the help + // document that is going to be printed!) String aHelpFilterName( DEFINE_CONST_UNICODE("writer_web_HTML_help") ); SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium(); const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL; @@ -822,7 +822,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) } } -// Optimierungen wieder einschalten +// Turn on optimazation again. #ifdef _MSC_VER #pragma optimize ( "", on ) #endif diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 18b924053821..f1a9126bb037 100755 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -836,100 +836,100 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) SfxWhichIter aIter( rSet ); for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() ) { - switch ( nSID ) - { - case SID_STYLE_CATALOG: - { - if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) ) - rSet.DisableItem( nSID ); - break; - } - - // Printer-Funktionen - case SID_PRINTDOC: - case SID_PRINTDOCDIRECT: - case SID_SETUPPRINTER: - case SID_PRINTER_NAME: - { - bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks; - bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); - if ( bEnabled ) - { - SfxPrinter *pPrinter = GetPrinter(sal_False); + switch ( nSID ) + { + case SID_STYLE_CATALOG: + { + if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) ) + rSet.DisableItem( nSID ); + break; + } - if ( SID_PRINTDOCDIRECT == nSID ) + // Printer functions + case SID_PRINTDOC: + case SID_PRINTDOCDIRECT: + case SID_SETUPPRINTER: + case SID_PRINTER_NAME: { - rtl::OUString aPrinterName; - if ( pPrinter != NULL ) - aPrinterName = pPrinter->GetName(); - else - aPrinterName = Printer::GetDefaultPrinterName(); - if ( aPrinterName.getLength() > 0 ) + bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks; + bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); + if ( bEnabled ) { - uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); + SfxPrinter *pPrinter = GetPrinter(sal_False); - ::rtl::OUStringBuffer aBuffer( 60 ); - aBuffer.append( RetrieveLabelFromCommand( + if ( SID_PRINTDOCDIRECT == nSID ) + { + rtl::OUString aPrinterName; + if ( pPrinter != NULL ) + aPrinterName = pPrinter->GetName(); + else + aPrinterName = Printer::GetDefaultPrinterName(); + if ( aPrinterName.getLength() > 0 ) + { + uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); + + ::rtl::OUStringBuffer aBuffer( 60 ); + aBuffer.append( RetrieveLabelFromCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )), xFrame )); - aBuffer.appendAscii( " (" ); - aBuffer.append( aPrinterName ); - aBuffer.appendAscii( ")" ); + aBuffer.appendAscii( " (" ); + aBuffer.append( aPrinterName ); + aBuffer.appendAscii( ")" ); - rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); - } - } - bEnabled = !pPrinter || !pPrinter->IsPrinting(); - } - if ( !bEnabled ) - { - // will now be handled by requeing the request - /* rSet.DisableItem( SID_PRINTDOC ); - rSet.DisableItem( SID_PRINTDOCDIRECT ); - rSet.DisableItem( SID_SETUPPRINTER ); */ + rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); } - break; + } + bEnabled = !pPrinter || !pPrinter->IsPrinting(); } - - // Mail-Funktionen - case SID_MAIL_SENDDOCASPDF: - case SID_MAIL_SENDDOC: - case SID_MAIL_SENDDOCASFORMAT: + if ( !bEnabled ) { - sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN ); - if ( !bEnable ) - rSet.DisableItem( nSID ); - break; + // will now be handled by requeing the request + /* rSet.DisableItem( SID_PRINTDOC ); + rSet.DisableItem( SID_PRINTDOCDIRECT ); + rSet.DisableItem( SID_SETUPPRINTER ); */ } + break; + } - // PlugIns running - case SID_PLUGINS_ACTIVE: - { - rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, - !pImp->m_bPlugInsActive) ); - break; - } -/* - // SelectionText - case SID_SELECTION_TEXT: - { - rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) ); - break; - } + // Mail functions + case SID_MAIL_SENDDOCASPDF: + case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASFORMAT: + { + sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN ); + if ( !bEnable ) + rSet.DisableItem( nSID ); + break; + } - // SelectionTextExt - case SID_SELECTION_TEXT_EXT: - { - rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) ); - break; - } -*/ - case SID_STYLE_FAMILY : - { - rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) ); - break; - } - } + // PlugIns running + case SID_PLUGINS_ACTIVE: + { + rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, + !pImp->m_bPlugInsActive) ); + break; + } + /* + // SelectionText + case SID_SELECTION_TEXT: + { + rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) ); + break; + } + + // SelectionTextExt + case SID_SELECTION_TEXT_EXT: + { + rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) ); + break; + } + */ + case SID_STYLE_FAMILY : + { + rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) ); + break; + } + } } } @@ -948,12 +948,11 @@ void SfxViewShell::SetZoomFactor( const Fraction &rZoomX, //-------------------------------------------------------------------- ErrCode SfxViewShell::DoVerb(long /*nVerb*/) -/* [Beschreibung] - - Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren. - Da dieses Objekt nur den abgeleiteten Klassen bekannt ist, muss DoVerb - dort "uberschrieben werden. +/* [Description] + Virtual Method used to perform a Verb on a selected Object. + Since this Object is just known by the derived classes, DoVerb + must be overloaded. */ { @@ -1103,8 +1102,8 @@ void SfxViewShell::Deactivate(sal_Bool /*bMDI*/) void SfxViewShell::AdjustPosSizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// Upper left corner Tools in Frame-Window + const Size& /*rSize*/ // All available sizes. ) { @@ -1115,20 +1114,19 @@ void SfxViewShell::AdjustPosSizePixel void SfxViewShell::Move() -/* [Beschreibung] +/* [Description] - Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die - SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt. + This virtual Method is called when the window displayed in the + SfxViewShell gets a StarView-Move() notification. - Die Basisimplementierung braucht nicht gerufen zu werden. + This base implementation does not have to be called. . + [Note] - [Anmerkung] + This Method can be used to cancel a selection, in order to catch the + mouse movement which is due to moving a window. - Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen, - um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen. - - Zur Zeit funktioniert die Benachrichtigung nicht In-Place. + For now the notification does not work In-Place. */ { @@ -1138,48 +1136,45 @@ void SfxViewShell::Move() void SfxViewShell::OuterResizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// Upper left corner Tools in Frame-Window + const Size& /*rSize*/ // All available sizes. ) -/* [Beschreibung] +/* [Description] - Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse - der View zu reagieren. Dabei definieren wir die View als das Edit-Window - zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale). + This Method has to be overloaded to be able to react to the size-change of + the View. Thus the View is defined as the Edit window and also the + attached Tools are defined (for example the ruler). - Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. + The Edit window must not be changed either in size or position. - Die Vis-Area der SfxObjectShell, dessen Skalierung und Position - d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei, - das Ver"andern der Gr"o\se der Vis-Area. + The Vis-Area of SfxObjectShell, its scale and position can be changed + here. The mainuse is to change the size of the Vis-Area. - "Andert sich durch die neue Berechnung der Border, so mu\s dieser - mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden. - Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von - Tools erlaubt. + If the Border is changed due to the new calculation then this has to be set + by <SfxViewShell::SetBorderPixel(const SvBorder&)>. The Postioning of Tools + is only allowed after the calling of 'SetBorderPixel'. + [Example] - [Beispiel] + void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz ) - void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz ) - { - // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen! - // (wegen folgender Border-Berechnung) - Point aHLinPos...; Size aHLinSz...; - ... - - // Border f"ur Tools passend zu rSize berechnen und setzen - SvBorder aBorder... - SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt - - // Tools anordnen - pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); - ... - } +{ + // Calculate Tool position and size externally, do not set! + // (due to the following Border calculation) + Point aHLinPos...; Size aHLinSz...; + ... + // Calculate and Set a Border of Tools which matches rSize. + SvBorder aBorder... + SetBorderPixel( aBorder ); // Allow Positioning from here on. - [Querverweise] + // Arrange Tools + pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); + ... + } + + [Cross-reference] <SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)> */ @@ -1193,45 +1188,44 @@ void SfxViewShell::OuterResizePixel void SfxViewShell::InnerResizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // dem Edit-Win zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// Upper left corner Tools in Frame-Window + const Size& /*rSize*/ // All available sizes. ) -/* [Beschreibung] - - Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse - des Edit-Windows zu reagieren. +/* [Description] - Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. - Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder - Position d"urfen ver"andert werden. + This Method has to be overloaded to be able to react to the size-change of + the Edit window. - "Andert sich durch die neue Berechnung der Border, so mu\s dieser - mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden. - Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von - Tools erlaubt. + The Edit window must not be changed either in size or position. + Neither the Vis-Area of SfxObjectShell nor its scale or position are + allowed to be changed + If the Border is changed due to the new calculation then is has to be set + by <SfxViewShell::SetBorderPixel(const SvBorder&)>. + The Postioning of Tools is only allowed after the calling of + 'SetBorderPixel'. - [Beispiel] - void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz ) - { - // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen! - // (wegen folgender Border-Berechnung) - Point aHLinPos...; Size aHLinSz...; - ... - - // Border f"ur Tools passend zu rSz berechnen und setzen - SvBorder aBorder... - SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt - - // Tools anordnen - pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); - ... - } + [Note] + void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz ) + { + // Calculate Tool position and size internally, do not set! + // (due to the following Border calculation) + Point aHLinPos...; Size aHLinSz...; + ... + + // Calculate and Set a Border of Tools which matches rSize. + SvBorder aBorder... + SetBorderPixel( aBorder ); // Allow Positioning from here on. + + // Arrange Tools + pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); + ... + } - [Querverweise] + [Cross-reference] <SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)> */ @@ -1288,29 +1282,28 @@ const SvBorder& SfxViewShell::GetBorderPixel() const void SfxViewShell::SetWindow ( - Window* pViewPort // Pointer auf das Datenfenster bzw. 0 im Destruktor + Window* pViewPort // For example Null pointer in the Destructor. ) -/* [Beschreibung] +/* [Description] - Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt. - Dieses wird f"ur den In-Place-Container und f"ur das korrekte - Wiederherstellen des Focus ben"otigt. + With this method the SfxViewShell is set in the data window. This is + needed for the in-place container and for restoring the proper focus. - Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten. + Even in-place-active the conversion of the ViewPort Windows is forbidden. */ { if( pWindow == pViewPort ) return; - // ggf. vorhandene IP-Clients disconnecten + // Disconnect existing IP-Clients if possible DisconnectAllClients(); //TODO: should we have a "ReconnectAllClients" method? DiscardClients_Impl(); - // View-Port austauschen + // Switch View-Port sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( sal_True ) : sal_False; pWindow = pViewPort; @@ -1323,7 +1316,7 @@ void SfxViewShell::SetWindow if ( bHadFocus && pWindow ) pWindow->GrabFocus(); //TODO/CLEANUP - //brauchen wir die Methode doch noch?! + //Do we still need this Method?! //SFX_APP()->GrabFocus( pWindow ); } @@ -1339,8 +1332,9 @@ Size SfxViewShell::GetOptimalSizePixel() const SfxViewShell::SfxViewShell ( - SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View dargestellt wird */ - sal_uInt16 nFlags /* siehe <SfxViewShell-Flags> */ + SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be + displayed in this View */ + sal_uInt16 nFlags /* See <SfxViewShell-Flags> */ ) : SfxShell(this) @@ -1365,8 +1359,8 @@ SfxViewShell::SfxViewShell SetPool( &pViewFrame->GetObjectShell()->GetPool() ); StartListening(*pViewFrame->GetObjectShell()); - // in Liste eintragen - const SfxViewShell *pThis = this; // wegen der kranken Array-Syntax + // Insert into list + const SfxViewShell *pThis = this; // due to the sick Array syntax SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl(); rViewArr.Insert(pThis, rViewArr.Count() ); } @@ -1377,7 +1371,7 @@ SfxViewShell::~SfxViewShell() { DBG_DTOR(SfxViewShell, 0); - // aus Liste austragen + // Remove from list const SfxViewShell *pThis = this; SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl(); rViewArr.Remove( rViewArr.GetPos(pThis) ); @@ -1403,7 +1397,7 @@ SfxViewShell::~SfxViewShell() sal_uInt16 SfxViewShell::PrepareClose ( - sal_Bool bUI, // sal_True: Dialoge etc. erlaubt, sal_False: silent-mode + sal_Bool bUI, // TRUE: Allow Dialog and so on, FALSE: silent-mode sal_Bool /*bForBrowsing*/ ) { @@ -1458,12 +1452,12 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController ) SdrView* SfxViewShell::GetDrawView() const -/* [Beschreibung] +/* [Description] - Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn - der Property-Editor zur Verf"ugung stehen soll. + This virtual Method has to be overloded by the sub classes, to be able + make the Property-Editor available. - Die Default-Implementierung liefert immer 0. + The default implementation does always return zero. */ { @@ -1474,27 +1468,26 @@ SdrView* SfxViewShell::GetDrawView() const String SfxViewShell::GetSelectionText ( - sal_Bool /*bCompleteWords*/ /* sal_False (default) - Nur der tats"achlich selektierte Text wird - zur"uckgegeben. - - TRUE - Der selektierte Text wird soweit erweitert, - da\s nur ganze W"orter zur"uckgegeben werden. - Als Worttrenner gelten White-Spaces und die - Satzzeichen ".,;" sowie einfache und doppelte - Anf"uhrungszeichen. - */ + sal_Bool /*bCompleteWords*/ /* FALSE (default) + Only the actual selected text is returned. + + TRUE + The selected text is expanded so that only + whole words are returned. As word separators + these are used: white spaces and punctuation + ".,;" and single and double quotes. + */ ) -/* [Beschreibung] +/* [Description] - Diese Methode kann von Anwendungsprogrammierer "uberladen werden, - um einen Text zur"uckzuliefern, der in der aktuellen Selektion - steht. Dieser wird z.B. beim Versenden (email) verwendet. + This Method can be overloaded by the programmers to return a text that + is included in the current selection. This is for example used when + sending emails. - Mit "CompleteWords == TRUE" ger"ufen, reicht z.B. auch der Cursor, - der in einer URL steht, um die gesamte URL zu liefern. + When called with "CompleteWords == TRUE", it is for example sufficent + with having the Cursor positioned somewhere within an URL in-order + to have the entire URL returned. */ { @@ -1505,11 +1498,11 @@ String SfxViewShell::GetSelectionText sal_Bool SfxViewShell::HasSelection( sal_Bool ) const -/* [Beschreibung] +/* [Description] - Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der - aktuellen View etwas selektiert ist. Wenn der Parameter <sal_Bool> sal_True ist, - wird abgefragt, ob Text selektiert ist. + With this virtual Method can a for example a Dialog be queried, to + check if something is selected in the current view. If the Parameter + is <BOOL> TRUE then it is checked wether some text is selected. */ { @@ -1520,26 +1513,25 @@ sal_Bool SfxViewShell::HasSelection( sal_Bool ) const void SfxViewShell::SetSubShell( SfxShell *pShell ) -/* [Beschreibung] +/* [Description] - Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet - werden, die automatisch unmittelbar nach der SfxViewShell auf den - SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr - gepoppt wird. + With this method a selection or cursor Shell can be registered, which are + automatically pushed to SfxDispatcher immediately after SfxViewShell, and + and automatically popped immediately before SfxViewShell. - Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell - sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell - Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete - ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle - Sub-Shell abgemeldet werden. + If the SfxViewShell instance is already pushed, then pShell will be + immediately pushed as well. Is another SfxShell instance registered by + using SetSubShell, which was previously registered, the previously + registered shell is popped automatically if possible. With pShell==0 + the current sub-shell be can thus be unregistered. */ { - // ist diese ViewShell "uberhaupt aktiv? + // Is this ViewShell even active? SfxDispatcher *pDisp = pFrame->GetDispatcher(); if ( pDisp->IsActive(*this) ) { - // Dispatcher updaten + // Update Dispatcher if ( pSubShell ) pDisp->Pop(*pSubShell); if ( pShell ) @@ -1777,26 +1769,25 @@ sal_Bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey) bool SfxViewShell::KeyInput( const KeyEvent &rKeyEvent ) -/* [Beschreibung] +/* [Description] - Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser - SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten - Tasten (Accelerator) aus. + This Method executes the KeyEvent 'rKeyEvent' of the Keys (Accelerator) + configured either direct or indirect (for example by the Application) + in the SfxViewShell. - - [R"uckgabewert] + [Return value] bool TRUE - die Taste ist konfiguriert, der betreffende - Handler wurde gerufen + The Key (Accelerator) is configured and the + the associated Handler was called - FALSE - die Taste ist nicht konfiguriert, es konnte - also kein Handler gerufen werden + FALSE + The Key (Accelerator) is not configured and + subsequently no Handler was called + [Cross-reference] - [Querverweise] - <SfxApplication::KeyInput(const KeyEvent&)> + <SfxApplication::KeyInput(const KeyEvent&)> */ { return ExecKey_Impl(rKeyEvent); @@ -1811,11 +1802,11 @@ bool SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent ) void SfxViewShell::ShowCursor( bool /*bOn*/ ) -/* [Beschreibung] +/* [Description] - Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx - aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht - z.B. bei laufendem <SfxProgress>. + This Method has to be overloaded by the subclasses so that SFx from + the Cursor can be switched on and off. This happes for example with + with the running <SfxProgress>. */ { @@ -1825,17 +1816,16 @@ void SfxViewShell::ShowCursor( bool /*bOn*/ ) void SfxViewShell::GotFocus() const -/* [Beschreibung] - - Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn - das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die - M"oglichkeit, den Accelerator einzuschalten. +/* [Description] + This Method has to be called by the programmer, when the + Edit window has received the focus. This gives for example the SFx + the power to turn on the accelerator. - [Anmerkung] + [Note] - <StarView> liefert leider keine M"oglichkeit, solche Events - 'von der Seite' einzuh"angen. + <StarView> does sadly enough not provide the possibillity to attach + such "side-way" events. */ { @@ -1880,7 +1870,7 @@ void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const void SfxViewShell::AdjustVisArea(const Rectangle& rRect) { - DBG_ASSERT (pFrame, "Kein Frame?"); + DBG_ASSERT (pFrame, "No Frame?"); GetObjectShell()->SetVisArea( rRect ); } @@ -1949,11 +1939,10 @@ sal_Bool SfxViewShell::PlugInsActive() const //-------------------------------------------------------------------- void SfxViewShell::DiscardClients_Impl() -/* [Beschreibung] +/* [Description] - Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das - Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne - Speichern gew"ahlt hatte. + The purpose of this Method is to prevent the saving of Objects when closing + the Document, if the user has chosen to close without saving. */ { @@ -2019,7 +2008,7 @@ const Size& SfxViewShell::GetMargin() const void SfxViewShell::SetMargin( const Size& rSize ) { - // Der default-Margin wurde "geeicht" mit www.apple.com !! + // the default margin was verified using www.apple.com !! Size aMargin = rSize; if ( aMargin.Width() == -1 ) aMargin.Width() = DEFAULT_MARGIN_WIDTH; |