summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objmisc.cxx
diff options
context:
space:
mode:
authorAlbert Thuswaldner <albert.thuswaldner@gmail.com>2011-03-10 18:00:38 +0530
committerMuthu Subramanian K <sumuthu@novell.com>2011-03-10 18:00:38 +0530
commitdcd5dee88e3c1185638b190553bef65c2ef6566f (patch)
treeb9312420968320ffe5553836787da869adbb8e1d /sfx2/source/doc/objmisc.cxx
parent847b372451211d4e03c7f007c5e1149d70039648 (diff)
Translations and typo fixes (3).
Diffstat (limited to 'sfx2/source/doc/objmisc.cxx')
-rw-r--r--sfx2/source/doc/objmisc.cxx217
1 files changed, 111 insertions, 106 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index d8d00bdc6cfa..fb337fb6e3c6 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -295,7 +295,7 @@ void SfxObjectShell::EnableSetModified( sal_Bool bEnable )
{
#ifdef DBG_UTIL
if ( bEnable == pImp->m_bEnableSetModified )
- DBG_WARNING( "SFX_PERSIST: EnableSetModified 2x mit dem gleichen Wert gerufen" );
+ DBG_WARNING( "SFX_PERSIST: EnableSetModified 2x called with the same value" );
#endif
pImp->m_bEnableSetModified = bEnable;
}
@@ -353,7 +353,7 @@ void SfxObjectShell::SetModified( sal_Bool bModifiedP )
{
#ifdef DBG_UTIL
if ( !bModifiedP && !IsEnableSetModified() )
- DBG_WARNING( "SFX_PERSIST: SetModified( sal_False ), obwohl IsEnableSetModified() == sal_False" );
+ DBG_WARNING( "SFX_PERSIST: SetModified( sal_False ), although IsEnableSetModified() == sal_False" );
#endif
if( !IsEnableSetModified() )
@@ -371,7 +371,7 @@ void SfxObjectShell::SetModified( sal_Bool bModifiedP )
void SfxObjectShell::ModifyChanged()
{
if ( pImp->bClosing )
- // SetModified aus dem dispose des Models!
+ // SetModified dispose of the models!
return;
{DBG_CHKTHIS(SfxObjectShell, 0);}
@@ -391,11 +391,10 @@ void SfxObjectShell::ModifyChanged()
sal_Bool SfxObjectShell::IsReadOnlyUI() const
-/* [Beschreibung]
+/* [Description]
- Liefert sal_True, wenn das Dokument fuer die UI wie r/o behandelt werden
- soll. Dieses ist unabhaengig vom tatsaechlichen r/o, welches per
- <IsReadOnly()> erfragbar ist.
+ Returns sal_True if the document for the UI is treated as r/o. This is
+ regardless of the actual r/o, which can be checked with <IsReadOnly()>.
*/
{
@@ -406,9 +405,9 @@ sal_Bool SfxObjectShell::IsReadOnlyUI() const
sal_Bool SfxObjectShell::IsReadOnlyMedium() const
-/* [Beschreibung]
+/* [Description]
- Liefert sal_True, wenn das Medium r/o ist bzw. r/o geoeffnet wurde.
+ Returns sal_True when the medium is r/o, for instance when opened as r/o.
*/
{
@@ -421,10 +420,10 @@ sal_Bool SfxObjectShell::IsReadOnlyMedium() const
void SfxObjectShell::SetReadOnlyUI( sal_Bool bReadOnly )
-/* [Beschreibung]
+/* [Description]
- Schaltet das Dokument in einen r/o bzw. r/w Zustand ohne es neu
- zu laden und ohne die Open-Modi des Mediums zu aendern.
+ Turns the document in an r/o and r/w state respectively without reloading
+ it and without changing the open mode of the medium.
*/
{
@@ -512,17 +511,18 @@ void SfxObjectShell::SetMacroMode_Impl( sal_Bool bModal )
void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal )
{
- // nur Broadcasten wenn modifiziert, sonst ggf. Endlosrekursion
+ // Broadcast only if modified, or otherwise it will possibly go into
+ // an endless loop
if ( !pImp->bModalMode != !bModal )
{
- // zentral mitz"ahlen
+ // Central count
sal_uInt16 &rDocModalCount = SFX_APP()->Get_Impl()->nDocModalMode;
if ( bModal )
++rDocModalCount;
else
--rDocModalCount;
- // umschalten
+ // Switch
pImp->bModalMode = bModal;
Broadcast( SfxSimpleHint( SFX_HINT_MODECHANGED ) );
}
@@ -774,38 +774,39 @@ IndexBitSet& SfxObjectShell::GetNoSet_Impl()
void SfxObjectShell::SetTitle
(
- const String& rTitle // der neue Titel des Dokuments
+ const String& rTitle // the new Document Title
)
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann der Titel des Dokuments gesetzt werden.
- Dieser entspricht initial dem kompletten Dateinamen. Ein Setzen
- des Titels wirkt jedoch nicht zu"uck auf den Dateinamen; er wird
- jedoch in den Caption-Bars der MDI-Fenster angezeigt.
+ With this method, the title of the document can be set.
+ This corresponds initially to the full file name. A setting of the
+ title does not affect the file name, but it will be shown in the
+ Caption-Bars of the MDI-window.
*/
{
DBG_CHKTHIS(SfxObjectShell, 0);
- // nix zu tun?
+ // Nothing to do?
if ( ( ( HasName() && pImp->aTitle == rTitle )
|| ( !HasName() && GetTitle() == rTitle ) )
&& !IsDocShared() )
return;
SfxApplication *pSfxApp = SFX_APP();
- // ggf. die unbenannt-Nummer freigeben
+
+ // If possible relase the unnamed number.
if ( pImp->bIsNamedVisible && USHRT_MAX != pImp->nVisualDocumentNumber )
{
pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
pImp->bIsNamedVisible = 0;
}
- // Title setzen
+ // Set Title
pImp->aTitle = rTitle;
- // Benachrichtigungen
+ // Notification
if ( GetMedium() )
{
SfxShell::SetName( GetTitle(SFX_TITLE_APINAME) );
@@ -831,52 +832,53 @@ String X(const String &rRet)
String SfxObjectShell::GetTitle
(
sal_uInt16 nMaxLength /* 0 (default)
- der Titel selbst, so wie er ist
+ the title itself, as it is
1 (==SFX_TITLE_FILENAME)
- liefert den logischen Dateinamen ohne Pfad
- (unter WNT je nach Systemeinstellung ohne
- Extension)
+ provides the logical file name without path
+ (under WNT depending on the system settings
+ without extension)
2 (==SFX_TITLE_FULLNAME)
- liefert den mit komplettem logischen Dateinamen
- mit Pfad (remote => ::com::sun::star::util::URL)
+ provides the logical file names with full path
+ (remote =>:: com:: sun:: star:: util:: URL)
3 (==SFX_TITLE_APINAME)
- liefert den logischen Dateinamen ohne Pfad
- und Extension
+ provides the logical filname without path
+ and extension
4 (==SFX_TITLE_DETECT)
- liefert den kompletten Titel, falls noch
- nicht gesetzt wird aber aus DocInfo oder
- dem Namen des Medium erzeugt
+ provides the complete title, if not set yet
+ it will be created from DocInfo or the name of
+ the medium.
5 (==SFX_TITLE_CAPTION)
- liefert den Titel so, wie MB ihn heute in
- der CaptionBar anzeigen m"ochte
+ provides the Title just like MB now in the
+ CaptionBar view
6 (==SFX_TITLE_PICKLIST)
- liefert den Titel so, wie MB ihn heute in
- der PickList anzeigen m"ochte
+ returns the Title, just like MB now would
+ display it in the in the PickList
7 (==SFX_TITLE_HISTORY)
- liefert den Titel so, wie MB ihn heute in
- der History anzeigen m"ochte
+ returns the Title just like MB now would
+ display it in the in the History
10 bis USHRT_MAX
- liefert maximal 'nMaxLength' Zeichen vom logischen
- Dateinamen inkl. Pfad (remote => ::com::sun::star::util::URL)
+ provides the 'nMaxLength' of the logical
+ file name including the path
+ (remote => ::com::sun::star::util::URL)
*/
) const
-/* [Beschreibung]
+/* [Description]
- Liefert den Titel bzw. logischen Dateinamen des Dokuments, je nach
+ Returns the title or logical file name of the document, depending on the
'nMaxLength'.
- Falls der Dateiname mit Pfad verwendet wird, wird die Namensk"urzung durch
- Ersetzung eines oder mehrerer Directory-Namen durch "..." durchgef"uhrt,
- URLs werden z.Zt. immer komplett geliefert.
+ If the file name with path is used, the Name shortened by replacing one or
+ more directory names with "...", URLs are currently always returned
+ in complete form.
*/
{
@@ -884,7 +886,7 @@ String SfxObjectShell::GetTitle
if ( IsLoading() )
return String();
- // Titel erzeugen?
+ // Create Title?
if ( SFX_TITLE_DETECT == nMaxLength && !pImp->aTitle.Len() )
{
static sal_Bool bRecur = sal_False;
@@ -913,38 +915,37 @@ String SfxObjectShell::GetTitle
else if (SFX_TITLE_APINAME == nMaxLength )
return X(GetAPIName());
- // Sonderfall Vorlagen:
+ // Special case templates:
if( IsTemplate() && pImp->aTitle.Len() &&
( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
return X(pImp->aTitle);
- // Picklist/Caption wird gemappt
+ // Picklist/Caption is mapped
if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
{
- // Wenn ein spezieller Titel beim "Offnen mitgegeben wurde;
- // wichtig bei URLs, die INET_PROT_FILE verwenden, denn bei denen
- // wird der gesetzte Titel nicht beachtet.
- // (s.u., Auswertung von aTitleMap_Impl)
+ // If a specific title was given at open:
+ // important for URLs: use INET_PROT_FILE for which the set title is not
+ // considered. (See below, analysis of aTitleMap_Impl)
SFX_ITEMSET_ARG( pMed->GetItemSet(), pNameItem, SfxStringItem, SID_DOCINFO_TITLE, sal_False );
if ( pNameItem )
return X( pNameItem->GetValue() );
}
- // noch unbenannt?
- DBG_ASSERT( !HasName() || pMed, "HasName() aber kein Medium?!?" );
+ // Still unnamed?
+ DBG_ASSERT( !HasName() || pMed, "HasName() but no Medium?!?" );
if ( !HasName() || !pMed )
{
- // schon Titel gesezt?
+ // Title already set?
if ( pImp->aTitle.Len() )
return X(pImp->aTitle);
- // mu\s es durchnumeriert werden?
+ // must it be numbered?
String aNoName( SfxResId( STR_NONAME ) );
if ( pImp->bIsNamedVisible )
- // Nummer hintenanh"angen
+ // Append number
aNoName += String::CreateFromInt32( pImp->nVisualDocumentNumber );
- // Dokument hei\st vorerst 'unbenannt#'
+ // Document called "noname" for the time being
return X(aNoName);
}
@@ -959,7 +960,7 @@ String SfxObjectShell::GetTitle
nMaxLength = aTitleMap_Impl[nMaxLength-SFX_TITLE_CAPTION][nRemote];
}
- // lokale Datei?
+ // Local file?
if ( aURL.GetProtocol() == INET_PROT_FILE )
{
String aName( aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName() );
@@ -974,7 +975,7 @@ String SfxObjectShell::GetTitle
}
else
{
- // ::com::sun::star::util::URL-Versionen
+ // ::com::sun::star::util::URL-Versions
if ( nMaxLength >= SFX_TITLE_MAXLEN )
{
String aComplete( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -998,7 +999,7 @@ String SfxObjectShell::GetTitle
else if ( nMaxLength == SFX_TITLE_FULLNAME )
return X(aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ));
- // ggf. Titel aus Dateiname generieren
+ // Generate Title from file name if possible
if ( !pImp->aTitle.Len() )
pImp->aTitle = aURL.GetBase();
@@ -1007,7 +1008,7 @@ String SfxObjectShell::GetTitle
pImp->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
}
- // ganzer Titel
+ // Complete Title
return X(pImp->aTitle);
}
@@ -1015,18 +1016,16 @@ String SfxObjectShell::GetTitle
void SfxObjectShell::InvalidateName()
-/* [Beschreibung]
+/* [Description]
- Ermittelt den Titel des Dokuments neu aus 'unbenannt', DocInfo-Titel
- bzw. Dateinamen. Wird nach Laden aus Template oder SaveAs ben"otigt.
+ Returns the title of the new document, DocInfo-Title or
+ File name. Is required for loading from template or SaveAs.
*/
{
- // Title neu erzeugen
pImp->aTitle.Erase();
SetName( GetTitle( SFX_TITLE_APINAME ) );
- // Benachrichtigungen
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
}
@@ -1036,9 +1035,7 @@ void SfxObjectShell::SetNamedVisibility_Impl()
{
if ( !pImp->bIsNamedVisible )
{
- // Nummer verpassen
pImp->bIsNamedVisible = sal_True;
- // ggf. neue Nummer verpassen
if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && !pImp->aTitle.Len() )
{
pImp->nVisualDocumentNumber = SFX_APP()->GetFreeIndex();
@@ -1073,14 +1070,14 @@ SfxProgress* SfxObjectShell::GetProgress() const
void SfxObjectShell::SetProgress_Impl
(
- SfxProgress *pProgress /* zu startender <SfxProgress> oder 0, falls
- der Progress zur"uckgesetzt werden soll */
+ SfxProgress *pProgress /* to started <SfxProgress> or 0,
+ if the progress is to be reset */
)
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum setzen oder zur"ucksetzen des Progress-Modes
- f"ur diese SfxObjectShell.
+ Internal method to set or reset the Progress modes for
+ SfxObjectShell.
*/
{
@@ -1121,10 +1118,11 @@ void SfxObjectShell::SetActivateEvent_Impl(sal_uInt16 nId )
//--------------------------------------------------------------------
void SfxObjectShell::RegisterTransfer( SfxMedium& rMedium )
-/* [Beschreibung ]
- Alle Medien, die aufgesetzt werden, um Teile eines Dokumentes zu
- laden, muessen an der zugehoerigen SfxObjectShell angemeldet
- werden. So kann dokumentweise abgebrochen werden. */
+/* [Description]
+
+ All media, which are placed in order to load parts of a document must be
+ registered by a related SfxObjectShell. Thus documents can be canceled.
+*/
{
rMedium.SetReferer( GetMedium()->GetName() );
}
@@ -1132,9 +1130,10 @@ void SfxObjectShell::RegisterTransfer( SfxMedium& rMedium )
//-------------------------------------------------------------------------
void SfxObjectShell::PrepareReload( )
-/* [Beschreibung ]
- Wird vor dem Reload gerufen und gibt die Moeglichkeit,
- etwaige Caches zu leeren. */
+/* [Description]
+
+ Is called before the Reload and gives the opportunity to clear any caches.
+*/
{
}
@@ -1142,8 +1141,10 @@ void SfxObjectShell::PrepareReload( )
void SfxObjectShell::LockAutoLoad( sal_Bool bLock )
-/* Verhindert ein evtl. eintreffendes AutoLoad. Wird auch vor AutoLoad
- eines umgebenden FrameSet beruecksichtigt.
+/* [Description]
+
+ Prevents an possible occuring autoload. Takes also FrameSet into account.
+ before the autoload.
*/
{
@@ -1155,21 +1156,21 @@ void SfxObjectShell::LockAutoLoad( sal_Bool bLock )
//-------------------------------------------------------------------------
-// kann nach frame.cxx gemoved werden, wenn 358+36x-Stand gemerged sind
+// Can be moved to frame.cxx, when 358+36x-State have been merged
sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const
{
- // sein einges Doc gelockt?
+ // Its own Docucument is locked?
const SfxObjectShell* pObjSh = GetCurrentDocument();
if ( !pObjSh || !pObjSh->IsAutoLoadLocked() )
return sal_False;
- // seine Childs gelockt?
+ // Its Childs are locked?
for ( sal_uInt16 n = GetChildFrameCount(); n--; )
if ( !GetChildFrame(n)->IsAutoLoadLocked_Impl() )
return sal_False;
- // sonst ist AutoLoad erlaubt
+ // otherwise allow AutoLoad
return sal_True;
}
@@ -1177,8 +1178,8 @@ sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const
sal_Bool SfxObjectShell::IsAutoLoadLocked() const
-/* Liefert, ob ein eintreffendes AutoLoad ausgefuehrt werden darf. Wird auch
- vor AutoLoad eines umgebenden FrameSet beruecksichtigt.
+/* Returns whether an Autoload is allowed to be executed. Before the
+ surrounding FrameSet of the AutoLoad is also taken into account as well.
*/
{
@@ -1428,7 +1429,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
else
{
// !TODO/LATER: what's this?!
- // Interaktiv ( DClick, Contextmenu ) kommt kein Langname mit
+ // Interactiv ( DClick, Contextmenu ) no long name is included
aTemplateName = getDocProperties()->getTitle();
if ( !aTemplateName.Len() )
{
@@ -1518,8 +1519,10 @@ void SfxObjectShell::PositionView_Impl()
//-------------------------------------------------------------------------
sal_Bool SfxObjectShell::IsLoading() const
-/* [Beschreibung ]
- Has FinishedLoading been called? */
+/* [Description]
+
+ Has FinishedLoading been called?
+*/
{
return !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT );
}
@@ -1527,9 +1530,11 @@ sal_Bool SfxObjectShell::IsLoading() const
//-------------------------------------------------------------------------
void SfxObjectShell::CancelTransfers()
-/* [Beschreibung ]
- Hier koennen Transfers gecanceled werden, die nicht mit
- RegisterTransfer registiert wurden */
+/* [Description]
+
+ Here can Transfers get canceled, which were not regestered
+ by RegisterTransfer.
+*/
{
if( ( pImp->nLoadedFlags & SFX_LOADED_ALL ) != SFX_LOADED_ALL )
{
@@ -1556,10 +1561,10 @@ void AutoReloadTimer_Impl::Timeout()
if ( pFrame )
{
- // momentan nicht m"oglich/sinnvoll?
+ // Not possible/meanigfull at the moment?
if ( !pObjSh->CanReload_Impl() || pObjSh->IsAutoLoadLocked() || Application::IsUICaptured() )
{
- // erneuten Versuch erlauben
+ // Allow a retry
Start();
return;
}
@@ -1944,7 +1949,7 @@ SvKeyValueIterator* SfxObjectShell::GetHeaderAttributes()
{
if( !pImp->xHeaderAttributes.Is() )
{
- DBG_ASSERT( pMedium, "Kein Medium" );
+ DBG_ASSERT( pMedium, "No Medium" );
pImp->xHeaderAttributes = new SfxHeaderAttributes_Impl( this );
}
return ( SvKeyValueIterator*) &pImp->xHeaderAttributes;
@@ -1972,7 +1977,7 @@ sal_Bool SfxObjectShell::IsPreview() const
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
if ( pFlags )
{
- // Werte auf einzelne Items verteilen
+ // Distributed values among individual items
String aFileFlags = pFlags->GetValue();
aFileFlags.ToUpperAscii();
if ( STRING_NOTFOUND != aFileFlags.Search( 'B' ) )
@@ -1991,11 +1996,11 @@ sal_Bool SfxObjectShell::IsPreview() const
sal_Bool SfxObjectShell::IsSecure()
{
- // Wenn globale Warnung an ist, nach Secure-Referer-Liste gehen
+ // When global warning is on, go to Secure-Referer-Liste
String aReferer = GetMedium()->GetName();
if ( !aReferer.Len() )
{
- // bei neuen Dokumenten das Template als Referer nehmen
+ // for new documents use the template as reference
::rtl::OUString aTempl( getDocProperties()->getTemplateURL() );
if ( aTempl.getLength() )
aReferer = INetURLObject( aTempl ).GetMainURL( INetURLObject::NO_DECODE );
@@ -2123,7 +2128,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
String SfxObjectShell::UpdateTitle( SfxMedium* pMed, USHORT nDocViewNumber )
{
- // Titel des Fensters
+ // Title of the windows
String aTitle;
if ( pMed )
{