Kaydet (Commit) f16d3484 authored tarafından Urs Fässler's avatar Urs Fässler

Translation and cleanup of comments in sd/source/ui/docshell/

Change-Id: I714b2d1ccdd5392a3ebc32788b203a8484c6cf0b
üst 42bbe3a9
...@@ -44,19 +44,14 @@ ...@@ -44,19 +44,14 @@
namespace sd { namespace sd {
/************************************************************************* /**
|* * Drawing of DocShell (with the helper class SdDrawViewShell)
|* Zeichnen der DocShell (mittels der Hilfsklasse SdDrawViewShell) */
|*
\************************************************************************/
void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect) void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
{ {
if (nAspect == ASPECT_THUMBNAIL) if (nAspect == ASPECT_THUMBNAIL)
{ {
/********************************************************************** // THUMBNAIL: here we may can set the draft mode
* THUMBNAIL: Hier koennte ev. einmal der Draft-Mode gesetzt werden
**********************************************************************/
} }
ClientView* pView = new ClientView(this, pOut, NULL); ClientView* pView = new ClientView(this, pOut, NULL);
...@@ -134,7 +129,7 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const ...@@ -134,7 +129,7 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
if( ( ASPECT_THUMBNAIL == nAspect ) || ( ASPECT_DOCPRINT == nAspect ) ) if( ( ASPECT_THUMBNAIL == nAspect ) || ( ASPECT_DOCPRINT == nAspect ) )
{ {
// Groesse der ersten Seite herausgeben // provide size of first page
MapMode aSrcMapMode(MAP_PIXEL); MapMode aSrcMapMode(MAP_PIXEL);
MapMode aDstMapMode(MAP_100TH_MM); MapMode aDstMapMode(MAP_100TH_MM);
Size aSize = mpDoc->GetSdPage(0, PK_STANDARD)->GetSize(); Size aSize = mpDoc->GetSdPage(0, PK_STANDARD)->GetSize();
...@@ -161,23 +156,11 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const ...@@ -161,23 +156,11 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
return (aVisArea); return (aVisArea);
} }
/*************************************************************************
|*
|* ViewShell anmelden
|*
\************************************************************************/
void DrawDocShell::Connect(ViewShell* pViewSh) void DrawDocShell::Connect(ViewShell* pViewSh)
{ {
mpViewShell = pViewSh; mpViewShell = pViewSh;
} }
/*************************************************************************
|*
|* ViewShell abmelden
|*
\************************************************************************/
void DrawDocShell::Disconnect(ViewShell* pViewSh) void DrawDocShell::Disconnect(ViewShell* pViewSh)
{ {
if (mpViewShell == pViewSh) if (mpViewShell == pViewSh)
...@@ -198,23 +181,14 @@ FrameView* DrawDocShell::GetFrameView() ...@@ -198,23 +181,14 @@ FrameView* DrawDocShell::GetFrameView()
return(pFrameView); return(pFrameView);
} }
/*************************************************************************
|*
|* Groesse der ersten Seite zurueckgeben
|*
\************************************************************************/
Size DrawDocShell::GetFirstPageSize() Size DrawDocShell::GetFirstPageSize()
{ {
return SfxObjectShell::GetFirstPageSize(); return SfxObjectShell::GetFirstPageSize();
} }
/************************************************************************* /**
|* * Creates a bitmap of an arbitrary page
|* Bitmap einer beliebigen Seite erzeugen */
|*
\************************************************************************/
Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel) Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel)
{ {
MapMode aMapMode( MAP_100TH_MM ); MapMode aMapMode( MAP_100TH_MM );
...@@ -233,7 +207,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe ...@@ -233,7 +207,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
aVDev.SetMapMode( aMapMode ); aVDev.SetMapMode( aMapMode );
aVDev.SetOutputSize( aSize ); aVDev.SetOutputSize( aSize );
// damit die dunklen Linien am rechten und unteren Seitenrans mitkommen // that we also get the dark lines at the right and bottom page margin
aFrac = Fraction( nMaxEdgePixel - 1, nMaxEdgePix ); aFrac = Fraction( nMaxEdgePixel - 1, nMaxEdgePix );
aMapMode.SetScaleX( aFrac ); aMapMode.SetScaleX( aFrac );
aMapMode.SetScaleY( aFrac ); aMapMode.SetScaleY( aFrac );
...@@ -245,7 +219,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe ...@@ -245,7 +219,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
if ( GetFrameView() ) if ( GetFrameView() )
{ {
// Initialisierungen der Zeichen-(Bildschirm-)Attribute // initialize the drawing-(screen) attributes
pView->SetGridCoarse( pFrameView->GetGridCoarse() ); pView->SetGridCoarse( pFrameView->GetGridCoarse() );
pView->SetGridFine( pFrameView->GetGridFine() ); pView->SetGridFine( pFrameView->GetGridFine() );
pView->SetSnapGridWidth(pFrameView->GetSnapGridWidthX(), pFrameView->GetSnapGridWidthY()); pView->SetSnapGridWidth(pFrameView->GetSnapGridWidthX(), pFrameView->GetSnapGridWidthY());
...@@ -305,14 +279,11 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe ...@@ -305,14 +279,11 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
} }
/************************************************************************* /**
|* * Checks if the page exists. If so, we force the user to enter a not yet used
|* Pruefen, ob die Seite vorhanden ist und dann den Anwender zwingen einen * name.
|* noch nicht vorhandenen Namen einzugeben. Wird sal_False zurueckgegeben, * @return sal_False if the user cancels the action.
|* wurde die Aktion vom Anwender abgebrochen. */
|*
\************************************************************************/
sal_Bool DrawDocShell::CheckPageName (::Window* pWin, String& rName ) sal_Bool DrawDocShell::CheckPageName (::Window* pWin, String& rName )
{ {
const String aStrForDlg( rName ); const String aStrForDlg( rName );
......
...@@ -60,12 +60,9 @@ using namespace ::com::sun::star::uno; ...@@ -60,12 +60,9 @@ using namespace ::com::sun::star::uno;
namespace sd { namespace sd {
/************************************************************************* /**
|* * Handles SFX-Requests
|* SFX-Requests bearbeiten */
|*
\************************************************************************/
void DrawDocShell::Execute( SfxRequest& rReq ) void DrawDocShell::Execute( SfxRequest& rReq )
{ {
if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() )) if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() ))
...@@ -85,7 +82,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) ...@@ -85,7 +82,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
const SvxSearchItem* pSearchItem = const SvxSearchItem* pSearchItem =
(const SvxSearchItem*) &pReqArgs->Get(SID_SEARCH_ITEM); (const SvxSearchItem*) &pReqArgs->Get(SID_SEARCH_ITEM);
// ein Zuweisungsoperator am SearchItem waer nicht schlecht... // would be nice to have an an assign operation at SearchItem
SvxSearchItem* pAppSearchItem = SD_MOD()->GetSearchItem(); SvxSearchItem* pAppSearchItem = SD_MOD()->GetSearchItem();
delete pAppSearchItem; delete pAppSearchItem;
pAppSearchItem = (SvxSearchItem*) pSearchItem->Clone(); pAppSearchItem = (SvxSearchItem*) pSearchItem->Clone();
...@@ -98,7 +95,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) ...@@ -98,7 +95,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
case FID_SEARCH_ON: case FID_SEARCH_ON:
{ {
// Keine Aktion noetig // no action needed
rReq.Done(); rReq.Done();
} }
break; break;
...@@ -153,7 +150,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) ...@@ -153,7 +150,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
const SvxSearchItem* pSearchItem = const SvxSearchItem* pSearchItem =
(const SvxSearchItem*) &pReqArgs->Get(SID_SEARCH_ITEM); (const SvxSearchItem*) &pReqArgs->Get(SID_SEARCH_ITEM);
// ein Zuweisungsoperator am SearchItem waer nicht schlecht... // would be nice to have an an assign operation at SearchItem
SvxSearchItem* pAppSearchItem = SD_MOD()->GetSearchItem(); SvxSearchItem* pAppSearchItem = SD_MOD()->GetSearchItem();
delete pAppSearchItem; delete pAppSearchItem;
pAppSearchItem = (SvxSearchItem*)pSearchItem->Clone(); pAppSearchItem = (SvxSearchItem*)pSearchItem->Clone();
...@@ -215,12 +212,6 @@ void DrawDocShell::Execute( SfxRequest& rReq ) ...@@ -215,12 +212,6 @@ void DrawDocShell::Execute( SfxRequest& rReq )
} }
} }
/*************************************************************************
|*
|* Suchmaske fuer Organizer
|*
\************************************************************************/
void DrawDocShell::SetOrganizerSearchMask(SfxStyleSheetBasePool* pBasePool) const void DrawDocShell::SetOrganizerSearchMask(SfxStyleSheetBasePool* pBasePool) const
{ {
pBasePool->SetSearchMask(SD_STYLE_FAMILY_GRAPHICS, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED); pBasePool->SetSearchMask(SD_STYLE_FAMILY_GRAPHICS, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
......
...@@ -83,11 +83,9 @@ namespace sd { ...@@ -83,11 +83,9 @@ namespace sd {
GraphicFilter* GetGrfFilter(); GraphicFilter* GetGrfFilter();
/************************************************************************* /**
|* * slotmaps and definitions of SFX
|* SFX-Slotmaps und -Definitionen */
|*
\************************************************************************/
TYPEINIT1( DrawDocShell, SfxObjectShell ); TYPEINIT1( DrawDocShell, SfxObjectShell );
SFX_IMPL_OBJECTFACTORY( SFX_IMPL_OBJECTFACTORY(
...@@ -96,12 +94,6 @@ SFX_IMPL_OBJECTFACTORY( ...@@ -96,12 +94,6 @@ SFX_IMPL_OBJECTFACTORY(
SFXOBJECTSHELL_STD_NORMAL, SFXOBJECTSHELL_STD_NORMAL,
"simpress" ) "simpress" )
/*************************************************************************
|*
|* Construct
|*
\************************************************************************/
void DrawDocShell::Construct( bool bClipboard ) void DrawDocShell::Construct( bool bClipboard )
{ {
mbInDestruction = sal_False; mbInDestruction = sal_False;
...@@ -121,15 +113,9 @@ void DrawDocShell::Construct( bool bClipboard ) ...@@ -121,15 +113,9 @@ void DrawDocShell::Construct( bool bClipboard )
mpDoc->SetSdrUndoManager( mpUndoManager ); mpDoc->SetSdrUndoManager( mpUndoManager );
mpDoc->SetSdrUndoFactory( new sd::UndoFactory ); mpDoc->SetSdrUndoFactory( new sd::UndoFactory );
UpdateTablePointers(); UpdateTablePointers();
SetStyleFamily(5); //CL: eigentlich SFX_STYLE_FAMILY_PSEUDO SetStyleFamily(5); //CL: actually SFX_STYLE_FAMILY_PSEUDO
} }
/*************************************************************************
|*
|* Konstruktor 1
|*
\************************************************************************/
DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
sal_Bool bDataObject, sal_Bool bDataObject,
DocumentType eDocumentType) : DocumentType eDocumentType) :
...@@ -148,12 +134,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, ...@@ -148,12 +134,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
Construct( eMode == SFX_CREATE_MODE_INTERNAL ); Construct( eMode == SFX_CREATE_MODE_INTERNAL );
} }
/*************************************************************************
|*
|* Konstruktor 2
|*
\************************************************************************/
DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, sal_Bool bDataObject, DocumentType eDocumentType ) : DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, sal_Bool bDataObject, DocumentType eDocumentType ) :
SfxObjectShell( nModelCreationFlags ), SfxObjectShell( nModelCreationFlags ),
mpDoc(NULL), mpDoc(NULL),
...@@ -170,12 +150,6 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, sal_Bool bData ...@@ -170,12 +150,6 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, sal_Bool bData
Construct( sal_False ); Construct( sal_False );
} }
/*************************************************************************
|*
|* Konstruktor 3
|*
\************************************************************************/
DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
sal_Bool bDataObject, sal_Bool bDataObject,
DocumentType eDocumentType) : DocumentType eDocumentType) :
...@@ -194,12 +168,6 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, ...@@ -194,12 +168,6 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
Construct( eMode == SFX_CREATE_MODE_INTERNAL ); Construct( eMode == SFX_CREATE_MODE_INTERNAL );
} }
/*************************************************************************
|*
|* Destruktor
|*
\************************************************************************/
DrawDocShell::~DrawDocShell() DrawDocShell::~DrawDocShell()
{ {
// Tell all listeners that the doc shell is about to be // Tell all listeners that the doc shell is about to be
...@@ -224,7 +192,7 @@ DrawDocShell::~DrawDocShell() ...@@ -224,7 +192,7 @@ DrawDocShell::~DrawDocShell()
if( mbOwnDocument ) if( mbOwnDocument )
delete mpDoc; delete mpDoc;
// damit der Navigator das Verschwinden des Dokuments mitbekommt // that the navigator get informed about the disappearance of the document
SfxBoolItem aItem(SID_NAVIGATOR_INIT, sal_True); SfxBoolItem aItem(SID_NAVIGATOR_INIT, sal_True);
SfxViewFrame* pFrame = mpViewShell ? mpViewShell->GetFrame() : GetFrame(); SfxViewFrame* pFrame = mpViewShell ? mpViewShell->GetFrame() : GetFrame();
...@@ -236,12 +204,6 @@ DrawDocShell::~DrawDocShell() ...@@ -236,12 +204,6 @@ DrawDocShell::~DrawDocShell()
SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L); SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L);
} }
/*************************************************************************
|*
|* Slot-Stati setzen
|*
\************************************************************************/
void DrawDocShell::GetState(SfxItemSet &rSet) void DrawDocShell::GetState(SfxItemSet &rSet)
{ {
...@@ -344,7 +306,7 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive ) ...@@ -344,7 +306,7 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive )
while (pSfxViewFrame) while (pSfxViewFrame)
{ {
// Anzahl FrameViews ermitteln // determine the number of FrameViews
pSfxViewSh = pSfxViewFrame->GetViewShell(); pSfxViewSh = pSfxViewFrame->GetViewShell();
pViewSh = PTR_CAST( ViewShell, pSfxViewSh ); pViewSh = PTR_CAST( ViewShell, pSfxViewSh );
...@@ -364,7 +326,7 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive ) ...@@ -364,7 +326,7 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive )
{ {
for( sal_uInt32 i = 0; pSfxViewFrame && (i < rViews.size()); i++ ) for( sal_uInt32 i = 0; pSfxViewFrame && (i < rViews.size()); i++ )
{ {
// Anzahl FrameViews ermitteln // determine the number of FrameViews
pSfxViewSh = pSfxViewFrame->GetViewShell(); pSfxViewSh = pSfxViewFrame->GetViewShell();
pViewSh = PTR_CAST( ViewShell, pSfxViewSh ); pViewSh = PTR_CAST( ViewShell, pSfxViewSh );
...@@ -378,12 +340,6 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive ) ...@@ -378,12 +340,6 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive )
} }
} }
/*************************************************************************
|*
|* SFX-Aktivierung
|*
\************************************************************************/
void DrawDocShell::Activate( sal_Bool bMDI) void DrawDocShell::Activate( sal_Bool bMDI)
{ {
if (bMDI) if (bMDI)
...@@ -393,35 +349,15 @@ void DrawDocShell::Activate( sal_Bool bMDI) ...@@ -393,35 +349,15 @@ void DrawDocShell::Activate( sal_Bool bMDI)
} }
} }
/*************************************************************************
|*
|* SFX-Deaktivierung
|*
\************************************************************************/
void DrawDocShell::Deactivate( sal_Bool ) void DrawDocShell::Deactivate( sal_Bool )
{ {
} }
/*************************************************************************
|*
|* SFX-Undomanager zurueckgeben
|*
\************************************************************************/
::svl::IUndoManager* DrawDocShell::GetUndoManager() ::svl::IUndoManager* DrawDocShell::GetUndoManager()
{ {
return mpUndoManager; return mpUndoManager;
} }
/*************************************************************************
|*
|* Tabellenzeiger auffrischen
|*
\************************************************************************/
void DrawDocShell::UpdateTablePointers() void DrawDocShell::UpdateTablePointers()
{ {
PutItem( SvxColorListItem( mpDoc->GetColorList(), SID_COLOR_TABLE ) ); PutItem( SvxColorListItem( mpDoc->GetColorList(), SID_COLOR_TABLE ) );
...@@ -442,12 +378,9 @@ void DrawDocShell::CancelSearching() ...@@ -442,12 +378,9 @@ void DrawDocShell::CancelSearching()
} }
} }
/************************************************************************* /**
|* * apply configured slot filters
|* den eingestellten SlotFilter anwenden */
|*
\************************************************************************/
void DrawDocShell::ApplySlotFilter() const void DrawDocShell::ApplySlotFilter() const
{ {
SfxViewShell* pTestViewShell = SfxViewShell::GetFirst(); SfxViewShell* pTestViewShell = SfxViewShell::GetFirst();
...@@ -489,12 +422,9 @@ void DrawDocShell::SetModified( sal_Bool bSet /* = sal_True */ ) ...@@ -489,12 +422,9 @@ void DrawDocShell::SetModified( sal_Bool bSet /* = sal_True */ )
} }
} }
/************************************************************************* /**
|* * Callback for ExecuteSpellPopup()
|* Callback fuer ExecuteSpellPopup() */
|*
\************************************************************************/
// ExecuteSpellPopup now handled by DrawDocShell. This is necessary // ExecuteSpellPopup now handled by DrawDocShell. This is necessary
// to get hands on the outliner and the text object. // to get hands on the outliner and the text object.
IMPL_LINK(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo*, pInfo) IMPL_LINK(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
......
...@@ -38,11 +38,6 @@ using namespace com::sun::star; ...@@ -38,11 +38,6 @@ using namespace com::sun::star;
namespace sd { namespace sd {
/*************************************************************************
|*
|* Ctor
|*
\************************************************************************/
Client::Client(SdrOle2Obj* pObj, ViewShell* pViewShell, ::Window* pWindow) : Client::Client(SdrOle2Obj* pObj, ViewShell* pViewShell, ::Window* pWindow) :
SfxInPlaceClient(pViewShell->GetViewShell(), pWindow, pObj->GetAspect() ), SfxInPlaceClient(pViewShell->GetViewShell(), pWindow, pObj->GetAspect() ),
...@@ -55,24 +50,15 @@ Client::Client(SdrOle2Obj* pObj, ViewShell* pViewShell, ::Window* pWindow) : ...@@ -55,24 +50,15 @@ Client::Client(SdrOle2Obj* pObj, ViewShell* pViewShell, ::Window* pWindow) :
DBG_ASSERT( GetObject().is(), "No object connected!" ); DBG_ASSERT( GetObject().is(), "No object connected!" );
} }
/*************************************************************************
|*
|* Dtor
|*
\************************************************************************/
Client::~Client() Client::~Client()
{ {
} }
/************************************************************************* /**
|* * If IP active, then we get this request to increase the visible section of the
|* Wenn IP-aktiv, dann kommt diese Anforderung um Vergroesserung des * object.
|* sichtbaren Ausschnitts des Objektes */
|*
\************************************************************************/
void Client::RequestNewObjectArea( Rectangle& aObjRect ) void Client::RequestNewObjectArea( Rectangle& aObjRect )
{ {
::sd::View* pView = mpViewShell->GetView(); ::sd::View* pView = mpViewShell->GetView();
...@@ -207,12 +193,9 @@ void Client::ViewChanged() ...@@ -207,12 +193,9 @@ void Client::ViewChanged()
} }
/************************************************************************* /**
|* * Scroll object into visible area.
|* Objekt in den sichtbaren Breich scrollen */
|*
\************************************************************************/
void Client::MakeVisible() void Client::MakeVisible()
{ {
if (mpViewShell->ISA(DrawViewShell)) if (mpViewShell->ISA(DrawViewShell))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment