[Libreoffice-commits] core.git: 2 commits - basctl/source sc/source sd/source sfx2/inc sfx2/source starmath/inc starmath/source sw/source
Thomas Arnhold
thomas at arnhold.org
Sat Feb 9 02:32:00 PST 2013
basctl/source/basicide/basidesh.cxx | 6
basctl/source/inc/basidesh.hxx | 1
sc/source/ui/inc/prevwsh.hxx | 2
sc/source/ui/inc/tabvwsh.hxx | 2
sc/source/ui/view/prevwsh.cxx | 36 -----
sc/source/ui/view/tabvwsh4.cxx | 28 ----
sd/source/ui/inc/DrawViewShell.hxx | 2
sd/source/ui/inc/OutlineViewShell.hxx | 3
sd/source/ui/inc/ViewShell.hxx | 4
sd/source/ui/view/clview.cxx | 36 +----
sd/source/ui/view/drawview.cxx | 128 +++++++-----------
sd/source/ui/view/drbezob.cxx | 44 +-----
sd/source/ui/view/drtxtob.cxx | 61 +++-----
sd/source/ui/view/drtxtob1.cxx | 31 +---
sd/source/ui/view/drviews1.cxx | 237 ++++++++++++----------------------
sd/source/ui/view/drviews2.cxx | 58 +++-----
sd/source/ui/view/drviews5.cxx | 36 -----
sd/source/ui/view/outlnvsh.cxx | 32 ----
sd/source/ui/view/viewshe2.cxx | 5
sfx2/inc/sfx2/viewsh.hxx | 2
sfx2/source/view/viewsh.cxx | 8 -
starmath/inc/view.hxx | 1
starmath/source/view.cxx | 8 -
sw/source/ui/inc/pview.hxx | 1
sw/source/ui/inc/view.hxx | 1
sw/source/ui/uiview/pview.cxx | 6
sw/source/ui/uiview/viewport.cxx | 21 ---
27 files changed, 217 insertions(+), 583 deletions(-)
New commits:
commit c12ab867f282e783507fcf74ab5c90e784681f65
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Feb 9 11:29:37 2013 +0100
Remove unused methods
GetOptimalSizePixel and GetHCtrlWidth are never called
Change-Id: Ib2ce1445447e85de66683f8b0fdf4fc8aa464084
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 812ca41..42f005d 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -435,12 +435,6 @@ void Shell::InitTabBar()
}
-Size Shell::GetOptimalSizePixel() const
-{
- return Size( 400, 300 );
-}
-
-
void Shell::OuterResizePixel( const Point &rPos, const Size &rSize )
{
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index e093680..b16f535 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -118,7 +118,6 @@ private:
private:
virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
virtual void OuterResizePixel( const Point &rPos, const Size &rSize );
- virtual Size GetOptimalSizePixel() const;
sal_uInt16 InsertWindowInTable (BaseWindow* pNewWin);
virtual sal_uInt16 PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing );
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 7530478..8a49100 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -71,8 +71,6 @@ protected:
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
- virtual Size GetOptimalSizePixel() const;
-
virtual String GetDescription() const;
virtual void WriteUserData(String &, sal_Bool bBrowse = false);
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index d1e53ad..9ca9868 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -213,8 +213,6 @@ protected:
virtual void QueryObjAreaPixel( Rectangle& rRect ) const;
- virtual Size GetOptimalSizePixel() const;
-
virtual String GetSelectionText( sal_Bool bWholeWord );
virtual sal_Bool HasSelection( sal_Bool bText ) const;
virtual String GetDescription() const;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 37e0e86..2cc99a5 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -211,42 +211,6 @@ String ScPreviewShell::GetDescription() const
return rtl::OUString(" ** Test ** ");
}
-Size ScPreviewShell::GetOptimalSizePixel() const
-{
- Size aOptSize(100,100);
-
- ScTabViewShell* pViewSh = pDocShell->GetBestViewShell();
-
- if ( pViewSh )
- {
- ScViewData* pViewData = pViewSh->GetViewData();
- SCTAB nCurTab = pViewData->GetTabNo();
- ScDocument* pDoc = pDocShell->GetDocument();
- ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
- pDoc->GetPageStyle( nCurTab ),
- SFX_STYLE_FAMILY_PAGE );
-
- OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" );
-
- if ( pStyleSheet )
- {
- const SfxItemSet& rSet = pStyleSheet->GetItemSet();
- const SvxSizeItem& rItem = (const SvxSizeItem&)rSet.Get( ATTR_PAGE_SIZE );
- const Size& rPageSize = rItem.GetSize();
-
- aOptSize.Width() = (long) (rPageSize.Width() * pViewData->GetPPTX());
- aOptSize.Height() = (long) (rPageSize.Height() * pViewData->GetPPTY());
- }
- }
- else
- {
- OSL_FAIL( "TabViewShell not found :-/" );
- }
-
- return aOptSize;
-}
-
void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
{
Size aOutSize( rSize );
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 4f9681d..04af91d 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -305,34 +305,6 @@ sal_uInt16 ScTabViewShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing)
//------------------------------------------------------------------
-Size ScTabViewShell::GetOptimalSizePixel() const
-{
- Size aOptSize;
-
- SCTAB nCurTab = GetViewData()->GetTabNo();
- ScDocument* pDoc = GetViewData()->GetDocument();
- ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
- pDoc->GetPageStyle( nCurTab ),
- SFX_STYLE_FAMILY_PAGE );
-
- OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" );
-
- if ( pStyleSheet )
- {
- const SfxItemSet& rSet = pStyleSheet->GetItemSet();
- const SvxSizeItem& rItem = (const SvxSizeItem&)rSet.Get( ATTR_PAGE_SIZE );
- const Size& rPageSize = rItem.GetSize();
-
- aOptSize.Width() = (long) (rPageSize.Width() * GetViewData()->GetPPTX());
- aOptSize.Height() = (long) (rPageSize.Height() * GetViewData()->GetPPTY());
- }
-
- return aOptSize;
-}
-
-//------------------------------------------------------------------
-
// Zoom fuer In-Place berechnen
// aus Verhaeltnis von VisArea und Fenstergroesse des GridWin
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 1705abc..64de25e 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -389,9 +389,7 @@ protected:
virtual SvxRuler* CreateVRuler(::sd::Window* pWin);
virtual void UpdateHRuler();
virtual void UpdateVRuler();
- virtual long GetHCtrlWidth();
virtual void SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY);
- virtual Size GetOptimalSizePixel() const;
void SetupPage( Size &rSize, long nLeft, long nRight, long nUpper, long nLower,
sal_Bool bSize, sal_Bool bMargin, sal_Bool bScaleAll );
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index eb8dc5d..616ed42 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -150,9 +150,6 @@ public:
bool UpdateTitleObject( SdPage* pPage, Paragraph* pPara );
bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
-protected:
- virtual Size GetOptimalSizePixel() const;
-
private:
OutlineView* pOlView;
SdPage* pLastPage; // Zur performanten Aufbereitung der Preview
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index f141165..7d7c58e 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -537,10 +537,6 @@ protected:
virtual void UpdateHRuler();
virtual void UpdateVRuler();
- // Zeiger auf ein zusaetzliches Control im horizontalen ScrollBar
- // abgeleiteter Klassen (z.B. ein TabBar) zurueckgeben
- virtual long GetHCtrlWidth();
-
virtual void Activate(sal_Bool IsMDIActivate);
virtual void Deactivate(sal_Bool IsMDIActivate);
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 92370bf..2a2bfba 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -476,18 +476,6 @@ bool DrawViewShell::IsLayerModeActive (void) const
}
-
-/**
- * Return size of TabControls and ModeButtons
- */
-
-long DrawViewShell::GetHCtrlWidth()
-{
- // return maTabControl.GetSizePixel().Width();
- return 0;
-}
-
-
/**
* Generate horizontal ruler
*/
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 2df7ffc..152dc11 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -478,42 +478,6 @@ void DrawViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY
/*************************************************************************
|*
-|* Optimale Groesse zurueckgeben
-|*
-\************************************************************************/
-
-Size DrawViewShell::GetOptimalSizePixel() const
-{
- Size aSize;
-
- SdrPageView* pPV = mpDrawView->GetSdrPageView();
- if (pPV)
- {
- SdPage* pPage = (SdPage*) pPV->GetPage();
-
- if (pPage)
- {
- if (!mbZoomOnPage)
- {
- // Gegenwaertigen MapMode beruecksichtigen
- aSize = GetActiveWindow()->LogicToPixel( pPage->GetSize() );
- }
- else
- {
- // 1:1 Darstellung
- MapMode aMapMode(MAP_100TH_MM);
- aSize = GetActiveWindow()->LogicToPixel( pPage->GetSize(), aMapMode );
- const_cast< DrawViewShell* >(this)->mbZoomOnPage = sal_True;
- }
- }
- }
-
- return(aSize);
-}
-
-
-/*************************************************************************
-|*
|* Seite wird gehided
|*
\************************************************************************/
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 6469ef0..2703bf1 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1536,38 +1536,6 @@ sal_Bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
/*************************************************************************
|*
-|* Return optimal Size
-|*
-\************************************************************************/
-
-Size OutlineViewShell::GetOptimalSizePixel() const
-{
- Size aResult(200, 200);
- if (pOlView)
- {
- ::Outliner* pOutliner = pOlView->GetOutliner();
- if (pOutliner)
- {
- Size aTemp = pOutliner->CalcTextSize();
- aTemp = GetActiveWindow()->LogicToPixel(aTemp);
- aResult.Width() = Max(aResult.Width(), aTemp.Width());
- aResult.Height() = Max(aResult.Height(), aTemp.Height());
- if (4 * aResult.Height() > 3 * aResult.Width())
- {
- aResult.Height() = 3 * aResult.Width() / 4;
- }
- }
- }
-
- // now add the default stuff
- aResult.Width() += mpVerticalScrollBar->GetSizePixel().Width();
- aResult.Height() += mpHorizontalScrollBar->GetSizePixel().Height();
- return aResult;
-}
-
-
-/*************************************************************************
-|*
|* Return text of the selection
|*
\************************************************************************/
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index e4b65e0..c666875 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -284,11 +284,6 @@ void ViewShell::UpdateVRuler()
{
}
-long ViewShell::GetHCtrlWidth()
-{
- return 0;
-}
-
/*************************************************************************
|*
|* Eine bestimmte Anzahl von Zeilen scrollen (wird beim automatischen
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index b7110a6..fc78940 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -144,8 +144,6 @@ protected:
virtual void Activate(sal_Bool IsMDIActivate);
virtual void Deactivate(sal_Bool IsMDIActivate);
- virtual Size GetOptimalSizePixel() const;
-
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 941ec15..4a4cfce 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1251,14 +1251,6 @@ void SfxViewShell::SetWindow
//--------------------------------------------------------------------
-Size SfxViewShell::GetOptimalSizePixel() const
-{
- OSL_FAIL( "Useless call!" );
- return Size();
-}
-
-//------------------------------------------------------------------------
-
SfxViewShell::SfxViewShell
(
SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index cdfb614..d0d4f63 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -271,7 +271,6 @@ protected:
const SfxItemSet &rOptions);
virtual void Deactivate(sal_Bool IsMDIActivate);
virtual void Activate(sal_Bool IsMDIActivate);
- virtual Size GetOptimalSizePixel() const;
virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize);
virtual void InnerResizePixel(const Point &rOfs, const Size &rSize);
virtual void OuterResizePixel(const Point &rOfs, const Size &rSize);
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 306d92a..964e284 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -935,14 +935,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default")
}
-Size SmViewShell::GetOptimalSizePixel() const
-{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetOptimalSizePixel" );
-
- return aGraphic.LogicToPixel( ((SmViewShell*)this)->GetDoc()->GetSize() );
-}
-
-
void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::AdjustPosSizePixel" );
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index d055aa5..fbb8a72 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -212,7 +212,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
protected:
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
- virtual Size GetOptimalSizePixel() const;
void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor);
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 68383d4..2cfcf38 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -379,7 +379,6 @@ protected:
virtual void Deactivate(sal_Bool);
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
- virtual Size GetOptimalSizePixel() const;
void SetImageButtonColor(Color& rColor);
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 6d0bb70..c2256f8 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -1770,12 +1770,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent,
return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint );
}
-Size SwPagePreView::GetOptimalSizePixel() const
-{
- OSL_FAIL( "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" );
- return Size( -1, -1 );
-}
-
void SwPagePreViewWin::SetViewShell( ViewShell* pShell )
{
mpViewShell = pShell;
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 729a42b..6d44292 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -1197,27 +1197,6 @@ void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY )
SfxViewShell::SetZoomFactor( rX, rY );
}
-Size SwView::GetOptimalSizePixel() const
-{
- Size aPgSize;
- if ( pWrtShell->GetViewOptions()->getBrowseMode() )
- aPgSize = SvxPaperInfo::GetPaperSize(PAPER_A4);
- else
- {
- aPgSize = GetWrtShell().GetAnyCurRect(RECT_PAGE).SSize();
- aPgSize.Width() += DOCUMENTBORDER * 2;
-
- const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() );
- if( nsUseOnPage::PD_MIRROR == rDesc.GetUseOn() )
- {
- const SvxLRSpaceItem &rLRSpace = rDesc.GetMaster().GetLRSpace();
- const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace();
- aPgSize.Width() += Abs( long(rLeftLRSpace.GetLeft()) - long(rLRSpace.GetLeft()) );
- }
- }
- return GetEditWin().LogicToPixel( aPgSize );
-}
-
sal_Bool SwView::UpdateScrollbars()
{
sal_Bool bRet = sal_False;
commit d84e78aa31252f6e514ad8a8ef38c4a4ec93cb37
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Feb 9 11:28:44 2013 +0100
Translate German comments
Change-Id: I79cc861fadb908605c6d2ed638e3d06ca5a57869
diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx
index 91d2579..69247b1 100644
--- a/sd/source/ui/view/clview.cxx
+++ b/sd/source/ui/view/clview.cxx
@@ -19,7 +19,6 @@
#include <sfx2/app.hxx>
-
#include "ClientView.hxx"
#include "drawview.hxx"
#include "sdpage.hxx"
@@ -30,12 +29,9 @@ namespace sd {
class DrawViewShell;
-
-/*************************************************************************
-|*
-|* Ctor: Die ClientView wird fuer DrawDocShell::Draw() verwendet
-|*
-\************************************************************************/
+/**
+ * ClientView is used for DrawDocShell::Draw()
+ */
ClientView::ClientView(
DrawDocShell* pDocSh,
@@ -46,22 +42,14 @@ ClientView::ClientView(
}
-/*************************************************************************
-|*
-|* Dtor
-|*
-\************************************************************************/
-
ClientView::~ClientView()
{
}
-/*************************************************************************
-|*
-|* Wenn die View kein Invalidate() an den Fenstern durchfuehren soll, muss
-|* man diese Methode ueberladen und entsprechend anders reagieren.
-|*
-\************************************************************************/
+/**
+ * If View should not Invalidate() the windows, this method has
+ * to be overloaded and properly handled.
+ */
void ClientView::InvalidateOneWin(::Window& rWin)
{
@@ -69,12 +57,10 @@ void ClientView::InvalidateOneWin(::Window& rWin)
CompleteRedraw(&rWin, aRegion);
}
-/*************************************************************************
-|*
-|* Wenn die View kein Invalidate() an den Fenstern durchfuehren soll, muss
-|* man diese Methode ueberladen und entsprechend anders reagieren.
-|*
-\************************************************************************/
+/**
+ * If View should not Invalidate() the windows, this method has
+ * to be overloaded and properly handled.
+ */
void ClientView::InvalidateOneWin(::Window& rWin, const Rectangle& rRect)
{
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 54097ab..8a0a977 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -77,13 +77,10 @@ namespace sd {
TYPEINIT1(DrawView, View);
-/*************************************************************************
-|*
-|* Konstruktor
-|* zeigt die erste Seite des Dokuments auf Position 0,0 an;
-|* falls noch keine Seite vorhanden ist, wird eine erzeugt
-|*
-\************************************************************************/
+/**
+ * Shows the first page of document at position 0,0. In the case
+ * that there is no page a page is created.
+ */
DrawView::DrawView( DrawDocShell* pDocSh, OutputDevice* pOutDev, DrawViewShell* pShell)
: ::sd::View(*pDocSh->GetDoc(), pOutDev, pShell)
@@ -95,22 +92,14 @@ DrawView::DrawView( DrawDocShell* pDocSh, OutputDevice* pOutDev, DrawViewShell*
SetCurrentObj(OBJ_RECT, SdrInventor);
}
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
-
DrawView::~DrawView()
{
delete mpVDev;
}
-/*************************************************************************
-|*
-|* virtuelle Methode von SdrView, wird bei Selektionsaenderung gerufen
-|*
-\************************************************************************/
+/**
+ * Virtual method from SdrView, called at selection change.
+ */
void DrawView::MarkListHasChanged()
{
@@ -120,17 +109,15 @@ void DrawView::MarkListHasChanged()
mpDrawViewShell->SelectionHasChanged();
}
-/*************************************************************************
-|*
-|* virtuelle Methode von SdrView, wird bei Modelaenderung gerufen
-|*
-\************************************************************************/
+/**
+ * Virtual method from SdrView, called at model change.
+ */
void DrawView::ModelHasChanged()
{
::sd::View::ModelHasChanged();
- // den Gestalter zur Neudarstellung zwingen
+ // force framer to rerender
SfxStyleSheetBasePool* pSSPool = mrDoc.GetStyleSheetPool();
pSSPool->Broadcast(SfxStyleSheetPoolHint(SFX_STYLESHEETPOOL_CHANGES));
@@ -139,19 +126,17 @@ void DrawView::ModelHasChanged()
}
-/*************************************************************************
-|*
-|* Attribute auf Titel- und Gliederungtext und Hintergrundrechteck einer
-|* Masterpage in Vorlagen umlenken, sonst an Basisklasse weitergeben
-|*
-\************************************************************************/
+/**
+ * Redirect attributes onto title and outline text and background
+ * rectangle of a masterpage into templates, otherwise pass on baseclass.
+ */
sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
sal_Bool bReplaceAll)
{
sal_Bool bOk = sal_False;
- // wird eine Masterpage bearbeitet?
+ // is there a masterpage edit?
if ( mpDrawViewShell && mpDrawViewShell->GetEditMode() == EM_MASTERPAGE )
{
SfxStyleSheetBasePool* pStShPool = mrDoc.GetStyleSheetPool();
@@ -176,7 +161,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
{
// Presentation object (except outline)
SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind );
- DBG_ASSERT(pSheet, "StyleSheet nicht gefunden");
+ DBG_ASSERT(pSheet, "StyleSheet not found");
SfxItemSet aTempSet( pSheet->GetItemSet() );
aTempSet.Put( rSet );
@@ -201,7 +186,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
pOutliner->SetUpdateMode(sal_False);
mpDocSh->SetWaitCursor( sal_True );
- // Platzhalter durch Vorlagennamen ersetzen
+ // replace placeholder by template name
String aComment(SdResId(STR_UNDO_CHANGE_PRES_OBJECT));
xub_StrLen nPos = aComment.Search( (sal_Unicode)'$' );
aComment.Erase(nPos, 1);
@@ -222,7 +207,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
aName += (sal_Unicode)(' ');
aName += String::CreateFromInt32( (nDepth <= 0) ? 1 : nDepth + 1 );
SfxStyleSheet* pSheet = (SfxStyleSheet*)pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
- DBG_ASSERT(pSheet, "StyleSheet nicht gefunden");
+ DBG_ASSERT(pSheet, "StyleSheet not found");
SfxItemSet aTempSet( pSheet->GetItemSet() );
aTempSet.Put( rSet );
@@ -321,7 +306,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
aName += String::CreateFromInt32( (sal_Int32)nLevel );
SfxStyleSheet* pSheet = (SfxStyleSheet*)pStShPool->
Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
- DBG_ASSERT(pSheet, "StyleSheet nicht gefunden");
+ DBG_ASSERT(pSheet, "StyleSheet not found");
SfxItemSet aTempSet( pSheet->GetItemSet() );
@@ -374,7 +359,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
bOk = ::sd::View::SetAttributes(rSet, bReplaceAll);
}
}
- else // nicht auf der Masterpage
+ else // not at masterpage
{
bOk = ::sd::View::SetAttributes(rSet, bReplaceAll);
}
@@ -382,11 +367,9 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
return (bOk);
}
-/*************************************************************************
-|*
-|* Notify fuer Aenderung der Seitenanordnung
-|*
-\************************************************************************/
+/**
+ * Notify for change of site arragement
+ */
void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
@@ -422,11 +405,9 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
::sd::View::Notify(rBC, rHint);
}
-/*************************************************************************
-|*
-|* PageOrderChangedHint blockieren/freigeben
-|*
-\************************************************************************/
+/**
+ * Lock/Unlock PageOrderChangedHint
+ */
void DrawView::BlockPageOrderChangedHint(sal_Bool bBlock)
{
@@ -434,23 +415,21 @@ void DrawView::BlockPageOrderChangedHint(sal_Bool bBlock)
mnPOCHSmph++;
else
{
- DBG_ASSERT(mnPOCHSmph, "Zaehlerunterlauf");
+ DBG_ASSERT(mnPOCHSmph, "counter overflow");
mnPOCHSmph--;
}
}
-/*************************************************************************
-|*
-|* StyleSheet-Setzen auf der Masterpage abfangen, wenn Praesentationsobjekte
-|* selektiert sind
-|*
-\************************************************************************/
+/**
+ * If presentation objects are selected, intercept stylesheet-positing at
+ * masterpage.
+ */
sal_Bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr)
{
sal_Bool bResult = sal_True;
- // wird eine Masterpage bearbeitet?
+ // is there a masterpage edit?
if (mpDrawViewShell && mpDrawViewShell->GetEditMode() == EM_MASTERPAGE)
{
if (IsPresObjSelected(sal_False, sal_True))
@@ -472,11 +451,9 @@ sal_Bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemov
return bResult;
}
-/*************************************************************************
-|*
-|* Paint-Methode: das Ereignis wird an die View weitergeleitet
-|*
-\************************************************************************/
+/**
+ * Paint-method: Redirect event to the view
+ */
void DrawView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
{
@@ -510,11 +487,9 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::co
}
}
-/*************************************************************************
-|*
-|* Paint-Event during running slide show
-|*
-\************************************************************************/
+/**
+ * Paint-Event during running slide show
+ */
void DrawView::PresPaint(const Region& rRegion)
{
@@ -526,21 +501,19 @@ void DrawView::PresPaint(const Region& rRegion)
}
}
-/*************************************************************************
-|* entscheidet, ob ein Objekt markiert werden kann (z. B. noch nicht
-|* erschienene Animationsobjekte in der Diashow)
-\************************************************************************/
+/**
+ * Decides if an object could get marked (eg. unreleased animation objects
+ * in slide show).
+ */
sal_Bool DrawView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
{
return FmFormView::IsObjMarkable(pObj, pPV);
}
-/*************************************************************************
-|*
-|* Uebergebenen Bereich sichtbar machen (es wird ggf. gescrollt)
-|*
-\************************************************************************/
+/**
+ * Make passed region visible (scrolling if necessary)
+ */
void DrawView::MakeVisible(const Rectangle& rRect, ::Window& rWin)
{
@@ -549,11 +522,10 @@ void DrawView::MakeVisible(const Rectangle& rRect, ::Window& rWin)
mpDrawViewShell->MakeVisible(rRect, rWin);
}
}
-/*************************************************************************
-|*
-|* Seite wird gehided
-|*
-\************************************************************************/
+
+/**
+ * Hide page.
+ */
void DrawView::HideSdrPage()
{
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 0ff649c..6aa095b 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -17,11 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "BezierObjectBar.hxx"
#include <sfx2/app.hxx>
#include <sfx2/msg.hxx>
-
#include <sfx2/viewfrm.hxx>
#include <sfx2/objface.hxx>
@@ -33,11 +31,8 @@
#include <svx/svdundo.hxx>
#include <sfx2/dispatch.hxx>
-
#include "sdresid.hxx"
-
-
#include "res_bmp.hrc"
#include "glob.hrc"
#include "strings.hrc"
@@ -57,13 +52,9 @@ using namespace sd;
namespace sd {
-/*************************************************************************
-|*
-|* Standardinterface deklarieren (Die Slotmap darf nicht leer sein)
-|*
-\************************************************************************/
-
-
+/**
+ * Declare default interface (Slotmap must not be empty)
+ */
SFX_IMPL_INTERFACE(BezierObjectBar, ::SfxShell, SdResId(STR_BEZIEROBJECTBARSHELL))
{
@@ -71,11 +62,6 @@ SFX_IMPL_INTERFACE(BezierObjectBar, ::SfxShell, SdResId(STR_BEZIEROBJECTBARSHELL
TYPEINIT1(BezierObjectBar, ::SfxShell);
-/*************************************************************************
-|*
-|* Standard-Konstruktor
-|*
-\************************************************************************/
BezierObjectBar::BezierObjectBar(
ViewShell* pSdViewShell,
@@ -92,11 +78,6 @@ BezierObjectBar::BezierObjectBar(
SetHelpId( SD_IF_SDDRAWBEZIEROBJECTBAR );
}
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
BezierObjectBar::~BezierObjectBar()
{
@@ -104,17 +85,15 @@ BezierObjectBar::~BezierObjectBar()
}
-/*************************************************************************
-|*
-|* Status der Attribut-Items
-|*
-\************************************************************************/
+/**
+ * Status of attribute items.
+ */
void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
{
SfxItemSet aAttrSet( mpView->GetDoc().GetPool() );
mpView->GetAttributes( aAttrSet );
- rSet.Put(aAttrSet, sal_False); // <- sal_False, damit DontCare-Status uebernommen wird
+ rSet.Put(aAttrSet, sal_False); // <- sal_False, so DontCare-Status gets aquired
FunctionReference xFunc( mpViewSh->GetCurrentFunction() );
@@ -221,12 +200,9 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
}
}
-
-/*************************************************************************
-|*
-|* Bearbeitung der SfxRequests
-|*
-\************************************************************************/
+/**
+ * Process SfxRequests
+ */
void BezierObjectBar::Execute(SfxRequest& rReq)
{
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 7980f14..ce9fbea 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -74,13 +74,10 @@ using namespace ::com::sun::star;
namespace sd {
-/*************************************************************************
-|*
-|* Standardinterface deklarieren (Die Slotmap darf nicht leer sein, also
-|* tragen wir etwas ein, was hier (hoffentlich) nie vorkommt).
-|*
-\************************************************************************/
-
+/**
+ * Declare default interface (Slotmap must not be empty, therefore enter
+ * something that (hopefully) never occurs.
+ */
SFX_IMPL_INTERFACE( TextObjectBar, SfxShell, SdResId(STR_TEXTOBJECTBARSHELL) )
{
@@ -88,11 +85,6 @@ SFX_IMPL_INTERFACE( TextObjectBar, SfxShell, SdResId(STR_TEXTOBJECTBARSHELL) )
TYPEINIT1( TextObjectBar, SfxShell );
-/*************************************************************************
-|*
-|* Standard-Konstruktor
-|*
-\************************************************************************/
TextObjectBar::TextObjectBar (
ViewShell* pSdViewSh,
@@ -129,22 +121,15 @@ TextObjectBar::TextObjectBar (
// SetHelpId( SD_IF_SDDRAWTEXTOBJECTBAR );
}
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
TextObjectBar::~TextObjectBar()
{
SetRepeatTarget(NULL);
}
-/*************************************************************************
-|*
-|* Status der Attribut-Items
-|*
-\************************************************************************/
+/**
+ * Status of attribute items.
+ */
void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
@@ -242,7 +227,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if (pOLV &&
( pOLV->GetOutliner()->GetMode() == OUTLINERMODE_OUTLINEOBJECT || bOutlineViewSh ) )
{
- // Outliner im Gliederungsmodus
+ // Outliner at outline-mode
::Outliner* pOutl = pOLV->GetOutliner();
std::vector<Paragraph*> aSelList;
@@ -259,7 +244,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
// is a title object (and thus depth==1)
if(pOutl->GetAbsPos(pPara) > 1 || ( pOutl->HasParaFlag(pPara,PARAFLAG_ISPAGE) && pOutl->GetAbsPos(pPara) > 0 ) )
{
- // Nicht ganz oben
+ // not at top
bDisableUp = sal_False;
}
}
@@ -268,7 +253,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
// old behaviour for OUTLINERMODE_OUTLINEOBJECT
if(pOutl->GetAbsPos(pPara) > 0)
{
- // Nicht ganz oben
+ // not at top
bDisableUp = sal_False;
}
}
@@ -281,14 +266,14 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE )) )
{
- // Nicht minimale Tiefe
+ // not minimum depth
bDisableLeft = sal_False;
}
if( (nDepth < pOLV->GetOutliner()->GetMaxDepth() && ( !bOutlineViewSh || pOutl->GetAbsPos(pPara) != 0 )) ||
(bOutlineViewSh && (nDepth <= 0) && pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE ) && pOutl->GetAbsPos(pPara) != 0) )
{
- // Nicht maximale Tiefe und nicht ganz oben
+ // not maximum depth and not at top
bDisableRight = sal_False;
}
}
@@ -296,7 +281,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if ( ( pOutl->GetAbsPos(pPara) < pOutl->GetParagraphCount() - 1 ) &&
( pOutl->GetParagraphCount() > 1 || !bOutlineViewSh) )
{
- // Nicht letzter Absatz
+ // not last paragraph
bDisableDown = sal_False;
}
@@ -394,10 +379,10 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
- rSet.Put( aAttrSet, sal_False ); // <- sal_False, damit DontCare-Status uebernommen wird
+ rSet.Put( aAttrSet, sal_False ); // <- sal_False, so DontCare-Status gets aquired
- // die sind im Gliederungsmodus disabled
+ // these are disabled in outline-mode
if (!mpViewShell->ISA(DrawViewShell))
{
rSet.DisableItem( SID_ATTR_PARA_ADJUST_LEFT );
@@ -416,7 +401,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
else
{
- // Absatzabstand
+ // paragraph spacing
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
if( pOLV )
{
@@ -441,12 +426,12 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
else
{
- // Wird zur Zeit nie disabled !
+ // never disabled at the moment!
//rSet.DisableItem( SID_PARASPACE_INCREASE );
//rSet.DisableItem( SID_PARASPACE_DECREASE );
}
- // Absatzausrichtung
+ // paragraph justification
SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
switch( eAdj )
{
@@ -530,7 +515,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
}
- // Ausrichtung (hoch/tief) wird auch im Gliederungsmodus gebraucht
+ // justification (superscript, subscript) is also needed in outline-mode
SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
@@ -540,11 +525,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
}
-/*************************************************************************
-|*
-|* Command event
-|*
-\************************************************************************/
+/**
+ * Command event
+ */
void TextObjectBar::Command( const CommandEvent& )
{
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index f801b71..46bb8e3 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -17,10 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "TextObjectBar.hxx"
-
#include <svx/svxids.hrc>
#include <editeng/editview.hxx>
@@ -57,7 +55,6 @@
#include <editeng/frmdiritem.hxx>
#include <svl/itemiter.hxx>
-
#include "app.hrc"
#include "eetext.hxx"
@@ -73,11 +70,9 @@
namespace sd {
-/*************************************************************************
-|*
-|* Bearbeitung der SfxRequests
-|*
-\************************************************************************/
+/**
+ * Process SfxRequests
+ */
void TextObjectBar::Execute( SfxRequest &rReq )
{
@@ -186,10 +181,10 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
else
{
- // Der folgende Code kann enabled werden, wenn ich von
- // JOE einen richtigen Status (DontCare) bekomme;
+ // the following code could be enabled, if I get a correct
+ // DontCare status from JOE.
- // Wird enabled, obwohl es nicht richtig funktioniert (s.o.)
+ // gets enabled, through it doesn't really work (see above)
SfxItemSet aEditAttr( mpView->GetDoc().GetPool() );
mpView->GetAttributes( aEditAttr );
if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SFX_ITEM_AVAILABLE )
@@ -227,8 +222,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
rReq.Done();
Invalidate();
- // Um die Preview (im Gliederungsmodus) zu aktualisieren muss
- // der Slot invalidiert werden:
+ // to refresh preview (in outline mode), slot has to be invalidated:
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
break;
@@ -343,7 +337,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if( !pArgs )
{
- //aNewAttr.InvalidateAllItems(); <- Macht Probleme (#35465#)
+ //aNewAttr.InvalidateAllItems(); <- produces problems (#35465#)
switch ( nSlot )
{
@@ -472,7 +466,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
break;
- // Attribute fuer die TextObjectBar
+ // attributes for TextObjectBar
case SID_ATTR_CHAR_FONT:
{
if( pArgs )
@@ -556,12 +550,11 @@ void TextObjectBar::Execute( SfxRequest &rReq )
mpView->SetAttributes(*pArgs);
- // Aus Performance- und Erweiterungsgruenden wird
- // jetzt die komplette Shell invalidiert
+ // invalidate entire shell because of performance and
+ // extension reasons
Invalidate();
- // Um die Preview (im Gliederungsmodus) zu aktualisieren muss
- // der Slot invalidiert werden:
+ // to refresh preview (in outline mode), slot has to be invalidated:
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
break;
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index db12ef4..92370bf 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -114,12 +114,6 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
}
-/*************************************************************************
-|*
-|* Deactivate()
-|*
-\************************************************************************/
-
void DrawViewShell::Deactivate(sal_Bool bIsMDIActivate)
{
ViewShell::Deactivate(bIsMDIActivate);
@@ -146,11 +140,10 @@ namespace
}
}
-/*************************************************************************
-|*
-|* Wird gerufen, wenn sich der Selektionszustand der View aendert
-|*
-\************************************************************************/
+/**
+ * Called, if state of selection of view is changed
+ */
+
void DrawViewShell::SelectionHasChanged (void)
{
Invalidate();
@@ -192,9 +185,7 @@ void DrawViewShell::SelectionHasChanged (void)
Client* pIPClient = static_cast<Client*>(rBase.GetIPClient());
if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
{
- /**********************************************************************
- * Ggf. OLE-Objekt beruecksichtigen und deaktivieren
- **********************************************************************/
+ // as appropriate take ole-objects into account and deactivate
// this means we recently deselected an inplace active ole object so
// we need to deselect it now
@@ -265,13 +256,9 @@ void DrawViewShell::SelectionHasChanged (void)
GetViewShellBase().GetDrawController().FireSelectionChangeListener();
}
-
-/*************************************************************************
-|*
-|* Zoomfaktor setzen
-|*
-\************************************************************************/
-
+/**
+ * set zoom factor
+ */
void DrawViewShell::SetZoom( long nZoom )
{
// Make sure that the zoom factor will not be recalculated on
@@ -283,11 +270,9 @@ void DrawViewShell::SetZoom( long nZoom )
mpViewOverlayManager->onZoomChanged();
}
-/*************************************************************************
-|*
-|* Zoomrechteck fuer aktives Fenster einstellen
-|*
-\************************************************************************/
+/**
+ * Set zoom rectangle for active window
+ */
void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect )
{
@@ -297,12 +282,10 @@ void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect )
mpViewOverlayManager->onZoomChanged();
}
-/*************************************************************************
-|*
-|* PrepareClose, ggfs. Texteingabe beenden, damit andere Viewshells ein
-|* aktualisiertes Textobjekt vorfinden
-|*
-\************************************************************************/
+/**
+ * PrepareClose, as appropriate end text input, so other viewshells
+ * discover an refreshed text objext.
+ */
sal_uInt16 DrawViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
@@ -329,11 +312,9 @@ sal_uInt16 DrawViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
return bRet;
}
-/*************************************************************************
-|*
-|* Status (Enabled/Disabled) von Menue-SfxSlots setzen
-|*
-\************************************************************************/
+/**
+ * Set status (enabled/disabled) of menu SfxSlots
+ */
void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
{
@@ -358,7 +339,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
if (mePageKind == PK_HANDOUT)
{
- // Bei Handzetteln nur MasterPage zulassen
+ // at handouts only allow MasterPage
eEMode = EM_MASTERPAGE;
}
@@ -418,7 +399,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
if (!mpActualPage)
{
- // Sofern es keine mpActualPage gibt, wird die erste genommen
+ // as long as there is no mpActualPage, take first
mpActualPage = GetDoc()->GetSdPage(0, mePageKind);
}
@@ -496,12 +477,9 @@ bool DrawViewShell::IsLayerModeActive (void) const
-
-/*************************************************************************
-|*
-|* Groesse des TabControls und der ModeButtons zurueckgeben
-|*
-\************************************************************************/
+/**
+ * Return size of TabControls and ModeButtons
+ */
long DrawViewShell::GetHCtrlWidth()
{
@@ -510,11 +488,9 @@ long DrawViewShell::GetHCtrlWidth()
}
-/*************************************************************************
-|*
-|* Horizontales Lineal erzeugen
-|*
-\************************************************************************/
+/**
+ * Generate horizontal ruler
+ */
SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, sal_Bool bIsFirst)
{
@@ -544,8 +520,8 @@ SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, sal_Bool bIsFirst)
pRuler->SetUnit( FieldUnit( nMetric ) );
- // ... und auch DefTab am Lineal einstellen
- pRuler->SetDefTabDist( GetDoc()->GetDefaultTabulator() ); // Neu
+ // ... and also set DefTab at the ruler
+ pRuler->SetDefTabDist( GetDoc()->GetDefaultTabulator() ); // new
Fraction aUIScale(pWin->GetMapMode().GetScaleX());
aUIScale *= GetDoc()->GetUIScale();
@@ -554,11 +530,9 @@ SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, sal_Bool bIsFirst)
return pRuler;
}
-/*************************************************************************
-|*
-|* Vertikales Lineal erzeugen
-|*
-\************************************************************************/
+/**
+ * Generate vertical ruler
+ */
SvxRuler* DrawViewShell::CreateVRuler(::sd::Window* pWin)
{
@@ -585,11 +559,9 @@ SvxRuler* DrawViewShell::CreateVRuler(::sd::Window* pWin)
return pRuler;
}
-/*************************************************************************
-|*
-|* Horizontales Lineal aktualisieren
-|*
-\************************************************************************/
+/**
+ * Refresh horizontal ruler
+ */
void DrawViewShell::UpdateHRuler()
{
@@ -602,11 +574,9 @@ void DrawViewShell::UpdateHRuler()
mpHorizontalRuler->ForceUpdate();
}
-/*************************************************************************
-|*
-|* Vertikales Lineal aktualisieren
-|*
-\************************************************************************/
+/**
+ * Refresh vertical ruler
+ */
void DrawViewShell::UpdateVRuler()
{
@@ -618,22 +588,18 @@ void DrawViewShell::UpdateVRuler()
mpVerticalRuler->ForceUpdate();
}
-/*************************************************************************
-|*
-|* Metrik setzen
-|*
-\************************************************************************/
+/**
+ * Set metric
+ */
void DrawViewShell::SetUIUnit(FieldUnit eUnit)
{
ViewShell::SetUIUnit(eUnit);
}
-/*************************************************************************
-|*
-|* TabControl nach Splitteraenderung aktualisieren
-|*
-\************************************************************************/
+/**
+ * Refresh TabControl on splitter change
+ */
IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab )
{
@@ -677,12 +643,9 @@ SdPage* DrawViewShell::getCurrentPage() const
}
}
-/*************************************************************************
-|*
-|* neue aktuelle Seite auswaehlen, falls sich die Seitenfolge geaendert
-|* hat (z. B. durch Undo)
-|*
-\************************************************************************/
+/**
+ * Select new refreshed page, in case of a page order change (eg. by undo)
+ */
void DrawViewShell::ResetActualPage()
{
@@ -699,7 +662,7 @@ void DrawViewShell::ResetActualPage()
if (meEditMode == EM_PAGE)
{
- // Update fuer TabControl
+ // Update for TabControl
maTabControl.Clear();
SdPage* pPage = NULL;
@@ -711,7 +674,7 @@ void DrawViewShell::ResetActualPage()
aPageName = pPage->GetName();
maTabControl.InsertPage(i + 1, aPageName);
- // Selektionskennungen der Seiten korrigieren
+ // correct selection recognition of the pages
GetDoc()->SetSelected(pPage, i == nCurrentPage);
}
@@ -743,12 +706,9 @@ void DrawViewShell::ResetActualPage()
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
}
-/*************************************************************************
-|*
-|* Verb auf OLE-Objekt anwenden
-|*
-\************************************************************************/
-
+/**
+ * Apply "Verb" on OLE-object.
+ */
ErrCode DrawViewShell::DoVerb(long nVerb)
{
@@ -775,11 +735,9 @@ ErrCode DrawViewShell::DoVerb(long nVerb)
}
-/*************************************************************************
-|*
-|* OLE-Object aktivieren
-|*
-\************************************************************************/
+/**
+ * Activate OLE-object
+ */
sal_Bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
{
@@ -800,12 +758,10 @@ sal_Bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
return(bActivated);
}
-/*************************************************************************
-|*
-|* Auf gewuenschte Seite schalten
-|* Der Parameter nSelectedPage bezieht sich auf den aktuellen EditMode
-|*
-\************************************************************************/
+/**
+ * Switch to desired page.
+ * nSelectPage refers to the current EditMode
+ */
void LclResetFlag (bool& rbFlag) {rbFlag = false;}
@@ -926,7 +882,7 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
SdPage* pMaster = GetDoc()->GetMasterSdPage(nSelectedPage, mePageKind);
- // Passt die selektierte Seite zur MasterPage?
+ // does the selected page fit to the masterpage?
sal_uInt16 nPageCount = GetDoc()->GetSdPageCount(mePageKind);
for (sal_uInt16 i = 0; i < nPageCount; i++)
{
@@ -940,7 +896,7 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
if (!mpActualPage)
{
- // Die erste Seite nehmen, welche zur MasterPage passt
+ // take the first page, that fits to the masterpage
for (sal_uInt16 i = 0; i < nPageCount; i++)
{
SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
@@ -955,24 +911,24 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
for (sal_uInt16 i = 0; i < GetDoc()->GetSdPageCount(mePageKind); i++)
{
- // Alle Seiten deselektieren
+ // deselect all pages
GetDoc()->SetSelected( GetDoc()->GetSdPage(i, mePageKind), sal_False);
}
if (!mpActualPage)
{
- // Sofern es keine mpActualPage gibt, wird die erste genommen
+ // as far as there is no mpActualPage, take the first
mpActualPage = GetDoc()->GetSdPage(0, mePageKind);
}
- // diese Seite auch selektieren (mpActualPage zeigt immer auf Zeichenseite,
- // nie auf eine Masterpage)
+ // also select this page (mpActualPage always points at a drawing page,
+ // never at a masterpage)
GetDoc()->SetSelected(mpActualPage, sal_True);
rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) );
if( !xSlideshow.is() || !xSlideshow->isRunning() || ( xSlideshow->getAnimationMode() != ANIMATIONMODE_SHOW ) )
{
- // VisArea zuziehen, um ggf. Objekte zu deaktivieren
+ // tighten VisArea, to possibly deactivate objects
// !!! only if we are not in presentation mode (#96279) !!!
OSL_ASSERT (GetViewShell()!=NULL);
GetViewShell()->DisconnectAllClients();
@@ -1138,7 +1094,7 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
VisAreaChanged(aVisAreaWin);
mpDrawView->VisAreaChanged(GetActiveWindow());
- // Damit der Navigator (und das Effekte-Window) das mitbekommt (/-men)
+ // so navigator (and effect window) notice that
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME, sal_True, sal_False);
rBindings.Invalidate(SID_STATUS_PAGE, sal_True, sal_False);
@@ -1155,11 +1111,9 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
}
-/*************************************************************************
-|*
-|* Pruefen, ob ein Seitenwechsel erlaubt ist
-|*
-\************************************************************************/
+/**
+ * Check if page change is allowed
+ */
sal_Bool DrawViewShell::IsSwitchPageAllowed() const
{
@@ -1172,12 +1126,9 @@ sal_Bool DrawViewShell::IsSwitchPageAllowed() const
return bOK;
}
-/*************************************************************************
-|*
-|* neue aktuelle Seite auswaehlen, falls sich die Seitenfolge geaendert
-|* hat (z. B. durch Undo)
-|*
-\************************************************************************/
+/**
+ * Select new refreshed page, in case of a page order change (eg. by undo)
+ */
void DrawViewShell::ResetActualLayer()
{
@@ -1190,9 +1141,9 @@ void DrawViewShell::ResetActualLayer()
sal_uInt16 nOldLayerCnt = pLayerBar->GetPageCount();
sal_uInt16 nOldLayerId = pLayerBar->GetCurPageId();
- /*************************************************************
- * Update fuer LayerTab
- *************************************************************/
+ /**
+ * Update for LayerTab
+ */
pLayerBar->Clear();
String aName;
@@ -1219,7 +1170,7 @@ void DrawViewShell::ResetActualLayer()
{
if (meEditMode == EM_MASTERPAGE)
{
- // Layer der Page nicht auf MasterPage anzeigen
+ // don't show page layer onto the masterpage
if (aName != aLayoutLayer &&
aName != aControlsLayer &&
aName != aMeasureLinesLayer)
@@ -1231,7 +1182,7 @@ void DrawViewShell::ResetActualLayer()
if (pPV && !pPV->IsLayerVisible(aName))
{
- // Unsichtbare Layer werden anders dargestellt
+ // invisible layers are displayed differently
nBits = TPB_SPECIAL;
}
@@ -1240,7 +1191,7 @@ void DrawViewShell::ResetActualLayer()
}
else
{
- // Layer der MasterPage nicht auf Page anzeigen
+ // don't show masterpage layer onto the page
if ( aName != aBackgroundObjLayer )
{
pLayerBar->InsertPage(nLayer+1, aName);
@@ -1249,7 +1200,7 @@ void DrawViewShell::ResetActualLayer()
if (!mpDrawView->GetSdrPageView()->IsLayerVisible(aName))
{
- // Unsichtbare Layer werden anders dargestellt
+ // invisible layers are displayed differently
nBits = TPB_SPECIAL;
}
@@ -1279,11 +1230,9 @@ void DrawViewShell::ResetActualLayer()
}
}
-/*************************************************************************
-|*
-|* Verzoegertes Close ausfuehren
-|*
-\************************************************************************/
+/**
+ * Execute a delayed close
+ */
IMPL_LINK( DrawViewShell, CloseHdl, Timer*, pTimer )
{
@@ -1292,11 +1241,9 @@ IMPL_LINK( DrawViewShell, CloseHdl, Timer*, pTimer )
return 0L;
}
-/*************************************************************************
-|*
-|* AcceptDrop
-|*
-\************************************************************************/
+/**
+ * AcceptDrop
+ */
sal_Int8 DrawViewShell::AcceptDrop (
const AcceptDropEvent& rEvt,
@@ -1314,11 +1261,9 @@ sal_Int8 DrawViewShell::AcceptDrop (
return mpDrawView->AcceptDrop( rEvt, rTargetHelper, pTargetWindow, nPage, nLayer );
}
-/*************************************************************************
-|*
-|* ExecuteDrop
-|*
-\************************************************************************/
+/**
+ * ExecuteDrop
+ */
sal_Int8 DrawViewShell::ExecuteDrop (
const ExecuteDropEvent& rEvt,
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 30ac765..d3f46b9 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -112,15 +112,13 @@ public:
}
};
-/*************************************************************************
-|*
-|* SfxRequests fuer temporaere Funktionen
-|*
-\************************************************************************/
+/**
+ * SfxRequests for temporary actions
+ */
void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
- // Waehrend einer Native-Diashow wird nichts ausgefuehrt!
+ // during a native slide show nothing gets executed!
if(SlideShow::IsRunning( GetViewShellBase() ) && (rReq.GetSlot() != SID_NAVIGATOR))
return;
@@ -134,7 +132,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
sal_uInt16 nSId = rReq.GetSlot();
- // Slot wird gemapped (ToolboxImages/-Slots)
+ // Slot gets mapped (ToolboxImages/-Slots)
MapSlot( nSId );
switch ( nSId )
@@ -164,9 +162,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
- // Flaechen und Linien-Attribute:
- // Sollten (wie StateMethode) eine eigene
- // Execute-Methode besitzen
+ // area and line attributes: shall have
+ // an own Execute method (like StateMethode)
case SID_ATTR_FILL_STYLE:
case SID_ATTR_FILL_COLOR:
case SID_ATTR_FILL_GRADIENT:
@@ -187,7 +184,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
sal_Bool bMergeUndo = sal_False;
::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
- // Anpassungen Start/EndWidth
+ // adjustment Start/EndWidth
if(nSId == SID_ATTR_LINE_WIDTH)
{
SdrObject* pObj = NULL;
@@ -238,7 +235,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (nSId == SID_ATTR_FILL_SHADOW)
{
- // Ggf. werden transparente Objekte wei?gefuellt
+ // possibly transparent objects are filled white
SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
sal_uLong nCount = rMarkList.GetMarkCount();
@@ -262,8 +259,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if( bUndo )
{
- // Vorlage hat keine Fuellung,
- // daher hart attributieren: Fuellung setzen
+ // template has no filling, so force
+ // filling (hard) attribute
if (!bMergeUndo)
{
bMergeUndo = sal_True;
@@ -327,7 +324,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_HYPHENATION:
{
// const SfxPoolItem* pItem = rReq.GetArg( SID_HYPHENATION );
- // ^-- Soll so nicht benutzt werden (Defaults sind falsch) !
+ // ^-- should not be used (defaults are wrong) !
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_HYPHENATION, sal_False);
if( pItem )
@@ -337,9 +334,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
}
- else // nur zum Test
+ else // only for testing purpose
{
- OSL_FAIL(" Kein Wert fuer Silbentrennung!");
+ OSL_FAIL(" no value for hyphenation!");
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
sal_Bool bValue = sal_True;
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
@@ -494,7 +491,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
- case SID_PAGESIZE : // entweder dieses (kein menueeintrag o. ae. !!)
+ case SID_PAGESIZE : // either this (no menu entries or something else!)
{
const SfxItemSet *pArgs = rReq.GetArgs ();
@@ -518,7 +515,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
break;
}
- case SID_PAGEMARGIN : // oder dieses (kein menueeintrag o. ae. !!)
+ case SID_PAGEMARGIN : // or this (no menu entries or something else!)
{
const SfxItemSet *pArgs = rReq.GetArgs ();
@@ -570,7 +567,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
rReq.Done ();
break;
}
- case SID_ZOOMING : // kein Menueintrag, sondern aus dem Zoomdialog generiert
+ case SID_ZOOMING : // no menu entry, but generated from zoom dialog
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -639,7 +636,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- // hier den Zoom-Dialog oeffnen
+ // open zoom dialog
SetCurrentFunction( FuScale::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
}
Cancel();
@@ -685,7 +682,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
Cancel();
if( HasCurrentFunction(SID_BEZIER_EDIT) )
- { // ggf. die richtige Editfunktion aktivieren
+ { // where applicable, activate right edit action
GetViewFrame()->GetDispatcher()->Execute(SID_SWITCH_POINTEDIT,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
}
@@ -843,10 +840,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
sal_uLong nCount = rMarkList.GetMarkCount();
- // In diese Liste werden fuer jedes Praesentationsobjekt ein SfxItemSet
- // der harten Attribute sowie der UserCall eingetragen, da diese beim nachfolgenden
- // mpDrawView->SetAttributes( *pSet, sal_True ) verloren gehen und spaeter restauriert
- // werden muessen
+ // For every presentation object a SfxItemSet of hard attributes
+ // and the UserCall is stored in this list. This is because
+ // at the following mpDrawView->SetAttributes( *pSet, sal_True )
+ // they get lost and have to be restored.
std::vector<std::pair<SfxItemSet*,SdrObjUserCall*> > aAttrList;
SdPage* pPresPage = (SdPage*) mpDrawView->GetSdrPageView()->GetPage();
sal_uLong i;
@@ -884,13 +881,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
pSheet = mpActualPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
- DBG_ASSERT(pSheet, "Vorlage fuer Gliederungsobjekt nicht gefunden");
+ DBG_ASSERT(pSheet, "Template for outline object not found");
if (pSheet)
{
pObj->StartListening(*pSheet);
if( nLevel == 1 )
- // Textrahmen hoert auf StyleSheet der Ebene1
+ // text frame listens on StyleSheet of level1
pObj->NbcSetStyleSheet(pSheet, sal_False);
}
@@ -1041,9 +1038,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
default:
{
- // switch Anweisung wegen CLOOKS aufgeteilt. Alle case-Anweisungen die
- // eine Fu???? -Funktion aufrufen, sind in die Methode FuTemp01 (drviews8)
- // gewandert.
+ // Switch statement splitted because of CLOOKS. All case-statements
+ // which call a Fu???? - function, are gone into FuTemp01 (drviews8)
FuTemp01(rReq);
}
break;
More information about the Libreoffice-commits
mailing list