Kaydet (Commit) 43a36b36 authored tarafından Robert Roth's avatar Robert Roth Kaydeden (comit) Michael Meeks

Commented out code, bogus comments removed, some german comments translated.

üst 448bea16
......@@ -67,12 +67,8 @@ class Window;
#define ACC_STATE_OPAQUE 0x02
// pseudo states for events
// --> OD 2009-01-07 #i88069# - pseudo state for event TEXT_ATTRIBUTE_CHANGED
#define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200
// <--
// --> OD 2005-12-12 #i27301# - pseudo state for event TEXT_SELECTION_CHANGED
#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100
// <--
#define ACC_STATE_CARET 0x80
#define ACC_STATE_RELATION_FROM 0x40
#define ACC_STATE_RELATION_TO 0x20
......@@ -81,9 +77,7 @@ class Window;
#define ACC_STATE_MASK 0x1F
// --> OD 2005-12-12 #i27301# - introduce type definition of states
typedef sal_uInt16 tAccessibleStates;
// <--
class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
public accessibility::IAccessibleParent
......@@ -95,10 +89,9 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
SwShapeList_Impl *mpShapes;
SwAccessibleEventList_Impl *mpEvents;
SwAccessibleEventMap_Impl *mpEventMap;
// --> OD 2005-12-13 #i27301# - data structure to keep information about
// #i27301 data structure to keep information about
// accessible paragraph, which have a selection.
SwAccessibleSelectedParas_Impl* mpSelectedParas;
// <--
ViewShell *mpVSh;
/// for page preview: store preview data, VisArea, and mapping of
/// preview-to-display coordinates
......@@ -133,7 +126,6 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
/** method to build up a new data structure of the accessible pararaphs,
which have a selection
OD 2005-12-13 #i27301#
Important note: method has to used inside a mutual exclusive section
@author OD
......@@ -148,8 +140,6 @@ public:
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> GetDocumentView();
// OD 15.01.2003 #103492# - complete re-factoring of method due to new
// page/print preview functionality.
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> GetDocumentPreview(
const std::vector<PrevwPage*>& _rPrevwPages,
......@@ -184,10 +174,6 @@ public:
/** get size of a dedicated preview page
OD 15.01.2003 #103492#
complete re-factoring of previous method due to new page/print preview
functionality.
@author OD
@param _nPrevwPageNum
......@@ -213,9 +199,7 @@ public:
void InvalidateContent( const SwFrm *pFrm );
// --> OD 2009-01-06 #i88069#
void InvalidateAttr( const SwTxtFrm& rTxtFrm );
// <--
void InvalidateCursorPosition( const SwFrm *pFrm );
void InvalidateFocus();
......@@ -225,7 +209,6 @@ public:
// Invalidate state of whole tree. If an action is open, this call
// is processed when the last action ends.
// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
void InvalidateStates( tAccessibleStates _nStates,
const SwFrm* _pFrm = 0 );
......@@ -233,8 +216,6 @@ public:
/** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
OD 2005-12-01 #i27138#
@author OD
@param _rTxtFrm
......@@ -250,16 +231,12 @@ public:
/** invalidation of text selection of a paragraph
OD 2005-12-12 #i27301#
@author OD
*/
void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm );
/** invalidation of text selection of all paragraphs
OD 2005-12-13 #i27301#
@author OD
*/
void InvalidateTextSelectionOfAllParas();
......@@ -268,8 +245,6 @@ public:
Window& rChild ) const;
// update preview data (and fire events if necessary)
// OD 15.01.2003 #103492# - complete re-factoring of method due to new
// page/print preview functionality.
void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,
......@@ -306,7 +281,6 @@ public:
private:
/** get mapping mode for LogicToPixel and PixelToLogic conversions
OD 15.01.2003 #103492#
Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
Method returns mapping mode of current output device and adjusts it,
if the shell is in page/print preview.
......
......@@ -33,8 +33,6 @@
/** class for the positioning of drawing objects
OD 2004-03-25 #i26791#
@author OD
*/
class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
......@@ -45,7 +43,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
bool mbValidPos;
// rectangle, keeping the last object rectangle after the postioning
// --> OD 2004-09-29 #i34748# - change <maLastObjRect> to a pointer
Rectangle* mpLastObjRect;
// boolean, indicating that anchored drawing object hasn't been attached
......@@ -53,23 +50,21 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
// boolean changes its state.
bool mbNotYetAttachedToAnchorFrame;
// --> OD 2004-08-09 #i28749# - boolean, indicating that anchored
// boolean, indicating that anchored
// drawing object hasn't been positioned yet. Once, it's positioned the
// boolean changes its state.
bool mbNotYetPositioned;
// --> OD 2006-03-17 #i62875#
// boolean, indicating that after change of layout direction the
// anchored drawing object has to be captured on the page, if it exceeds
// the left or right page margin.
// Needed for compatibility option <DoNotCaptureDrawObjsOnPage>
bool mbCaptureAfterLayoutDirChange;
// <--
/** method for the intrinsic positioning of a at-paragraph|at-character
anchored drawing object
OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
helper method for method <MakeObjPos>
@author OD
*/
......@@ -78,7 +73,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method for the intrinsic positioning of a at-page|at-frame anchored
drawing object
OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
helper method for method <MakeObjPos>
@author OD
*/
......@@ -86,7 +81,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to set positioning attributes (not for as-character anchored)
OD 2004-10-20 #i35798#
During load the positioning attributes aren't set.
Thus, the positioning attributes are set by the current object geometry.
This method is also used for the conversion for drawing objects
......@@ -115,8 +109,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to invalidate the given page frame
OD 2004-07-02 #i28701#
@author OD
*/
void _InvalidatePage( SwPageFrm* _pPageFrm );
......@@ -127,20 +119,15 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to assure that anchored object is registered at the correct
page frame
OD 2004-07-02 #i28701#
@author OD
*/
virtual void RegisterAtCorrectPage();
// --> OD 2006-08-10 #i68520#
virtual bool _SetObjTop( const SwTwips _nTop);
virtual bool _SetObjLeft( const SwTwips _nLeft);
// <--
// --> OD 2006-10-05 #i70122#
virtual const SwRect GetObjBoundRect() const;
// <--
public:
TYPEINFO();
......@@ -161,23 +148,18 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
// accessors to the object area and its position
virtual const SwRect GetObjRect() const;
// --> OD 2004-09-29 #i34748# - change return type to a pointer.
// Return value can be NULL.
const Rectangle* GetLastObjRect() const;
// <--
// --> OD 2004-09-29 #i34748# - change method
void SetLastObjRect( const Rectangle& _rNewObjRect );
// <--
/** adjust positioning and alignment attributes for new anchor frame
OD 2004-04-21
Set horizontal and vertical position/alignment to manual position
relative to anchor frame area using the anchor position of the
new anchor frame and the current absolute drawing object position.
Note: For correct Undo/Redo method should only be called inside a
Undo-/Redo-action.
OD 2004-08-24 #i33313# - add second optional parameter <_pNewObjRect>
@author OD
......@@ -193,29 +175,21 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to notify background of drawing object
OD 2004-06-30 #i28701#
@author OD
*/
virtual void NotifyBackground( SwPageFrm* _pPageFrm,
const SwRect& _rRect,
PrepareHint _eHint );
// --> OD 2005-08-16 #i53320#
inline bool NotYetPositioned() const
{
return mbNotYetPositioned;
}
// <--
// --> OD 2006-03-17 #i62875#
// change of layout direction needs to be tracked
// for setting <mbCaptureAfterLayoutDirChange>.
virtual void UpdateLayoutDir();
// <--
// --> OD 2006-03-17 #i62875#
bool IsOutsidePage() const;
// <--
// new Loop control
void ValidateThis() { mbValidPos = true; }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -65,9 +65,6 @@ class SwChartDataProvider;
class SwFrmFmt;
/* -----------------------------22.09.00 11:10--------------------------------
---------------------------------------------------------------------------*/
class SwChartEventListenerContainer : public SwEventListenerContainer
{
public:
......@@ -75,9 +72,7 @@ class SwChartEventListenerContainer : public SwEventListenerContainer
SwEventListenerContainer(pxParentL){}
void ChartDataChanged();
};
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
typedef
cppu::WeakImplHelper4
<
......@@ -179,9 +174,7 @@ public:
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
/* -----------------27.06.98 15:40-------------------
*
* --------------------------------------------------*/
class SwXTextTableRow : public cppu::WeakImplHelper2
<
::com::sun::star::beans::XPropertySet,
......@@ -221,9 +214,7 @@ public:
const SwTableLine* GetTblRow() const {return pLine;}
static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
};
/* -----------------20.07.98 13:03-------------------
*
* --------------------------------------------------*/
typedef cppu::WeakImplHelper3<
::com::sun::star::text::XTextTableCursor,
::com::sun::star::lang::XServiceInfo,
......@@ -236,8 +227,6 @@ class SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base
SwDepend aCrsrDepend;
const SfxItemPropertySet* m_pPropSet;
// SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
protected:
virtual ~SwXTextTableCursor();
public:
......@@ -288,9 +277,6 @@ public:
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
/*-----------------11.12.97 09:38-------------------
--------------------------------------------------*/
struct SwRangeDescriptor
{
sal_Int32 nTop;
......@@ -424,9 +410,6 @@ public:
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
/* -----------------27.04.98 16:41-------------------
*
* --------------------------------------------------*/
class SwXCellRange : public cppu::WeakImplHelper7
<
::com::sun::star::table::XCellRange,
......@@ -520,9 +503,7 @@ public:
sal_Bool bForceNumberResults = sal_False ) throw (::com::sun::star::uno::RuntimeException);
};
/* -----------------03.02.99 07:31-------------------
*
* --------------------------------------------------*/
class SwXTableRows : public cppu::WeakImplHelper2
<
::com::sun::star::table::XTableRows,
......@@ -540,14 +521,6 @@ public:
TYPEINFO();
// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
// SMART_UNO_DECLARATION( SwXTableRows, UsrObject );
//XIndexAccess
virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
......@@ -569,9 +542,6 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
/* -----------------03.02.99 07:31-------------------
*
* --------------------------------------------------*/
class SwXTableColumns : public cppu::WeakImplHelper2
<
::com::sun::star::table::XTableColumns,
......@@ -588,13 +558,6 @@ public:
TYPEINFO();
// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
// SMART_UNO_DECLARATION( SwXTableColumns, UsrObject );
//XIndexAccess
virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
......
......@@ -55,10 +55,8 @@ class IDocumentContentOperations;
class IDocumentStylePoolAccess;
class IDocumentStatistics;
class IDocumentUndoRedo;
// --> OD 2007-11-14 #i83479#
class IDocumentListItems;
class IDocumentOutlineNodes;
// <--
class SfxPrinter;
class SfxProgress;
class SwRootFrm;
......@@ -94,7 +92,6 @@ namespace vcl
}
//JP 19.07.98: - Bug 52312
// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
// benoetigt werden.
// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
......@@ -110,17 +107,15 @@ class SW_DLLPUBLIC ViewShell : public Ring
friend class SwViewImp;
friend class SwLayIdle;
// OD 12.12.2002 #103492# - for setting visible area for page preview paint
// for setting visible area for page preview paint
friend class SwPagePreviewLayout;
//Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
//werden kann.
friend void SetSwVisArea( ViewShell *pSh, const SwRect &, BOOL bPDFExport = FALSE );
// --> PB 2007-05-30 #146850#
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
static BitmapEx* pErrorBmp; // error display of missed images
// <--
static sal_Bool bLstAct; // sal_True wenn Das EndAction der letzten Shell
// laeuft; also die EndActions der
......@@ -164,10 +159,9 @@ class SW_DLLPUBLIC ViewShell : public Ring
//Device (etwa beim Browsen)
// OD 2004-06-01 #i26791# - boolean, indicating that class in in constructor
// boolean, indicating that class in in constructor
bool mbInConstructor:1;
// #i74769#
SdrPaintWindow* mpTargetPaintWindow;
OutputDevice* mpBufferedOut;
......@@ -338,7 +332,6 @@ public:
*/
IDocumentUndoRedo* getIDocumentUndoRedoAccess();
// --> OD 2007-11-14 #i83479#
const IDocumentListItems* getIDocumentListItemsAccess() const;
const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
// <--
......@@ -402,26 +395,22 @@ public:
// formatting by virtual device or printer
void SetUseVirDev( bool nNew );
// OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
// adding paragraph and table spacing at bottom
// of table cells
void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
// OD 06.01.2004 #i11859# - former formatting of text lines with
// former formatting of text lines with
// proportional line spacing or not
void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
// OD 2004-03-12 #i11860# - former object positioning
// former object positioning
void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
// OD 2004-05-05 #i28701#
void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
// --> FME #108724#
void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
// -> PB 2007-06-11 #i45491#
void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
// <--
//
// DOCUMENT COMPATIBILITY FLAGS END
......@@ -454,12 +443,10 @@ public:
// Selektion der Draw ::com::sun::star::script::Engine geaendert
virtual void DrawSelChanged();
// OD 12.12.2002 #103492#
SwPagePreviewLayout* PagePreviewLayout();
/** adjust view options for page preview
OD 09.01.2003 #i6467#
Because page preview should show the document as it is printed -
page preview is print preview -, the view options are adjusted to the
same as for printing.
......@@ -512,8 +499,6 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
// OD 15.01.2003 #103492# - change method signature due to new page preview
// functionality.
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible >
CreateAccessiblePreview();
......@@ -526,8 +511,6 @@ public:
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
OD 2005-12-01 #i27138#
@author OD
@param _pFromTxtFrm
......@@ -545,16 +528,13 @@ public:
/** invalidate text selection for paragraphs
OD 2005-12-12 #i27301#
@author OD
*/
void InvalidateAccessibleParaTextSelection();
/** invalidate attributes for paragraphs and paragraph's characters
OD 2009-01-06 #i88069#
OD 2010-02-16 #i104008# - usage also for changes of the attributes of
usage also for changes of the attributes of
paragraph's characters.
@author OD
......@@ -573,16 +553,12 @@ public:
long nFlags = 0 );
virtual ~ViewShell();
// --> FME 2004-06-15 #i12836# enhanced pdf export
sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
// <--
inline bool IsInConstructor() const { return mbInConstructor; }
// --> PB 2007-05-30 #146850#
static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
static void DeleteReplacementBitmaps();
// <--
const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
SwPostItMgr* GetPostItMgr();
......
......@@ -79,7 +79,6 @@ public:
// ------ Ab hier Klassen / Methoden fuer die Selectionen -------
// #i75172# predefines
namespace sdr { namespace overlay { class OverlayObject; }}
class SwSelPaintRects : public SwRects
......@@ -90,16 +89,14 @@ class SwSelPaintRects : public SwRects
static long nPixPtX, nPixPtY;
static MapMode *pMapMode;
// die Shell
const SwCrsrShell* pCShell;
virtual void Paint( const Rectangle& rRect );
virtual void FillRects() = 0;
// #i75172#
sdr::overlay::OverlayObject* mpCursorOverlay;
// #i75172# access to mpCursorOverlay for swapContent
// access to mpCursorOverlay for swapContent
sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
......@@ -107,7 +104,7 @@ public:
SwSelPaintRects( const SwCrsrShell& rCSh );
virtual ~SwSelPaintRects();
// #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// make a complete swap access to mpCursorOverlay is needed there
void swapContent(SwSelPaintRects& rSwap);
......@@ -166,7 +163,7 @@ public:
virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
virtual BOOL IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
......@@ -210,7 +207,7 @@ public:
virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
virtual BOOL IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
......
......@@ -101,34 +101,10 @@
using namespace sw::sidebarwindows;
/*
bool comp_author( const SwPostItItem* a, const SwPostItItem* b)
{
return a->pFmtFld->GetFld()->GetPar1() < b->pFmtFld->GetFld()->GetPar1();
}
bool comp_date( const SwPostItItem* a, const SwPostItItem* b)
{
return static_cast<SwPostItField*>(a->pFmtFld->GetFld())->GetDate() < static_cast<SwPostItField*>(b->pFmtFld->GetFld())->GetDate();
}
*/
//
bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b)
{
// --> OD 2010-01-19 #i88070#
// sort by anchor position
//// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position
//// if two notes are at the same position, sort by logical node position
// return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom())
// ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) &&
// (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) )
// ? *(static_cast<SwFmtFld*>(a->GetBroadCaster())->GetTxtFld()->GetStart()) <
// *(static_cast<SwFmtFld*>(b->GetBroadCaster())->GetTxtFld()->GetStart())
// : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() )
// : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom();
return a->GetAnchorPosition() < b->GetAnchorPosition();
// <--
}
SwPostItMgr::SwPostItMgr(SwView* pView)
......@@ -235,12 +211,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b
mbLayout = bFocus;
if (pItem->ISA(SwFmtFld))
mvPostItFlds.push_back(new SwAnnotationItem(static_cast<SwFmtFld*>(pItem), true, bFocus) );
/*
else
if (pItem->ISA(SwRedline))
mvPostItFlds.push_back(new SwRedCommentItem( static_cast<SwRedline*>(pItem), true, bFocus)) ;
*/
OSL_ENSURE(pItem->ISA(SwFmtFld) /*|| pItem->ISA(SwRedline)*/,"Mgr::InsertItem: seems like new stuff was added");
OSL_ENSURE(pItem->ISA(SwFmtFld),"Mgr::InsertItem: seems like new stuff was added");
StartListening(*pItem);
}
......@@ -323,35 +294,6 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
}
/*
else if ( rHint.IsA(TYPE(SwRedlineHint) ) )
{
const SwRedlineHint rRedlineHint = static_cast<const SwRedlineHint&>(rHint);
SwRedline* pRedline = const_cast<SwRedline*>(rRedlineHint.GetRedline());
switch ( rRedlineHint.Which() )
{
case SWREDLINE_INSERTED :
{
bool bEmpty = !HasNotes();
InsertItem( pRedline, true, false );
if (bEmpty && !mvPostItFlds.empty())
PrepareView(true);
break;
}
case SWREDLINE_REMOVED:
{
RemoveItem(pRedline);
break;
}
case SWREDLINE_FOCUS:
{
if (rRedlineHint.GetView()== mpView)
Focus(rBC);
break;
}
}
}
*/
else if ( rHint.IsA(TYPE(SwFmtFldHint) ) )
{
const SwFmtFldHint& rFmtHint = static_cast<const SwFmtFldHint&>(rHint);
......@@ -1113,7 +1055,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
//(*i) is the last visible item
SwSidebarWin_iterator aPrevPostIt = i;
--aPrevPostIt;
//lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() + GetSpaceBetween() ) - (*i)->VirtualPos().Y();
lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() ) - (*i)->VirtualPos().Y();
if (lTranslatePos > 0)
{
......@@ -1168,22 +1109,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
return bScrollbars;
}
/*
void SwPostItMgr::AddRedlineComments(bool bCheckExistance, bool bFocus)
{
bool bEmpty = mvPostItFlds.empty();
const SwRedlineTbl& aTable = mpView->GetDocShell()->GetDoc()->GetRedlineTbl();
for( USHORT i = 0; i < aTable.Count(); ++i )
{
SwRedline* pRedline = const_cast<SwRedline*>((aTable)[i]);
if ( pRedline->GetComment() != String(rtl::OUString::createFromAscii("")) )
InsertItem(pRedline, bCheckExistance, bFocus);
}
if (bEmpty && !mvPostItFlds.empty())
PrepareView(true);
}
*/
void SwPostItMgr::AddPostIts(bool bCheckExistance, bool bFocus)
{
bool bEmpty = mvPostItFlds.empty();
......@@ -1281,23 +1206,6 @@ void SwPostItMgr::Delete()
mpWrtShell->DelRight();
}
/*
for(std::list<SwPostItItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
SwPostItItem* pItem = (*i);
// stop listening, we delete ourselves
EndListening( *(pItem->pFmtFld) );
// delete the actual SwPostItField
mpWrtShell->GotoField(*pItem->pFmtFld);
mpWrtShell->DelRight();
// delete visual representation
delete pItem->pPostIt;
// delete struct saving the pointers
delete pItem;
}
mvPostItFlds.clear();
*/
mpWrtShell->EndUndo( UNDO_DELETE );
PrepareView();
mpWrtShell->EndAllAction();
......@@ -1347,14 +1255,6 @@ void SwPostItMgr::Sort(const short aType)
case SORT_POS:
mvPostItFlds.sort(comp_pos);
break;
/*
case SORT_AUTHOR:
mvPostItFlds.sort(comp_author);
break;
case SORT_DATE:
mvPostItFlds.sort(comp_date);
break;
*/
}
}
}
......@@ -1506,7 +1406,6 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount)
if (!HasNotes() || bIgnoreCount)
{
mpWrtShell->StartAllAction();
//mpEditWin->Invalidate(); // really not needed anymore??
SwRootFrm* pLayout = mpWrtShell->GetLayout();
if ( pLayout )
SwPostItHelper::setSidebarChanged( pLayout,
......@@ -1627,14 +1526,13 @@ void SwPostItMgr::CorrectPositions()
return;
// yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it
// --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists.
// check, if anchor overlay object exists.
const long aAnchorX = pFirstPostIt->Anchor()
? mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X()
: 0;
const long aAnchorY = pFirstPostIt->Anchor()
? mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1
: 0;
// <--
if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel())
{
long aAnchorPosX = 0;
......@@ -1643,9 +1541,8 @@ void SwPostItMgr::CorrectPositions()
{
for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
{
// --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists.
// check, if anchor overlay object exists.
if ( (*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Anchor() )
// <--
{
aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X()
......@@ -1887,7 +1784,6 @@ sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::st
void SwPostItMgr::AssureStdModeAtShell()
{
//#i103373# #i103645#
// deselect any drawing or frame and leave editing mode
SdrView* pSdrView = mpWrtShell->GetDrawView();
if ( pSdrView && pSdrView->IsTextEdit() )
......
This diff is collapsed.
This diff is collapsed.
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