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