[Libreoffice-commits] core.git: sd/source
Stefan Knorr
heinzlesspam at gmail.com
Thu Feb 28 03:50:26 PST 2013
sd/source/core/CustomAnimationEffect.cxx | 60 ++--
sd/source/core/drawdoc.cxx | 236 +++++++-----------
sd/source/core/drawdoc2.cxx | 284 ++++++----------------
sd/source/core/drawdoc3.cxx | 400 +++++++++++--------------------
sd/source/core/drawdoc4.cxx | 266 ++++++--------------
5 files changed, 441 insertions(+), 805 deletions(-)
New commits:
commit 889ec0e4d4afac36d4d462bfeaf146398baa4082
Author: Stefan Knorr <heinzlesspam at gmail.com>
Date: Mon Feb 18 23:33:27 2013 +0100
fdo#39468: Translate German comments in sd/source/core/
Change-Id: I91af80438dff2aead6bf32cecd3caa97e05c9a65
Reviewed-on: https://gerrit.libreoffice.org/2461
Reviewed-by: Michael Meeks <michael.meeks at suse.com>
Tested-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 90eb27c..94a5002 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -370,7 +370,7 @@ sal_Int32 CustomAnimationEffect::getNumberOfSubitems( const Any& aTarget, sal_In
catch( Exception& )
{
nSubItems = 0;
- OSL_FAIL( "sd::CustomAnimationEffect::getNumberOfSubitems(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::getNumberOfSubitems(), exception caught!" );
}
return nSubItems;
@@ -698,7 +698,7 @@ void CustomAnimationEffect::setTarget( const ::com::sun::star::uno::Any& rTarget
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setTarget(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setTarget(), exception caught!" );
}
}
@@ -735,7 +735,7 @@ void CustomAnimationEffect::setTargetSubItem( sal_Int16 nSubItem )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setTargetSubItem(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setTargetSubItem(), exception caught!" );
}
}
@@ -787,7 +787,7 @@ void CustomAnimationEffect::setDuration( double fDuration )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setDuration(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setDuration(), exception caught!" );
}
}
@@ -802,7 +802,7 @@ void CustomAnimationEffect::setBegin( double fBegin )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setBegin(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setBegin(), exception caught!" );
}
}
@@ -817,7 +817,7 @@ void CustomAnimationEffect::setAcceleration( double fAcceleration )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setAcceleration(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setAcceleration(), exception caught!" );
}
}
// --------------------------------------------------------------------
@@ -831,7 +831,7 @@ void CustomAnimationEffect::setDecelerate( double fDecelerate )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setDecelerate(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setDecelerate(), exception caught!" );
}
}
@@ -846,7 +846,7 @@ void CustomAnimationEffect::setAutoReverse( sal_Bool bAutoReverse )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setAutoReverse(), exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setAutoReverse(), exception caught!" );
}
}
@@ -1112,7 +1112,7 @@ void CustomAnimationEffect::setIterateType( sal_Int16 nIterateType )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setIterateType(), Exception cought!" );
+ OSL_FAIL( "sd::CustomAnimationEffect::setIterateType(), Exception caught!" );
}
}
@@ -1157,7 +1157,7 @@ void CustomAnimationEffect::setIterateInterval( double fIterateInterval )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getPath(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::getPath(), exception caught!" );
}
return aPath;
@@ -1185,7 +1185,7 @@ void CustomAnimationEffect::setPath( const ::rtl::OUString& rPath )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setPath(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::setPath(), exception caught!" );
}
}
@@ -1234,7 +1234,7 @@ Any CustomAnimationEffect::getProperty( sal_Int32 nNodeType, const OUString& rAt
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getProperty(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::getProperty(), exception caught!" );
}
return aProperty;
@@ -1311,7 +1311,7 @@ bool CustomAnimationEffect::setProperty( sal_Int32 nNodeType, const OUString& rA
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setProperty(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::setProperty(), exception caught!" );
}
return bChanged;
@@ -1367,7 +1367,7 @@ Any CustomAnimationEffect::getColor( sal_Int32 nIndex )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getColor(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::getColor(), exception caught!" );
}
return aColor;
@@ -1422,7 +1422,7 @@ void CustomAnimationEffect::setColor( sal_Int32 nIndex, const Any& rColor )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setColor(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::setColor(), exception caught!" );
}
}
@@ -1468,7 +1468,7 @@ Any CustomAnimationEffect::getTransformationProperty( sal_Int32 nTransformType,
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getTransformationProperty(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::getTransformationProperty(), exception caught!" );
}
return aProperty;
@@ -1541,7 +1541,7 @@ bool CustomAnimationEffect::setTransformationProperty( sal_Int32 nTransformType,
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setTransformationProperty(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::setTransformationProperty(), exception caught!" );
}
return bChanged;
@@ -1563,7 +1563,7 @@ void CustomAnimationEffect::createAudio( const ::com::sun::star::uno::Any& rSour
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::createAudio(), exception cought!" );
+ OSL_FAIL("sd::CustomAnimationEffect::createAudio(), exception caught!" );
}
}
@@ -1918,7 +1918,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const SdrPathObj& rPathOb
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::append(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::append(), exception caught!" );
}
return pEffect;
@@ -1942,7 +1942,7 @@ void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, con
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::replace(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::replace(), exception caught!" );
}
}
@@ -2098,7 +2098,7 @@ void EffectSequenceHelper::implRebuild()
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::rebuild(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::rebuild(), exception caught!" );
}
}
@@ -2265,7 +2265,7 @@ void stl_process_after_effect_node_func(AfterEffectNode& rNode)
}
catch( Exception& )
{
- OSL_FAIL( "ppt::stl_process_after_effect_node_func::operator(), exception cought!" );
+ OSL_FAIL( "ppt::stl_process_after_effect_node_func::operator(), exception caught!" );
}
}
@@ -2718,7 +2718,7 @@ void EffectSequenceHelper::createTextGroupParagraphEffects( CustomAnimationTextG
}
catch( Exception& )
{
- OSL_FAIL("sd::EffectSequenceHelper::createTextGroup(), exception cought!" );
+ OSL_FAIL("sd::EffectSequenceHelper::createTextGroup(), exception caught!" );
}
}
@@ -3048,7 +3048,7 @@ void EffectSequenceHelper::create( const ::com::sun::star::uno::Reference< ::com
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::create(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::create(), exception caught!" );
}
}
@@ -3071,7 +3071,7 @@ void EffectSequenceHelper::createEffectsequence( const Reference< XAnimationNode
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::createEffectsequence(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::createEffectsequence(), exception caught!" );
}
}
@@ -3117,7 +3117,7 @@ void EffectSequenceHelper::createEffects( const Reference< XAnimationNode >& xNo
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::createEffects(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::createEffects(), exception caught!" );
}
}
@@ -3178,7 +3178,7 @@ void EffectSequenceHelper::processAfterEffect( const Reference< XAnimationNode >
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::processAfterEffect(), exception cought!" );
+ OSL_FAIL( "sd::EffectSequenceHelper::processAfterEffect(), exception caught!" );
}
}
@@ -3271,7 +3271,7 @@ void MainSequence::reset( const ::com::sun::star::uno::Reference< ::com::sun::st
Reference< ::com::sun::star::animations::XAnimationNode > MainSequence::getRootNode()
{
- DBG_ASSERT( mnRebuildLockGuard == 0, "MainSequence::getRootNode(), rebuild is locked, ist this really what you want?" );
+ DBG_ASSERT( mnRebuildLockGuard == 0, "MainSequence::getRootNode(), rebuild is locked, is this really what you want?" );
if( maTimer.IsActive() && mbTimerMode )
{
@@ -3338,7 +3338,7 @@ void MainSequence::createMainSequence()
}
catch( Exception& )
{
- OSL_FAIL( "sd::MainSequence::create(), exception cought!" );
+ OSL_FAIL( "sd::MainSequence::create(), exception caught!" );
return;
}
@@ -3745,7 +3745,7 @@ InteractiveSequence::InteractiveSequence( const Reference< XTimeContainer >& xSe
}
catch( Exception& )
{
- OSL_FAIL( "sd::InteractiveSequence::InteractiveSequence(), exception cought!" );
+ OSL_FAIL( "sd::InteractiveSequence::InteractiveSequence(), exception caught!" );
return;
}
}
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 5b7d3e4..3f36d86 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -170,14 +170,14 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
mpMasterPageListWatcher = ::std::auto_ptr<ImpMasterPageListWatcher>(
new ImpMasterPageListWatcher(*this));
- SetObjectShell(pDrDocSh); // fuer das VCDrawModel
+ SetObjectShell(pDrDocSh); // for VCDrawModel
if (mpDocSh)
{
SetSwapGraphics(sal_True);
}
- // Masseinheit (von App) und Massstab (von SdMod) setzen
+ // Set measuring unit (of the application) and scale (of SdMod)
sal_Int32 nX, nY;
SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType);
pOptions->GetScale( nX, nY );
@@ -196,13 +196,12 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
pItemPool->FreezeIdRanges();
SetTextDefaults();
- // die DrawingEngine muss auch wissen, wo er ist
+ // DrawingEngine has to know where it is...
FmFormModel::SetStyleSheetPool( new SdStyleSheetPool( GetPool(), this ) );
- // Dem DrawOutliner den StyleSheetPool setzen, damit Textobjekte richtig
- // eingelesen werden koennen. Der Link zum StyleRequest-Handler des
- // Dokuments wird erst in NewOrLoadCompleted gesetzt, da erst dann alle
- // Vorlagen existieren.
+ // Set StyleSheetPool for DrawOutliner, so text objects can be read correctly.
+ // The link to the StyleRequest handler of the document is set later, in
+ // NewOrLoadCompleted, because only then do all the templates exist.
SdrOutliner& rOutliner = GetDrawOutliner();
rOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
SetCalcFieldValueHdl( &rOutliner );
@@ -242,8 +241,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) );
}
- // DefTab und SpellOptions setzen
- // Jetzt am Modul (SD)
+ // Set DefTab and SpellOptions for the SD module
sal_uInt16 nDefTab = pOptions->GetDefTab();
SetDefaultTabulator( nDefTab );
@@ -291,13 +289,12 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
}
rOutliner.SetControlWord(nCntrl);
- // Initialize the printer independent layout mode.
+ // Initialize the printer independent layout mode
SetPrinterIndependentLayout (pOptions->GetPrinterIndependentLayout());
- // Dem HitTestOutliner den StyleSheetPool setzen.
- // Der Link zum StyleRequest-Handler des
- // Dokuments wird erst in NewOrLoadCompleted gesetzt, da erst dann alle
- // Vorlagen existieren.
+ // Set the StyleSheetPool for HitTestOutliner.
+ // The link to the StyleRequest handler of the document is set later, in
+ // NewOrLoadCompleted, because only then do all the templates exist.
SfxItemSet aSet2( pHitTestOutliner->GetEmptyItemSet() );
pHitTestOutliner->SetStyleSheetPool( (SfxStyleSheetPool*)GetStyleSheetPool() );
@@ -331,22 +328,21 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
pHitTestOutliner->SetControlWord( nCntrl2 );
- /**************************************************************************
- * Layer anlegen
- *
- * Es werden auf Pages und MasterPages folgende Default-Layer angelegt:
- *
- * Layer STR_LAYOUT : Standardlayer f�r alle Zeichenobjekte
- *
- * Layer STR_BCKGRND : Hintergrund der MasterPage
- * (auf normalen Pages z.Z. keine Verwendung)
- *
- * Layer STR_BCKGRNDOBJ: Objekte auf dem Hintergrund der MasterPage
- * (auf normalen Pages z.Z. keine Verwendung)
- *
- * Layer STR_CONTROLS : Standardlayer f�r Controls
- *
- **************************************************************************/
+ /** Create layers
+ *
+ * We create the following default layers on all pages and master pages:
+ *
+ * STR_LAYOUT : default layer for drawing objects
+ *
+ * STR_BCKGRND : background of the master page
+ * (currently unused within normal pages)
+ *
+ * STR_BCKGRNDOBJ: objects on the background of master pages
+ * (currently unused within normal pages)
+ *
+ * STR_CONTROLS : default layer for controls
+ */
+
{
String aControlLayerName( SdResId(STR_LAYER_CONTROLS) );
@@ -363,11 +359,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
}
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
+
+// Destructor
SdDrawDocument::~SdDrawDocument()
{
@@ -393,7 +386,7 @@ SdDrawDocument::~SdDrawDocument()
if (pLinkManager)
{
- // BaseLinks freigeben
+ // Release BaseLinks
if ( !pLinkManager->GetLinks().empty() )
{
pLinkManager->Remove( 0, pLinkManager->GetLinks().size() );
@@ -411,7 +404,7 @@ SdDrawDocument::~SdDrawDocument()
{
for (sal_uLong j = 0; j < mpCustomShowList->size(); j++)
{
- // Ggf. CustomShows loeschen
+ // If necessary, delete CustomShows
SdCustomShow* pCustomShow = (*mpCustomShowList)[j];
delete pCustomShow;
}
@@ -433,13 +426,10 @@ SdDrawDocument::~SdDrawDocument()
mpCharClass = NULL;
}
-/*************************************************************************
-|*
-|* Diese Methode erzeugt ein neues Dokument (SdDrawDocument) und gibt einen
-|* Zeiger darauf zurueck. Die Drawing Engine benutzt diese Methode um das
-|* Dokument oder Teile davon ins Clipboard/DragServer stellen zu koennen.
-|*
-\************************************************************************/
+
+// This method creates a new document (SdDrawDocument) and returns a pointer to
+// said document. The drawing engine uses this method to put the document (or
+// parts of it) into the clipboard/DragServer.
SdrModel* SdDrawDocument::AllocModel() const
{
@@ -447,7 +437,8 @@ SdrModel* SdDrawDocument::AllocModel() const
if( mpCreatingTransferable )
{
- // Dokument wird fuer Drag&Drop/Clipboard erzeugt, dafuer muss dem Dokument eine DocShell (SvPersist) bekannt sein
+ // Document is created for drag & drop/clipboard. To be able to
+ // do this, the document has to know a DocShell (SvPersist).
SfxObjectShell* pObj = NULL;
::sd::DrawDocShell* pNewDocSh = NULL;
@@ -462,8 +453,8 @@ SdrModel* SdDrawDocument::AllocModel() const
pNewDocSh->DoInitNew( NULL );
pNewModel = pNewDocSh->GetDoc();
- // Nur fuer Clipboard notwendig,
- // fuer Drag&Drop erfolgt dieses im DragServer
+ // Only necessary for clipboard â
+ // for drag & drop this is handled by DragServer
SdStyleSheetPool* pOldStylePool = (SdStyleSheetPool*) GetStyleSheetPool();
SdStyleSheetPool* pNewStylePool = (SdStyleSheetPool*) pNewModel->GetStyleSheetPool();
@@ -474,7 +465,7 @@ SdrModel* SdDrawDocument::AllocModel() const
for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++)
{
- // Alle Layouts der MasterPage mitnehmen
+ // Move with all of the master page's layouts
String aOldLayoutName(((SdDrawDocument*) this)->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName());
aOldLayoutName.Erase( aOldLayoutName.SearchAscii( SD_LT_SEPARATOR ) );
SdStyleSheetVector aCreatedSheets;
@@ -485,7 +476,7 @@ SdrModel* SdDrawDocument::AllocModel() const
}
else if( mbAllocDocSh )
{
- // Es wird eine DocShell erzeugt, welche mit GetAllocedDocSh() zurueckgegeben wird
+ // Create a DocShell which is then returned with GetAllocedDocSh()
SdDrawDocument* pDoc = (SdDrawDocument*) this;
pDoc->SetAllocDocSh(sal_False);
pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell(
@@ -501,74 +492,53 @@ SdrModel* SdDrawDocument::AllocModel() const
return pNewModel;
}
-/*************************************************************************
-|*
-|* Diese Methode erzeugt eine neue Seite (SdPage) und gibt einen Zeiger
-|* darauf zurueck. Die Drawing Engine benutzt diese Methode beim Laden
-|* zur Erzeugung von Seiten (deren Typ sie ja nicht kennt, da es ABLEITUNGEN
-|* der SdrPage sind).
-|*
-\************************************************************************/
+// This method creates a new page (SdPage) and returns a pointer to said page.
+// The drawing engine uses this method to create pages (whose types it does
+// not know, as they are _derivatives_ of SdrPage) when loading.
SdrPage* SdDrawDocument::AllocPage(bool bMasterPage)
{
return new SdPage(*this, NULL, bMasterPage);
}
-/*************************************************************************
-|*
-|* SetChanged(), das Model wurde geaendert
-|*
-\************************************************************************/
-
+// When the model has changed
void SdDrawDocument::SetChanged(sal_Bool bFlag)
{
if (mpDocSh)
{
if (mbNewOrLoadCompleted && mpDocSh->IsEnableSetModified())
{
- // weitergeben an Basisklasse
+ // Pass on to base class
FmFormModel::SetChanged(bFlag);
- // an ObjectShell weiterleiten
+ // Forward to ObjectShell
mpDocSh->SetModified(bFlag);
}
}
else
{
- // weitergeben an Basisklasse
+ // Pass on to base class
FmFormModel::SetChanged(bFlag);
}
}
-/*************************************************************************
-|*
-|* NbcSetChanged(), the model changed, don't call anybody else
-|*
-\************************************************************************/
-
+// The model changed, don't call anything else
void SdDrawDocument::NbcSetChanged(sal_Bool bFlag)
{
// forward to baseclass
FmFormModel::SetChanged(bFlag);
}
-/*************************************************************************
-|*
-|* NewOrLoadCompleted
-|*
-|* Wird gerufen, wenn das Dokument geladen wurde bzw. feststeht, dass es
-|* nicht mehr geladen wird.
-|*
-\************************************************************************/
+// NewOrLoadCompleted is called when the document is loaded, or when it is clear
+// it won't load any more.
void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
{
if (eMode == NEW_DOC)
{
- // Neues Dokument:
- // Praesentations- und Standardvorlagen erzeugen,
- // Pool fuer virtuelle Controls erzeugen
+ // New document:
+ // create slideshow and default templates,
+ // create pool for virtual controls
CreateLayoutTemplates();
CreateDefaultCellStyles();
@@ -576,7 +546,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
}
else if (eMode == DOC_LOADED)
{
- // Dokument wurde geladen:
+ // Document has finished loading
CheckMasterPages();
@@ -611,23 +581,23 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
pPage->SetName( aName );
}
- // Sprachabhaengige Namen der StandardLayer erzeugen
+ // Create names of the default layers in the user's language
RestoreLayerNames();
- // Sprachabhaengige Namen der Vorlagen setzen
+ // Create names of the styles in the user's language
static_cast<SdStyleSheetPool*>(mxStyleSheetPool.get())->UpdateStdNames();
- // Ggf. fehlende Vorlagen erzeugen (es gab z.B. frueher keinen Subtitle)
+ // Create any missing styles â e. g. formerly, there was no Subtitle style
static_cast<SdStyleSheetPool*>(mxStyleSheetPool.get())->CreatePseudosIfNecessary();
}
- // Standardvorlage an der Drawing Engine setzen
+ // Set default style of Drawing Engine
String aName( SdResId(STR_STANDARD_STYLESHEET_NAME));
SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS)));
- // Draw-Outliner und Dokument Outliner initialisieren,
- // aber nicht den globalen Outliner, den der ist ja nicht
- // dokumentspezifisch wie StyleSheetPool und StyleRequestHandler
+ // Initialize DrawOutliner and DocumentOutliner, but don't initialize the
+ // global outliner, as it is not document specific like StyleSheetPool and
+ // StyleRequestHandler are.
::Outliner& rDrawOutliner = GetDrawOutliner();
rDrawOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
sal_uLong nCntrl = rDrawOutliner.GetControlWord();
@@ -637,9 +607,9 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
rDrawOutliner.SetControlWord(nCntrl);
- // HitTest-Outliner und Dokument Outliner initialisieren,
- // aber nicht den globalen Outliner, den der ist ja nicht
- // dokumentspezifisch wie StyleSheetPool und StyleRequestHandler
+ // Initialize HitTestOutliner and DocumentOutliner, but don't initialize the
+ // global outliner, as it is not document specific like StyleSheetPool and
+ // StyleRequestHandler are.
pHitTestOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
if(mpOutliner)
@@ -653,8 +623,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
if ( eMode == DOC_LOADED )
{
- // Praesentationsobjekte muessen wieder Listener der entsprechenden
- // Vorlagen werden
+ // Make presentation objects listeners of the appropriate styles
SdStyleSheetPool* pSPool = (SdStyleSheetPool*) GetStyleSheetPool();
sal_uInt16 nPage, nPageCount;
@@ -667,14 +636,14 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
pSPool->CreateLayoutStyleSheets( pPage->GetName(), sal_True );
}
- // Standard- und Notizseiten:
+ // Default and notes pages:
for (nPage = 0; nPage < GetPageCount(); nPage++)
{
SdPage* pPage = (SdPage*)GetPage(nPage);
NewOrLoadCompleted( pPage, pSPool );
}
- // Masterpages:
+ // Master pages:
for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
SdPage* pPage = (SdPage*)GetMasterPage(nPage);
@@ -685,9 +654,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
mbNewOrLoadCompleted = sal_True;
- /**************************************************************************
- * Alle gelinkten Pages aktualisieren
- **************************************************************************/
+ // Update all linked pages
SdPage* pPage = NULL;
sal_uInt16 nMaxSdPages = GetSdPageCount(PK_STANDARD);
@@ -728,7 +695,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
const sd::ShapeList& rPresentationShapes( pPage->GetPresentationShapeList() );
if(!rPresentationShapes.isEmpty())
{
- // Listen mit Titel- und Gliederungsvorlagen erstellen
+ // Create lists of title and outline styles
String aName = pPage->GetLayoutName();
aName.Erase( aName.SearchAscii( SD_LT_SEPARATOR ));
@@ -739,8 +706,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
SdrObject* pObj = rPresentationShapes.getNextShape(0);
- // jetzt nach Titel- und Gliederungstextobjekten suchen und
- // Objekte zu Listenern machen
+ // Now look for title and outline text objects, then make those objects
+ // listeners.
while(pObj)
{
if (pObj->GetObjInventor() == SdrInventor)
@@ -753,7 +720,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
- // sal_True: harte Attribute dabei nicht loeschen
+ // sal_True: don't delete "hard" attributes when doing this.
if (pTitleSheet)
pObj->SetStyleSheet(pTitleSheet, sal_True);
}
@@ -772,7 +739,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
pObj->StartListening(*pSheet);
if( iter == aOutlineList.begin())
- // Textrahmen hoert auf StyleSheet der Ebene1
+ // text frame listens to stylesheet of layer 1
pObj->NbcSetStyleSheet(pSheet, sal_True);
}
}
@@ -798,13 +765,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
}
}
-/*************************************************************************
-|*
-|* Lokaler Outliner, welcher fuer den Gliederungsmodus verwendet wird
-|* In diesen Outliner werden ggf. OutlinerViews inserted!
-|*
-\************************************************************************/
-
+// Local outliner that is used for outline mode. In this outliner, OutlinerViews
+// may be inserted.
::sd::Outliner* SdDrawDocument::GetOutliner(sal_Bool bCreateOutliner)
{
if (!mpOutliner && bCreateOutliner)
@@ -822,23 +784,17 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
}
-/*************************************************************************
-|*
-|* Interner Outliner, welcher fuer die Erzeugung von Textobjekten
-|* verwendet wird.
-|* In diesen Outliner werden keine OutlinerViews inserted!
-|*
-\************************************************************************/
-
+// Internal outliner that is used to create text objects. We don't insert any
+// OutlinerViews into this outliner!
::sd::Outliner* SdDrawDocument::GetInternalOutliner(sal_Bool bCreateOutliner)
{
if ( !mpInternalOutliner && bCreateOutliner )
{
mpInternalOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
- // MT:
- // Dieser Outliner wird nur fuer das Erzeugen spezieller Textobjekte
- // verwendet. Da in diesen Textobjekten keine Portion-Informationen
- // gespeichert werden muessen, kann/soll der Update-Mode immer sal_False bleiben.
+
+ // This outliner is only used to create special text objects. As no
+ // information about portions is saved in this outliner, the update mode
+ // can/should always remain sal_False.
mpInternalOutliner->SetUpdateMode( sal_False );
mpInternalOutliner->EnableUndo( sal_False );
@@ -852,21 +808,16 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->GetUpdateMode() == sal_False ) , "InternalOutliner: UpdateMode = sal_True !" );
DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->IsUndoEnabled() == sal_False ), "InternalOutliner: Undo = sal_True !" );
- // MT: Wer ihn vollmuellt, macht ihn auch gleich wieder leer:
- // Vorteile:
- // a) Keine unnoetigen Clear-Aufrufe
- // b) Kein Muell im Speicher.
- DBG_ASSERT( !mpInternalOutliner || ( ( mpInternalOutliner->GetParagraphCount() == 1 ) && ( mpInternalOutliner->GetText( mpInternalOutliner->GetParagraph( 0 ) ).Len() == 0 ) ), "InternalOutliner: Nicht leer!" );
+ // If you add stuff here, always clear it out.
+ // Advantages:
+ // a) no unnecessary Clear calls
+ // b) no wasted memory
+ DBG_ASSERT( !mpInternalOutliner || ( ( mpInternalOutliner->GetParagraphCount() == 1 ) && ( mpInternalOutliner->GetText( mpInternalOutliner->GetParagraph( 0 ) ).Len() == 0 ) ), "InternalOutliner: not empty!" );
return mpInternalOutliner;
}
-/*************************************************************************
-|*
-|* OnlineSpelling ein/aus
-|*
-\************************************************************************/
-
+// OnlineSpelling on/off
void SdDrawDocument::SetOnlineSpell(sal_Bool bIn)
{
mbOnlineSpell = bIn;
@@ -918,12 +869,7 @@ void SdDrawDocument::SetOnlineSpell(sal_Bool bIn)
}
-/*************************************************************************
-|*
-|* OnlineSpelling: Markierung ein/aus
-|*
-\************************************************************************/
-
+// OnlineSpelling: highlighting on/off
uno::Reference< uno::XInterface > SdDrawDocument::createUnoModel()
{
uno::Reference< uno::XInterface > xModel;
@@ -954,12 +900,12 @@ void SdDrawDocument::SetPrinterIndependentLayout (sal_Int32 nMode)
{
case ::com::sun::star::document::PrinterIndependentLayout::DISABLED:
case ::com::sun::star::document::PrinterIndependentLayout::ENABLED:
- // Just store supported modes and inform the doc shell.
+ // Just store supported modes and inform the doc shell
mnPrinterIndependentLayout = nMode;
// Since it is possible that a SdDrawDocument is constructed without a
// SdDrawDocShell the pointer member mpDocSh needs to be tested
- // before the call is executed. This is e.-g. used for copy/paste.
+ // before the call is executed. This is e. g. used for copy/paste.
if(mpDocSh)
{
mpDocSh->UpdateRefDevice ();
@@ -968,7 +914,7 @@ void SdDrawDocument::SetPrinterIndependentLayout (sal_Int32 nMode)
break;
default:
- // Ignore unknown values.
+ // Ignore unknown values
break;
}
}
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index e612831..fd36dd4 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -69,25 +69,18 @@
using namespace ::sd;
-const long PRINT_OFFSET = 30; // siehe \svx\source\dialog\page.cxx (PB)
+const long PRINT_OFFSET = 30; // see /svx/source/dialog/page.cxx
using namespace com::sun::star;
-/*************************************************************************
-|*
-|* Sucht ein Objekt per Name
-|*
-\************************************************************************/
-
+// Looks up an object by name
SdrObject* SdDrawDocument::GetObj(const String& rObjName) const
{
SdrObject* pObj = NULL;
SdrObject* pObjFound = NULL;
SdPage* pPage = NULL;
- /**************************************************************************
- * Zuerst alle Pages durchsuchen
- **************************************************************************/
+ // First search in all pages
sal_uInt16 nPage = 0;
const sal_uInt16 nMaxPages = GetPageCount();
@@ -112,9 +105,7 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const
nPage++;
}
- /**************************************************************************
- * Wenn nicht gefunden, dann alle MasterPages durchsuchen
- **************************************************************************/
+ // If it couldn't be found, look through all master pages
nPage = 0;
const sal_uInt16 nMaxMasterPages = GetMasterPageCount();
@@ -143,12 +134,7 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const
}
-/*************************************************************************
-|*
-|* Sucht die SdPage per Name
-|*
-\************************************************************************/
-
+// Find SdPage by name
sal_uInt16 SdDrawDocument::GetPageByName(const String& rPgName, sal_Bool& rbIsMasterPage) const
{
SdPage* pPage = NULL;
@@ -159,7 +145,7 @@ sal_uInt16 SdDrawDocument::GetPageByName(const String& rPgName, sal_Bool& rbIsMa
rbIsMasterPage = sal_False;
// Search all regular pages and all notes pages (handout pages are
- // ignored.)
+ // ignored)
while (nPage < nMaxPages && nPageNum == SDRPAGE_NOTFOUND)
{
pPage = const_cast<SdPage*>(static_cast<const SdPage*>(
@@ -175,7 +161,7 @@ sal_uInt16 SdDrawDocument::GetPageByName(const String& rPgName, sal_Bool& rbIsMa
nPage++;
}
- // Search all master pages when not found among non-master pages.
+ // Search all master pages when not found among non-master pages
const sal_uInt16 nMaxMasterPages = GetMasterPageCount();
nPage = 0;
@@ -216,13 +202,8 @@ sal_uInt16 SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const
return (sal_uInt16)mpMasterPageListWatcher->GetSdPageCount(ePgKind);
}
-/*************************************************************************
-|*
-|* die in den Seitenobjekten der Notizseiten eingetragenen
-|* Seitennummern anpassen
-|*
-\************************************************************************/
-
+// Adapt the page numbers that are registered in the page objects of the notes
+// pages
void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
{
sal_uInt16 nPageCount = GetPageCount();
@@ -232,8 +213,8 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
{
pPage = (SdPage*)GetPage(nPage);
- // wenn es eine Notizseite ist, Seitenobjekt suchen
- // und Nummer korrigieren
+ // If this is a notes page, find its page object and correct the page
+ // number
if (pPage && pPage->GetPageKind() == PK_NOTES)
{
sal_uLong nObjCount = pPage->GetObjCount();
@@ -244,11 +225,10 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
if (pObj->GetObjIdentifier() == OBJ_PAGE &&
pObj->GetObjInventor() == SdrInventor)
{
- // das Seitenobjekt stellt die vorhergende Seite (also
- // die Zeichenseite) dar
- DBG_ASSERTWARNING(nStartPos, "Notizseitenpos. darf nicht 0 sein");
+ // The page object is the preceding page (drawing page)
+ DBG_ASSERTWARNING(nStartPos, "Position of notes page must not be 0.");
- DBG_ASSERTWARNING(nPage > 1, "Seitenobjekt darf nicht Handzettel darstellen");
+ DBG_ASSERTWARNING(nPage > 1, "Page object must not be a handout.");
if (nStartPos > 0 && nPage > 1)
((SdrPageObj*)pObj)->SetReferencedPage(GetPage(nPage - 1));
@@ -366,15 +346,9 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_
}
}
-/*************************************************************************
-|*
-|* Seite verschieben
-|*
-\************************************************************************/
-
+// Move page
void SdDrawDocument::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
- // Seite verschieben
FmFormModel::MovePage(nPgNum, nNewPos);
sal_uInt16 nMin = Min(nPgNum, nNewPos);
@@ -382,12 +356,7 @@ void SdDrawDocument::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
UpdatePageObjectsInNotes(nMin);
}
-/*************************************************************************
-|*
-|* Seite einfuegen
-|*
-\************************************************************************/
-
+// Insert page
void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
{
bool bLast = (nPos == GetPageCount());
@@ -403,12 +372,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
}
-/*************************************************************************
-|*
-|* Seite loeschen
-|*
-\************************************************************************/
-
+// Delete page
void SdDrawDocument::DeletePage(sal_uInt16 nPgNum)
{
FmFormModel::DeletePage(nPgNum);
@@ -416,12 +380,7 @@ void SdDrawDocument::DeletePage(sal_uInt16 nPgNum)
UpdatePageObjectsInNotes(nPgNum);
}
-/*************************************************************************
-|*
-|* Seite entfernen
-|*
-\************************************************************************/
-
+// Remove page
SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
{
SdrPage* pPage = FmFormModel::RemovePage(nPgNum);
@@ -466,12 +425,7 @@ SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 nPgNum)
return FmFormModel::RemoveMasterPage(nPgNum);
}
-/*************************************************************************
-|*
-|* Seiten selektieren
-|*
-\************************************************************************/
-
+//Select pages
void SdDrawDocument::SetSelected(SdPage* pPage, sal_Bool bSelect)
{
PageKind ePageKind = pPage->GetPageKind();
@@ -503,18 +457,10 @@ void SdDrawDocument::SetSelected(SdPage* pPage, sal_Bool bSelect)
}
}
-/*************************************************************************
-|*
-|* Sofern noch keine Seiten vorhanden sind, werden nun Seiten erzeugt
-|*
-\************************************************************************/
-
+// If no pages exist yet, create them now
void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
{
- /**************************************************************************
- * Wenn noch keine Seite im Model vorhanden ist (Datei-Neu), wird
- * eine neue Seite eingefuegt
- **************************************************************************/
+ // If no page exists yet in the model, (File -> New), insert a page
sal_uInt16 nPageCount = GetPageCount();
if (nPageCount <= 1)
@@ -522,9 +468,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
// #i57181# Paper size depends on Language, like in Writer
Size aDefSize = SvxPaperInfo::GetDefaultPaperSize( MAP_100TH_MM );
- /**********************************************************************
- * Handzettel-Seite einfuegen
- **********************************************************************/
+ // Insert handout page
SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(sal_False) );
SdPage* pRefPage = NULL;
@@ -547,9 +491,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
pHandoutPage->SetName( String (SdResId(STR_HANDOUT) ) );
InsertPage(pHandoutPage, 0);
- /**********************************************************************
- * MasterPage einfuegen und an der Handzettel-Seite vermerken
- **********************************************************************/
+ // Insert master page and register this with the handout page
SdPage* pHandoutMPage = (SdPage*) AllocPage(sal_True);
pHandoutMPage->SetSize( pHandoutPage->GetSize() );
pHandoutMPage->SetPageKind(PK_HANDOUT);
@@ -560,11 +502,9 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
InsertMasterPage(pHandoutMPage, 0);
pHandoutPage->TRG_SetMasterPage( *pHandoutMPage );
- /**********************************************************************
- * Seite einfuegen
- * Sofern nPageCount==1 ist, wurde das Model fuers Clipboad erzeugt.
- * Eine Standard-Seite ist daher schon vorhanden.
- **********************************************************************/
+ // Insert page
+ // If nPageCount==1 is, the model for the clipboard was created, thus a
+ // default page must already exist
SdPage* pPage;
sal_Bool bClipboard = sal_False;
@@ -582,7 +522,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
}
else if (meDocType == DOCUMENT_TYPE_DRAW)
{
- // Draw: stets Default-Groesse mit Raendern
+ // Draw: always use default size with margins
pPage->SetSize(aDefSize);
SfxPrinter* pPrinter = mpDocSh->GetPrinter(sal_False);
@@ -612,7 +552,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
}
else
{
- // Impress: stets Bildschirmformat, quer
+ // Impress: always use screen format, landscape.
Size aSz( SvxPaperInfo::GetPaperSize(PAPER_SCREEN_4_3, MAP_100TH_MM) );
pPage->SetSize( Size( aSz.Height(), aSz.Width() ) );
pPage->SetBorder(0, 0, 0, 0);
@@ -626,9 +566,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
pPage = (SdPage*) GetPage(1);
}
- /**********************************************************************
- * MasterPage einfuegen und an der Seite vermerken
- **********************************************************************/
+ // Insert master page, then register this with the page
SdPage* pMPage = (SdPage*) AllocPage(sal_True);
pMPage->SetSize( pPage->GetSize() );
pMPage->SetBorder( pPage->GetLftBorder(),
@@ -640,9 +578,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
if( bClipboard )
pMPage->SetLayoutName( pPage->GetLayoutName() );
- /**********************************************************************
- * Notizen-Seite einfuegen
- **********************************************************************/
+ // Insert notes page
SdPage* pNotesPage = (SdPage*) AllocPage(sal_False);
if( pRefDocument )
@@ -655,7 +591,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
}
else
{
- // Stets Hochformat
+ // Always use portrait format
if (aDefSize.Height() >= aDefSize.Width())
{
pNotesPage->SetSize(aDefSize);
@@ -672,9 +608,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
if( bClipboard )
pNotesPage->SetLayoutName( pPage->GetLayoutName() );
- /**********************************************************************
- * MasterPage einfuegen und an der Notizen-Seite vermerken
- **********************************************************************/
+ // Insert master page, then register this with the notes page
SdPage* pNotesMPage = (SdPage*) AllocPage(sal_True);
pNotesMPage->SetSize( pNotesPage->GetSize() );
pNotesMPage->SetPageKind(PK_NOTES);
@@ -700,13 +634,8 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
}
}
-/*************************************************************************
-|*
-|* Erzeugt fehlende Notiz und Handzettelseiten (nach PowerPoint-Import)
-|* Es wird davon ausgegangen, dass mindestens eine Standard-Seite und
-|* eine Standard-MasterPage vorhanden sind.
-|*
-\************************************************************************/
+// Creates missing notes and handout pages (after PowerPoint import).
+// We assume that at least one default page and one default master page exist.
sal_Bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
{
@@ -715,9 +644,7 @@ sal_Bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
if (nPageCount != 0)
{
- /**********************************************************************
- * PageKind setzen
- **********************************************************************/
+ // Set PageKind
SdPage* pHandoutMPage = (SdPage*) GetMasterPage(0);
pHandoutMPage->SetPageKind(PK_HANDOUT);
@@ -731,15 +658,15 @@ sal_Bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
if(!pPage->TRG_HasMasterPage())
{
- // Keine MasterPage gesetzt -> erste Standard-MasterPage nehmen
- // (Wenn bei PPT keine Standard-Seite vorhanden war)
+ // No master page set -> use first default master page
+ // (If there was no default page in the PPT)
pPage->TRG_SetMasterPage(*GetMasterPage(1));
}
SdPage* pNotesPage = (SdPage*) GetPage(i+1);
pNotesPage->SetPageKind(PK_NOTES);
- // Notiz-MasterPages setzen
+ // Set notes master page
sal_uInt16 nMasterPageAfterPagesMasterPage = (pPage->TRG_GetMasterPage()).GetPageNum() + 1;
pNotesPage->TRG_SetMasterPage(*GetMasterPage(nMasterPageAfterPagesMasterPage));
}
@@ -752,14 +679,9 @@ sal_Bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
return(bOK);
}
-/*************************************************************************
-|*
-|* - selektierte Seiten hinter genannte Seite schieben
-|* (nTargetPage = (sal_uInt16)-1 --> vor erste Seite schieben)
-|* - ergibt sal_True, wenn Seiten verschoben wurden
-|*
-\************************************************************************/
-
+// + Move selected pages after said page
+// (nTargetPage = (sal_uInt16)-1 --> move before first page)
+// + Returns sal_True when the page has been moved
sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
{
SdPage* pPage = NULL;
@@ -772,7 +694,7 @@ sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
if( bUndo )
BegUndo(String(SdResId(STR_UNDO_MOVEPAGES)));
- // Liste mit selektierten Seiten
+ // List of selected pages
std::vector<SdPage*> aPageList;
for (nPage = 0; nPage < nNoOfPages; nPage++)
{
@@ -782,7 +704,7 @@ sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
aPageList.push_back(pPage);
}
- // falls noetig, nach vorne hangeln, bis nicht selektierte Seite gefunden
+ // If necessary, look backwards, until we find a page that wasn't selected
nPage = nTargetPage;
if (nPage != (sal_uInt16)-1)
{
@@ -799,7 +721,7 @@ sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
}
}
- // vor der ersten Seite einfuegen
+ // Insert before the first page
if (nPage == (sal_uInt16)-1)
{
std::vector<SdPage*>::reverse_iterator iter;
@@ -820,11 +742,11 @@ sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
}
}
}
- // hinter <nPage> einfuegen
+ // Insert after <nPage>
else
{
nTargetPage = nPage;
- nTargetPage = 2 * nTargetPage + 1; // PK_STANDARD --> absolut
+ nTargetPage = 2 * nTargetPage + 1; // PK_STANDARD --> absolute
std::vector<SdPage*>::iterator iter;
for (iter = aPageList.begin(); iter != aPageList.end(); ++iter)
@@ -833,7 +755,7 @@ sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
nPage = pPage->GetPageNum();
if (nPage > nTargetPage)
{
- nTargetPage += 2; // hinter (!) der Seite einfuegen
+ nTargetPage += 2; // Insert _after_ the page
if (nPage != nTargetPage)
{
@@ -874,23 +796,13 @@ sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
}
-/*************************************************************************
-|*
-|* Anzahl der Links im sfx2::LinkManager zurueckgeben
-|*
-\************************************************************************/
-
+// Return number of links in sfx2::LinkManager
sal_uLong SdDrawDocument::GetLinkCount()
{
return pLinkManager->GetLinks().size();
}
-/*************************************************************************
-|*
-|* Language setzen
-|*
-\************************************************************************/
-
+// Set Language
void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId )
{
sal_Bool bChanged = sal_False;
@@ -921,12 +833,7 @@ void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId
}
-/*************************************************************************
-|*
-|* Return language
-|*
-\************************************************************************/
-
+// Return language
LanguageType SdDrawDocument::GetLanguage( const sal_uInt16 nId ) const
{
LanguageType eLangType = meLanguage;
@@ -940,25 +847,20 @@ LanguageType SdDrawDocument::GetLanguage( const sal_uInt16 nId ) const
}
-/*************************************************************************
-|*
-|* WorkStartup einleiten
-|*
-\************************************************************************/
-
+// Initiate WorkStartup
IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl)
{
if( mpDocSh )
mpDocSh->SetWaitCursor( sal_True );
- sal_Bool bChanged = IsChanged(); // merken
+ sal_Bool bChanged = IsChanged(); // remember this
- // Autolayouts initialisieren
+ // Initialize Autolayouts
SdPage* pHandoutMPage = GetMasterSdPage(0, PK_HANDOUT);
if (pHandoutMPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
- // AutoLayout wurde noch nicht umgesetzt -> Initialisieren
+ // No AutoLayout yet -> initialize
pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, sal_True, sal_True);
}
@@ -966,7 +868,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl)
if (pPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
- // AutoLayout wurde noch nicht umgesetzt -> Initialisieren
+ // No AutoLayout yet -> initialize
pPage->SetAutoLayout(AUTOLAYOUT_NONE, sal_True, sal_True);
}
@@ -974,7 +876,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl)
if (pNotesPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
- // AutoLayout wurde noch nicht umgesetzt -> Initialisieren
+ // No AutoLayout yet -> initialize
pNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, sal_True, sal_True);
}
@@ -986,21 +888,16 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl)
}
-/*************************************************************************
-|*
-|* Wenn der WorkStartupTimer erzeugt worden ist (das erfolgt ausschliesslich
-|* in SdDrawViewShell::Consruct() ), so wird der Timer ggf. gestoppt und
-|* das WorkStartup eingeleitet
-|*
-\************************************************************************/
-
+// When the WorkStartupTimer has been created (this only happens in
+// SdDrawViewShell::Construct() ), the timer may be stopped and the WorkStartup
+// may be initiated.
void SdDrawDocument::StopWorkStartupDelay()
{
if (mpWorkStartupTimer)
{
if ( mpWorkStartupTimer->IsActive() )
{
- // Timer war noch nicht abgelaufen -> WorkStartup wird eingeleitet
+ // Timer not yet expired -> initiate WorkStartup
mpWorkStartupTimer->Stop();
WorkStartupHdl(NULL);
}
@@ -1010,14 +907,9 @@ void SdDrawDocument::StopWorkStartupDelay()
}
}
-/*************************************************************************
-|*
-|* Wenn der WorkStartupTimer erzeugt worden ist (das erfolgt ausschliesslich
-|* in SdDrawViewShell::Consruct() ), so wird der Timer ggf. gestoppt und
-|* das WorkStartup eingeleitet
-|*
-\************************************************************************/
-
+// When the WorkStartupTimer has been created (this only happens in
+// SdDrawViewShell::Construct() ), the timer may be stopped and the WorkStartup
+// may be initiated.
SdAnimationInfo* SdDrawDocument::GetAnimationInfo(SdrObject* pObject) const
{
DBG_ASSERT(pObject, "sd::SdDrawDocument::GetAnimationInfo(), invalid argument!");
@@ -1034,7 +926,7 @@ SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCrea
SdrObjUserData* pUD = 0;
SdAnimationInfo* pRet = 0;
- // gibt es in den User-Daten eine Animationsinformation?
+ // Can we find animation information within the user data?
for (nUD = 0; nUD < nUDCount; nUD++)
{
pUD = rObject.GetUserData(nUD);
@@ -1056,13 +948,13 @@ SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCrea
SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) const
{
- DBG_ASSERT(pObject, "ohne Objekt keine IMapInfo");
+ DBG_ASSERT(pObject, "Without an object there is no IMapInfo");
SdrObjUserData* pUserData = NULL;
SdIMapInfo* pIMapInfo = NULL;
sal_uInt16 nCount = pObject->GetUserDataCount();
- // gibt es in den User-Daten eine IMap-Information?
+ // Can we find IMap information within the user data?
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pUserData = pObject->GetUserData( i );
@@ -1090,22 +982,22 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
const Rectangle& rRect = pObj->GetLogicRect();
sal_Bool bObjSupported = sal_False;
- // HitTest ausfuehren
- if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt
+ // execute HitTest
+ if ( pObj->ISA( SdrGrafObj ) ) // simple graphics object
{
const SdrGrafObj* pGrafObj = (const SdrGrafObj*) pObj;
const GeoStat& rGeo = pGrafObj->GetGeoStat();
SdrGrafObjGeoData* pGeoData = (SdrGrafObjGeoData*) pGrafObj->GetGeoData();
- // Drehung rueckgaengig
+ // Undo rotation
if ( rGeo.nDrehWink )
RotatePoint( aRelPoint, rRect.TopLeft(), -rGeo.nSin, rGeo.nCos );
- // Spiegelung rueckgaengig
+ // Undo mirroring
if ( pGeoData->bMirrored )
aRelPoint.X() = rRect.Right() + rRect.Left() - aRelPoint.X();
- // ggf. Unshear:
+ // Undo shearing
if ( rGeo.nShearWink )
ShearPoint( aRelPoint, rRect.TopLeft(), -rGeo.nTan );
@@ -1118,20 +1010,20 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
delete pGeoData;
bObjSupported = sal_True;
}
- else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt
+ else if ( pObj->ISA( SdrOle2Obj ) ) // OLE object
{
aGraphSize = ( (SdrOle2Obj*) pObj )->GetOrigObjSize();
bObjSupported = sal_True;
}
- // hat alles geklappt, dann HitTest ausfuehren
+ // Everything worked out well, thus execute HitTest
if ( bObjSupported )
{
- // relativen Mauspunkt berechnen
+ // Calculate relative position of mouse cursor
aRelPoint -= rRect.TopLeft();
pIMapObj = rImageMap.GetHitIMapObject( aGraphSize, rRect.GetSize(), aRelPoint );
- // Deaktivierte Objekte wollen wir nicht
+ // We don't care about deactivated objects
if ( pIMapObj && !pIMapObj->IsActive() )
pIMapObj = NULL;
}
@@ -1317,7 +1209,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
eNotesLayout = pPreviousNotesPage->GetAutoLayout();
}
- // Create new standard page and set it up.
+ // Create new standard page and set it up
pStandardPage = (SdPage*) AllocPage(sal_False);
// Set the size here since else the presobj autolayout
@@ -1331,7 +1223,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
// Use master page of current page.
pStandardPage->TRG_SetMasterPage(pPreviousStandardPage->TRG_GetMasterPage());
- // User layout of current standard page.
+ // User layout of current standard page
pStandardPage->SetLayoutName( pPreviousStandardPage->GetLayoutName() );
pStandardPage->SetAutoLayout(eStandardLayout, sal_True);
pStandardPage->setHeaderFooterSettings( pPreviousStandardPage->getHeaderFooterSettings() );
@@ -1347,14 +1239,14 @@ sal_uInt16 SdDrawDocument::CreatePage (
pStandardPage->SetPresChange( pPreviousStandardPage->GetPresChange() );
pStandardPage->SetTime( pPreviousStandardPage->GetTime() );
- // Create new notes page and set it up.
+ // Create new notes page and set it up
pNotesPage = (SdPage*) AllocPage(sal_False);
pNotesPage->SetPageKind(PK_NOTES);
- // Use master page of current page.
+ // Use master page of current page
pNotesPage->TRG_SetMasterPage(pPreviousNotesPage->TRG_GetMasterPage());
- // Use layout of current notes page.
+ // Use layout of current notes page
pNotesPage->SetLayoutName( pPreviousNotesPage->GetLayoutName() );
pNotesPage->SetAutoLayout(eNotesLayout, sal_True);
pNotesPage->setHeaderFooterSettings( pPreviousNotesPage->getHeaderFooterSettings() );
@@ -1378,10 +1270,10 @@ sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum)
{
PageKind ePageKind = PK_STANDARD;
- // Get current page.
+ // Get current page
SdPage* pActualPage = GetSdPage(nPageNum, ePageKind);
- // Get background flags.
+ // Get background flags
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
@@ -1389,7 +1281,7 @@ sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum)
return DuplicatePage (
pActualPage, ePageKind,
- // No names for the new slides.
+ // No names for the new slides
String(), String(),
aVisibleLayers.IsSet(aBckgrnd),
aVisibleLayers.IsSet(aBckgrndObj));
@@ -1427,7 +1319,7 @@ sal_uInt16 SdDrawDocument::DuplicatePage (
pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1);
}
- // Create duplicates of a standard page and the associated notes page.
+ // Create duplicates of a standard page and the associated notes page
pStandardPage = (SdPage*) pPreviousStandardPage->Clone();
pNotesPage = (SdPage*) pPreviousNotesPage->Clone();
@@ -1465,7 +1357,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
String aNotesPageName = sNotesPageName;
// Gather some information about the standard page and the notes page
- // that are to be inserted. This makes sure that there is always one
+ // that are to be inserted. This makes sure that there is always one
// standard page followed by one notes page.
if (ePageKind == PK_NOTES)
{
@@ -1487,7 +1379,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
if (nInsertPosition < 0)
nInsertPosition = nStandardPageNum;
- // Set up and insert the standard page.
+ // Set up and insert the standard page
SetupNewPage (
pPreviousStandardPage,
pStandardPage,
@@ -1496,7 +1388,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
bIsPageBack,
bIsPageObj);
- // Set up and insert the notes page.
+ // Set up and insert the notes page
pNotesPage->SetPageKind(PK_NOTES);
SetupNewPage (
pPreviousNotesPage,
@@ -1507,7 +1399,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
bIsPageObj);
// Return an index that allows the caller to access the newly inserted
- // pages by using GetSdPage().
+ // pages by using GetSdPage()
return pStandardPage->GetPageNum() / 2;
}
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 0c2e5e1..ef6a28b 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -95,9 +95,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount();
for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
{
- /**************************************************************
- * Gibt es die Layouts schon im Dokument?
- **************************************************************/
+ // Do the layouts already exist within the document?
SdPage* pTestPage = (SdPage*) rDoc.GetMasterPage(nMPage);
String aFullTest(pTestPage->GetLayoutName());
aFullTest.Erase( aFullTest.SearchAscii( SD_LT_SEPARATOR ));
@@ -112,12 +110,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
mrLayoutsToTransfer.push_back(aLayout);
}
-/*************************************************************************
-|*
-|* Fuegt ein Bookmark als Seite ein
-|*
-\************************************************************************/
-
+// Inserts a bookmark as a page
static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBookmarkDoc,
const std::vector<rtl::OUString> &rBookmarkList, sal_uInt16 nBMSdPageCount,
InsertBookmarkAsPage_FindDuplicateLayouts& rPageIterator )
@@ -185,12 +178,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
}
}
-/*************************************************************************
-|*
-|* Oeffnet ein Bookmark-Dokument
-|*
-\************************************************************************/
-
+// Opens a bookmark document
SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
{
sal_Bool bOK = sal_True;
@@ -215,10 +203,9 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
{
CloseBookmarkDoc();
- // Es wird eine DocShell erzeugt, da in dem Dokument OLE-Objekte
- // enthalten sein koennten (Persist)
- // Wenn dem nicht so waere, so koennte man auch das Model
- // direkt laden
+ // Create a DocShell, as OLE objects might be contained in the
+ // document. (Persist)
+ // If that wasn't the case, we could load the model directly.
if ( bCreateGraphicShell )
// Draw
mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, sal_True);
@@ -253,12 +240,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
return(pBookmarkDoc);
}
-/*************************************************************************
-|*
-|* Oeffnet ein Bookmark-Dokument
-|*
-\************************************************************************/
-
+// Opens a bookmark document
SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const String& rBookmarkFile)
{
SdDrawDocument* pBookmarkDoc = NULL;
@@ -276,31 +258,24 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const String& rBookmarkFile)
return(pBookmarkDoc);
}
-/*************************************************************************
-|*
-|* Fuegt ein Bookmark (Seite oder Objekt) ein
-|*
-\************************************************************************/
-
+// Inserts a bookmark (page or object)
sal_Bool SdDrawDocument::InsertBookmark(
- const std::vector<rtl::OUString> &rBookmarkList, // Liste der Namen der einzufuegenden Bookmarks
- std::vector<rtl::OUString> &rExchangeList, // Liste der zu verwendenen Namen
- sal_Bool bLink, // Bookmarks sollen als Verknuepfung eingefuegt werden
- sal_Bool bReplace, // Aktuellen Seiten (Standard&Notiz) werden ersetzt
- sal_uInt16 nInsertPos, // Einfuegeposition fuer Seiten
- sal_Bool bNoDialogs, // Keine Dialoge anzeigen
- ::sd::DrawDocShell* pBookmarkDocSh, // Wenn gesetzt, so ist dieses das Source-Dokument
- sal_Bool bCopy, // Seiten werden kopiert
- Point* pObjPos) // Einfuegeposition fuer Objekte
+ const std::vector<rtl::OUString> &rBookmarkList, // List of names of the bookmarks to be inserted
+ std::vector<rtl::OUString> &rExchangeList, // List of the names to be used
+ sal_Bool bLink, // Insert bookmarks as links?
+ sal_Bool bReplace, // Replace current default and notes pages?
+ sal_uInt16 nInsertPos, // Insertion position of pages
+ sal_Bool bNoDialogs, // Don't show dialogs
+ ::sd::DrawDocShell* pBookmarkDocSh, // If set, this is the source document
+ sal_Bool bCopy, // Copy the pages?
+ Point* pObjPos) // Insertion position of objects
{
sal_Bool bOK = sal_True;
sal_Bool bInsertPages = sal_False;
if (rBookmarkList.empty())
{
- /**********************************************************************
- * Alle Seiten werden eingefuegt
- **********************************************************************/
+ // Insert all pages
bInsertPages = sal_True;
}
else
@@ -324,15 +299,13 @@ sal_Bool SdDrawDocument::InsertBookmark(
std::vector<rtl::OUString>::const_iterator pIter;
for ( pIter = rBookmarkList.begin(); bOK && pIter != rBookmarkList.end() && !bInsertPages; ++pIter )
{
- /******************************************************************
- * Gibt es in der Bookmark-Liste einen Seitennamen?
- ******************************************************************/
+ // Is there a page name in the bookmark list?
String aBMPgName(*pIter);
sal_Bool bIsMasterPage;
if( pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage ) != SDRPAGE_NOTFOUND )
{
- // Seite gefunden
+ // Found the page
bInsertPages = sal_True;
}
}
@@ -342,14 +315,14 @@ sal_Bool SdDrawDocument::InsertBookmark(
if ( bOK && bInsertPages )
{
- // Zuerst werden alle Seiten-Bookmarks eingefuegt
+ // Insert all page bookmarks
bOK = InsertBookmarkAsPage(rBookmarkList, &rExchangeList, bLink, bReplace,
nInsertPos, bNoDialogs, pBookmarkDocSh, bCopy, sal_True, sal_False);
}
if ( bOK && !rBookmarkList.empty() )
{
- // Es werden alle Objekt-Bookmarks eingefuegt
+ // Insert all object bookmarks
bOK = InsertBookmarkAsObject(rBookmarkList, rExchangeList, bLink,
pBookmarkDocSh, pObjPos, bCalcObjCount);
}
@@ -379,7 +352,7 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const pStyleSheetPool, SdStyleShee
sal_Bool SdDrawDocument::InsertBookmarkAsPage(
const std::vector<rtl::OUString> &rBookmarkList,
- std::vector<rtl::OUString> *pExchangeList, // Liste der zu verwendenen Namen
+ std::vector<rtl::OUString> *pExchangeList, // List of names to be used
sal_Bool bLink,
sal_Bool bReplace,
sal_uInt16 nInsertPos,
@@ -446,8 +419,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
sal_Int32 nNLower = pNPage->GetLwrBorder();
Orientation eNOrient = pRefPage->GetOrientation();
- // Seitengroesse und -raender an die Werte der letzten
- // Seiten anpassen?
+ // Adapt page size and margins to those of the later pages?
pRefPage = GetSdPage(nSdPageCount - 1, PK_STANDARD);
if( bNoDialogs )
@@ -481,11 +453,8 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
}
- /**************************************************************************
- |* Die benoetigten Praesentations-StyleSheets ermitteln und vor
- |* den Seiten transferieren, sonst verlieren die Textobjekte
- |* beim Transfer den Bezug zur Vorlage
- \*************************************************************************/
+ // Get the necessary presentation stylesheets and transfer them before
+ // the pages, else, the text objects won't reference their styles anymore.
::svl::IUndoManager* pUndoMgr = NULL;
if( mpDocSh )
{
@@ -501,14 +470,11 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor );
- /**************************************************************************
- * Die tatsaechlich benoetigten Vorlagen kopieren
- **************************************************************************/
+ // Copy the style that we actually need.
SdStyleSheetPool* pBookmarkStyleSheetPool = dynamic_cast<SdStyleSheetPool*>(pBookmarkDoc->GetStyleSheetPool());
SdStyleSheetPool* pStyleSheetPool = dynamic_cast<SdStyleSheetPool*>(GetStyleSheetPool());
- // Wenn Vorlagen kopiert werden muessen, dann muessen auch die
- // MasterPages kopiert werden!
+ // When copying styles, also copy the master pages!
if( !aLayoutsToTransfer.empty() )
bMergeMasterPages = sal_True;
@@ -542,9 +508,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
// TODO handle undo of table styles too
pStyleSheetPool->CopyTableStyles(*pBookmarkStyleSheetPool);
- /**************************************************************************
- * Dokument einfuegen
- **************************************************************************/
+ // Insert document
const bool bUndo = IsUndoEnabled();
@@ -555,7 +519,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
{
if (nInsertPos >= GetPageCount())
{
- // Seiten werden hinten angefuegt
+ // Add pages to the end
nInsertPos = GetPageCount();
}
@@ -573,7 +537,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if (bLink)
{
- // Es werden sich die Namen aller Seiten gemerkt
+ // Remember the names of all pages
aNameMap.insert(std::make_pair(nBMSdPage,sName));
}
@@ -588,13 +552,13 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
}
Merge(*pBookmarkDoc,
- 1, // Nicht die Handzettelseite
- 0xFFFF, // Aber alle anderen
- nActualInsertPos, // An Position einfuegen
- bMergeMasterPages, // MasterPages mitnehmen
- sal_False, // Aber nur die benoetigten MasterPages
- sal_True, // Undo-Aktion erzeugen
- bCopy); // Seiten kopieren (oder mergen)
+ 1, // Not the handout page
+ 0xFFFF, // But all others
+ nActualInsertPos, // Insert at position ...
+ bMergeMasterPages, // Move master pages?
+ sal_False, // But only the master pages used
+ sal_True, // Create an undo action
+ bCopy); // Copy (or merge) pages?
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
{
@@ -604,8 +568,8 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
// delay renaming *after* pages are copied (might destroy source otherwise)
if( aRenameSet.find(nBMSdPage) != aRenameSet.end() )
{
- // Seitenname schon vorhanden -> Defaultname
- // fuer Standard & Notizseite
+ // Page name already in use -> Use default name for default and
+ // notes page
pPage->SetName(String());
pNotesPage->SetName(String());
}
@@ -614,7 +578,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
{
String aName(aNameMap[nBMSdPage]);
- // Nun werden die Link-Namen zusammengestellt
+ // Assemble all link names
pPage->SetFileName(aBookmarkName);
pPage->SetBookmarkName(aName);
pPage->SetModel(this);
@@ -625,21 +589,19 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
}
else
{
- /**********************************************************************
- * Ausgewaehlte Seiten einfuegen
- **********************************************************************/
+ // Insert selected pages
SdPage* pBMPage;
if (nInsertPos >= GetPageCount())
{
- // Seiten werden hinten angefuegt
+ // Add pages to the end
bReplace = sal_False;
nInsertPos = GetPageCount();
}
sal_uInt16 nActualInsertPos = nInsertPos;
- // Collect the bookmarked pages.
+ // Collect the bookmarked pages
::std::vector<SdPage*> aBookmarkedPages (rBookmarkList.size(), NULL);
for ( size_t nPos = 0, n = rBookmarkList.size(); nPos < n; ++nPos)
{
@@ -660,9 +622,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
- /**************************************************************
- * Es muss eine StandardSeite sein
- **************************************************************/
+ // It has to be a default page
sal_Bool bMustRename = sal_False;
// delay renaming *after* pages are copied (might destroy source otherwise)
@@ -686,13 +646,13 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
}
Merge(*pBookmarkDoc,
- nBMPage, // Von Seite (Standard)
- nBMPage+1, // Bis Seite (Notizen)
- nActualInsertPos, // An Position einfuegen
- bMergeMasterPages, // MasterPages mitnehmen
- sal_False, // Aber nur die benoetigten MasterPages
- sal_True, // Undo-Aktion erzeugen
- bCopy); // Seiten kopieren (oder mergen)
+ nBMPage, // From page (default page)
+ nBMPage+1, // To page (notes page)
+ nActualInsertPos, // Insert at position
+ bMergeMasterPages, // Move master pages?
+ sal_False, // But only the master pages used
+ sal_True, // Create undo action
+ bCopy); // Copy (or merge) pages?
if( bReplace )
{
@@ -705,8 +665,8 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if( bMustRename )
{
- // Seitenname schon vorhanden -> Defaultname
- // fuer Standard & Notizseite
+ // Page name already in use -> use default name for default and
+ // notes page
SdPage* pPage = (SdPage*) GetPage(nActualInsertPos);
pPage->SetName(String());
SdPage* pNotesPage = (SdPage*) GetPage(nActualInsertPos+1);
@@ -723,7 +683,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if (bReplace)
{
- // Seite & Notizseite ausfuegen
+ // Remove page and notes page.
const sal_uInt16 nDestPageNum(nActualInsertPos + 2);
SdPage* pStandardPage = 0L;
@@ -785,21 +745,18 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
}
- /**************************************************************************
- |* Dabei sind evtl. zu viele Masterpages ruebergekommen, da die
- |* DrawingEngine gleiche Praesentationslayouts nicht erkennen kann.
- |* Ueberzaehlige MasterPages entfernen.
- \*************************************************************************/
+ // We might have duplicate master pages now, as the drawing engine does not
+ // recognize duplicates. Remove these now.
sal_uInt16 nNewMPageCount = GetMasterPageCount();
- // rueckwaerts, damit Nummern nicht durcheinander geraten
+ // Go backwards, so the numbers don't become messed up
for (sal_uInt16 nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--)
{
pRefPage = (SdPage*) GetMasterPage(nPage);
String aMPLayout(pRefPage->GetLayoutName());
PageKind eKind = pRefPage->GetPageKind();
- // gibt's den schon?
+ // Does this already exist?
for (sal_uInt16 nTest = 0; nTest < nMPageCount; nTest++)
{
SdPage* pTest = (SdPage*) GetMasterPage(nTest);
@@ -849,7 +806,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if (pExchangeList && pExchangeIter != pExchangeList->end())
{
- // Zuverwendener Name aus Exchange-Liste holen
+ // Get the name to use from Exchange list
String aExchangeName (*pExchangeIter);
pRefPage->SetName(aExchangeName);
SdrHint aHint(HINT_PAGEORDERCHG);
@@ -922,7 +879,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
pRefPage->SetBorder(nLeft, nUpper, nRight, nLower);
pRefPage->SetOrientation( eOrient );
}
- else // kann nur noch NOTES sein
+ else // Can only be notes
{
if (bScaleObjects)
{
@@ -960,15 +917,10 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
return bContinue;
}
-/*************************************************************************
-|*
-|* Fuegt ein Bookmark als Objekt ein
-|*
-\************************************************************************/
-
+// Inserts a bookmark as an object
sal_Bool SdDrawDocument::InsertBookmarkAsObject(
const std::vector<rtl::OUString> &rBookmarkList,
- const std::vector<rtl::OUString> &rExchangeList, // Liste der zu verwendenen Namen
+ const std::vector<rtl::OUString> &rExchangeList, // List of names to use
sal_Bool /* bLink */,
::sd::DrawDocShell* pBookmarkDocSh,
Point* pObjPos, bool bCalcObjCount)
@@ -1013,17 +965,14 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
std::vector<rtl::OUString>::const_iterator pIter;
for ( pIter = rBookmarkList.begin(); pIter != rBookmarkList.end(); ++pIter )
{
- /******************************************************************
- * Namen der Bookmarks aus Liste holen
- ******************************************************************/
+ // Get names of bookmarks from the list
String aBMName (*pIter);
SdrObject* pObj = pBookmarkDoc->GetObj(aBMName);
if (pObj)
{
- // Objekt gefunden
-
+ // Found an object
if (pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() == OBJ_OLE2)
{
@@ -1032,7 +981,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
if (!pBMView)
{
- // View erstmalig erzeugen
+ // Create View for the first time
pBMView = new ::sd::View(*pBookmarkDoc, (OutputDevice*) NULL);
pBMView->EndListening(*pBookmarkDoc);
}
@@ -1057,13 +1006,11 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
if (pBMView)
{
- /**********************************************************************
- * Selektierte Objekte einfuegen
- **********************************************************************/
+ // Insert selected objects
::sd::View* pView = new ::sd::View(*this, (OutputDevice*) NULL);
pView->EndListening(*this);
- // Seite bestimmen, auf der die Objekte eingefuegt werden sollen
+ // Look for the page into which the objects are supposed to be inserted
SdrPage* pPage = GetSdPage(0, PK_STANDARD);
if (mpDocSh)
@@ -1072,7 +1019,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
if (pViewSh)
{
- // Welche Seite wird denn aktuell angezeigt?
+ // Which page is currently in view?
SdrPageView* pPV = pViewSh->GetView()->GetSdrPageView();
if (pPV)
@@ -1101,7 +1048,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
if (!rExchangeList.empty() || bCalcObjCount)
{
- // OrdNums sortieren und Anzahl Objekte vor dem Einfuegen bestimmen
+ // Sort OrdNums and get the number of objects before inserting
pPage->RecalcObjOrdNums();
nCountBefore = pPage->GetObjCount();
}
@@ -1116,19 +1063,19 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
pBMView->GetDoc().SetAllocDocSh(sal_False);
if (!bOLEObjFound)
- delete pTmpDoc; // Wird ansonsten von der DocShell zerstoert
+ delete pTmpDoc; // Would otherwise be destroyed by DocShell
delete pView;
if (!rExchangeList.empty())
{
- // Anzahl Objekte nach dem Einfuegen bestimmen
+ // Get number of objects after inserting.
sal_uLong nCount = pPage->GetObjCount();
std::vector<rtl::OUString>::const_iterator pIter = rExchangeList.begin();
for (sal_uLong nObj = nCountBefore; nObj < nCount; nObj++)
{
- // Zuverwendener Name aus Exchange-Liste holen
+ // Get the name to use from the Exchange list
if (pIter != rExchangeList.end())
{
String aExchangeName (*pIter);
@@ -1149,12 +1096,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
return bOK;
}
-/*************************************************************************
-|*
-|* Beendet das Einfuegen von Bookmarks
-|*
-\************************************************************************/
-
+// Stops the bookmark insertion
void SdDrawDocument::CloseBookmarkDoc()
{
if (mxBookmarkDocShRef.Is())
@@ -1166,47 +1108,27 @@ void SdDrawDocument::CloseBookmarkDoc()
maBookmarkFile = String();
}
-/*************************************************************************
-|*
-|* Dokument laden (fuer gelinkte Objekte)
-|*
-\************************************************************************/
-
+// Load document (for linked objects)
const SdrModel* SdDrawDocument::LoadModel(const String& rFileName)
{
return ( OpenBookmarkDoc(rFileName) );
}
-/*************************************************************************
-|*
-|* Dokument schliessen (fuer gelinkte Objekte)
-|*
-\************************************************************************/
-
+// Close document (for linked objects)
void SdDrawDocument::DisposeLoadedModels()
{
CloseBookmarkDoc();
}
-/*************************************************************************
-|*
-|* Ist das Dokument read-only?
-|*
-\************************************************************************/
-
+// Is this document read-only?
bool SdDrawDocument::IsReadOnly() const
{
return sal_False;
}
-/*************************************************************************
-|*
-|* In anschliessendem AllocModel() wird eine DocShell erzeugt
-|* (xAllocedDocShRef). Eine bereits bestehende DocShell wird ggf. geloescht
-|*
-\************************************************************************/
-
+// In the subsequent AllocModel() a DocShell (xAllocedDocShRef) is created.
+// Any pre-existing DocShell is deleted
void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc)
{
mbAllocDocSh = bAlloc;
@@ -1219,29 +1141,18 @@ void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc)
mxAllocedDocShRef.Clear();
}
-/*************************************************************************
-|*
-|* Liste der CustomShows zurueckgeben (ggf. zuerst erzeugen)
-|*
-\************************************************************************/
-
+// Return list of CustomShows (create it, too, if necessary)
SdCustomShowList* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
{
if (!mpCustomShowList && bCreate)
{
- // Liste erzeugen
mpCustomShowList = new SdCustomShowList;
}
return mpCustomShowList;
}
-/*************************************************************************
-|*
-|* Nicht benutzte MasterPages und Layouts entfernen
-|*
-\************************************************************************/
-
+// Remove unused master pages and layouts
void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool bOnlyDuplicatePages, sal_Bool bUndo)
{
::sd::View* pView = NULL;
@@ -1258,9 +1169,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool
pView = mpDocSh->GetViewShell()->GetView();
}
- /***********************************************************
- * Alle MasterPages pruefen
- ***********************************************************/
+ // Check all master pages
sal_uInt16 nSdMasterPageCount = GetMasterSdPageCount( PK_STANDARD );
for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--)
{
@@ -1290,7 +1199,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool
GetMasterPageUserCount( pMaster ) == 0 &&
pNotesMaster )
{
- // Do not delete master pages that have their precious flag set.
+ // Do not delete master pages that have their precious flag set
sal_Bool bDeleteMaster = !pMaster->IsPrecious();
OUString aLayoutName = pMaster->GetLayoutName();
@@ -1347,9 +1256,9 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool
delete pMaster;
if( bUndo )
- EndUndo(); // schon hier, damit sich Joes Actions ZWISCHEN unsere eigenen schieben
+ EndUndo(); // do this here already, so Joe's actions happen _between_ our own
- // alte Layoutvorlagen loeschen, wenn sie nicht mehr benoetigt werden
+ // Delete old, unused layout stylesheets
sal_Bool bDeleteOldStyleSheets = sal_True;
for ( sal_uInt16 nMPg = 0;
nMPg < GetMasterPageCount() && bDeleteOldStyleSheets;
@@ -1369,7 +1278,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool
if( bUndo )
{
- // die Liste gehoert der UndoAction
+ // This list belongs to UndoAction
SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aRemove, false );
if (pUndoMgr)
@@ -1383,28 +1292,25 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool
}
if (pMasterPage)
- break; // Nur diese eine MasterPage!
+ break; // Just this one master page!
}
}
-/*************************************************************************
-|*
-|* MasterPage austauschen
-|*
-|* Entweder erhaelt nSdPageNum eine neue, eigene MasterPage, oder die MasterPage
-|* wird komplett ausgetauscht (gilt dann fuer alle Seiten).
-|*
-|* nSdPageNum : Nummer der Seite, welche die neue MasterPage erhalten soll
-|* rLayoutName : LayoutName der neuen MasterPage
-|* pSourceDoc : Dokument (Vorlage) aus dem die MasterPage geholt wird
-|* bMaster : Die MasterPage von nSdPageNum soll ausgetauscht werden
-|* bCheckMasters: Nicht benutzte MasterPages sollen entfernt werden
-|*
-|* Ist pSourceDoc == NULL, so wird eine leere MasterPage zugewiesen.
-|* Ist rLayoutName leer, so wird die erste MasterPage genommen
-\************************************************************************/
-
+/** Exchange master page
+ *
+ * Either the nSdPageNum gets a new, own master page or the master page is
+ * exchanged completely (which then applies to all pages).
+ *
+ * nSdPageNum : page number that the new master page should get.
+ * rLayoutName : LayoutName of the new master page
+ * pSourceDoc : document (template) to get the master page from
+ * bMaster : exchange the master page of nSdPageNum
+ * bCheckMasters: remove unused master pages
+ *
+ * If pSourceDoc == NULL, an empty master page is applied.
+ * If rLayoutName is empty, the first master page is used.
+ */
void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
const String& rLayoutName,
SdDrawDocument* pSourceDoc,
@@ -1438,12 +1344,10 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (pSourceDoc)
{
- std::vector<StyleReplaceData> aReplList; // Liste fuer ersetzte StyleSheets
+ std::vector<StyleReplaceData> aReplList; // List of replaced stylesheets
sal_Bool bLayoutReloaded = sal_False; // Wurde ex. Layout wieder geladen?
- /*********************************************************************
- |* LayoutName, Page and Notespage
- \*********************************************************************/
+ // LayoutName, Page and Notes page
if (rLayoutName.Len() == 0)
{
// No LayoutName: take first MasterPage
@@ -1484,7 +1388,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
}
}
- // we should never reach this, but one never knows....
+ // we should never reach this, but one never knows...
if( (pMaster == NULL) || (pNotesMaster == NULL) )
{
pUndoMgr->LeaveListAction();
@@ -1510,16 +1414,14 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
}
}
- /*****************************************************************
- |* Praesentationsvorlagen korrigieren bzw. neu anlegen
- \****************************************************************/
- // nur die Praesentationsvorlagen beachten
+ // Correct or create presentation templates --
+ // only worry about presentation templates
String aName;
SdStyleSheetPool* pSourceStyleSheetPool = (SdStyleSheetPool*) pSourceDoc->GetStyleSheetPool();
pSourceStyleSheetPool->SetSearchMask(SD_STYLE_FAMILY_MASTERPAGE);
static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->SetSearchMask(SD_STYLE_FAMILY_MASTERPAGE);
- SdStyleSheetVector aCreatedStyles; // Liste fuer erzeugte StyleSheets
+ SdStyleSheetVector aCreatedStyles; // List of created stylesheets
SfxStyleSheetBase* pHisSheet = pSourceStyleSheetPool->First();
while (pHisSheet)
@@ -1532,13 +1434,13 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (pMySheet)
{
- // Es ist eine gleichnamige Vorlage vorhanden ist: Inhalte ersetzen
+ // A stylesheet of the same name already exists -> overwrite contents
#ifdef DBG_UTIL
sal_Bool bTest =
#endif
pMySheet->SetName(pHisSheet->GetName());
- DBG_ASSERT(bTest, "StyleSheet-Umbenennung fehlgeschlagen");
- pMySheet->GetItemSet().ClearItem(0); // alle loeschen
+ DBG_ASSERT(bTest, "Renaming StyleSheet failed.");
+ pMySheet->GetItemSet().ClearItem(0); // Delete all
StyleSheetUndoAction* pUndoChStyle = new StyleSheetUndoAction(this,
pMySheet, &pHisSheet->GetItemSet());
@@ -1552,7 +1454,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
String aHelpFile;
pMySheet = static_cast<SfxStyleSheet*>( &mxStyleSheetPool->Make(aName, SD_STYLE_FAMILY_MASTERPAGE, pHisSheet->GetMask()) );
pMySheet->SetHelpId( aHelpFile, pHisSheet->GetHelpId(aHelpFile) );
- pMySheet->GetItemSet().ClearItem(0); // alle loeschen
+ pMySheet->GetItemSet().ClearItem(0); // Delete all
pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
aCreatedStyles.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( pMySheet ) ) );
@@ -1574,9 +1476,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
pHisSheet = (SfxStyleSheet*) pSourceStyleSheetPool->Next();
}
- // wenn neue Vorlagen erzeugt wurden:
- // eventuell bestehende Parent-Verkettung der Itemsets in den
- // Vorlagen wieder aufbauen
+ // If new styles were created: re-create parent chaining of the item
+ // sets in the styles.
if(!aCreatedStyles.empty())
{
std::vector<StyleReplaceData>::iterator pRDataIter;
@@ -1606,43 +1507,43 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
}
}
- // ab jetzt beim Suchen alle beachten
+ // Now look for all of them when searching
pSourceStyleSheetPool->SetSearchMask(SFX_STYLE_FAMILY_ALL);
mxStyleSheetPool->SetSearchMask(SFX_STYLE_FAMILY_ALL);
}
if( !aCreatedStyles.empty() )
{
- // UndoAction fuer das Erzeugen und Einfuegen vorn StyleSheets
- // auf den UndoManager legen
+ // Add UndoAction for creating and inserting the stylesheets to
+ // the top of the UndoManager
SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aCreatedStyles, sal_True);
pUndoMgr->AddUndoAction(pMovStyles);
}
}
- // Layoutnamen auf Basis des Seitenlayoutnamens der Masterpage bilden
+ // Create layout name based upon the name of the page layout of the
+ // master page
String aPageLayoutName(pMaster->GetLayoutName());
String aLayoutName = aPageLayoutName;
aLayoutName.Erase( aLayoutName.SearchAscii( SD_LT_SEPARATOR ));
if (pSourceDoc != this)
{
- // Aus dem Source-Dokument austragen
+ // Remove from the source document
pSourceDoc->RemoveMasterPage(pNotesMaster->GetPageNum());
pSourceDoc->RemoveMasterPage(pMaster->GetPageNum());
}
- /*********************************************************************
- |* Neue MasterPages ins Dokument eintragen und den Standard- und
- |* Notizseiten das Praesentationslayout ueberbraten
- \********************************************************************/
+ // Register the new master pages with the document and then use the
+ // the new presentation layout for the default and notes pages
if (pSourceDoc != this)
{
- // Die Masterpages einfuegen:
- // Masterpages von neuen Layouts hinten anhaengen; wird ein Layout
- // dagegen ersetzt, so muss vor der Position der alten Masterpage
- // eingefuegt werden, damit ab jetzt beim Suchen (z. B. SdPage::
- // SetPresentationLayout) die neue Masterpage zuerst gefunden wird
+ // Insert the master pages:
+ // Insert master pages from new layouts at the end.
+ // If a layout is being replaced, however, insert them before the
+ // position of the old master page, so from now on the new master
+ // page will be found when searching (e.g.
+ // SdPage::SetPresentationLayout).
sal_uInt16 nInsertPos = rOldMaster.GetPageNum();
BegUndo();
@@ -1660,11 +1561,11 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{
AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pNotesMaster));
- EndUndo(); // schon hier, damit sich Joes Actions ZWISCHEN unsere eigenen schieben
+ EndUndo(); // do this here already, so Joe's actions happen _between_ our own.
}
}
- // Liste mit Seiten fuellen
+ // Fill list with pages
std::vector<SdPage*> aPageList;
// #98456, this has to be removed according to CL (KA 07/08/2002)
@@ -1709,12 +1610,9 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
(*pIter)->SetAutoLayout(eAutoLayout);
}
- /*********************************************************************
- |* Neue Masterpages angleichen
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list