Kaydet (Commit) d62b71bd authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Prevw -> Preview.

Change-Id: I93cd8e27d5f16fe62a1434e3667fc7cc06c62e08
üst dfa1afd0
...@@ -49,7 +49,7 @@ class SwAccessibleSelectedParas_Impl; ...@@ -49,7 +49,7 @@ class SwAccessibleSelectedParas_Impl;
class SwRect; class SwRect;
class MapMode; class MapMode;
class SwAccPreviewData; class SwAccPreviewData;
struct PrevwPage; struct PreviewPage;
class Window; class Window;
// real states for events // real states for events
...@@ -132,10 +132,10 @@ public: ...@@ -132,10 +132,10 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> GetDocumentPreview( ::com::sun::star::accessibility::XAccessible> GetDocumentPreview(
const std::vector<PrevwPage*>& _rPrevwPages, const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ); const Size& _rPreviewWinSize );
::rtl::Reference < SwAccessibleContext > GetContextImpl( ::rtl::Reference < SwAccessibleContext > GetContextImpl(
const SwFrm *pFrm, const SwFrm *pFrm,
...@@ -166,12 +166,12 @@ public: ...@@ -166,12 +166,12 @@ public:
@author OD @author OD
@param _nPrevwPageNum @param _nPreviewPageNum
input parameter - physical page number of page visible in the page preview input parameter - physical page number of page visible in the page preview
@return an object of class <Size> @return an object of class <Size>
*/ */
Size GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const; Size GetPreViewPageSize( sal_uInt16 _nPreviewPageNum ) const;
void RemoveContext( const SwFrm *pFrm ); void RemoveContext( const SwFrm *pFrm );
void RemoveContext( const SdrObject *pObj ); void RemoveContext( const SdrObject *pObj );
...@@ -235,10 +235,10 @@ public: ...@@ -235,10 +235,10 @@ public:
Window& rChild ) const; Window& rChild ) const;
// update preview data (and fire events if necessary) // update preview data (and fire events if necessary)
void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages, void UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ); const Size& _rPreviewWinSize );
void InvalidatePreViewSelection( sal_uInt16 nSelPage ); void InvalidatePreViewSelection( sal_uInt16 nSelPage );
bool IsPageSelected( const SwPageFrm *pPageFrm ) const; bool IsPageSelected( const SwPageFrm *pPageFrm ) const;
......
...@@ -33,7 +33,7 @@ class ViewShell; ...@@ -33,7 +33,7 @@ class ViewShell;
class SwRootFrm; class SwRootFrm;
class SwPageFrm; class SwPageFrm;
class Fraction; class Fraction;
struct PrevwPage; struct PreviewPage;
// ============================================================================= // =============================================================================
/** page preview functionality in the writer /** page preview functionality in the writer
...@@ -79,8 +79,8 @@ private: ...@@ -79,8 +79,8 @@ private:
Rectangle maPreviewDocRect; Rectangle maPreviewDocRect;
SwTwips mnColWidth; SwTwips mnColWidth;
SwTwips mnRowHeight; SwTwips mnRowHeight;
SwTwips mnPrevwLayoutWidth; SwTwips mnPreviewLayoutWidth;
SwTwips mnPrevwLayoutHeight; SwTwips mnPreviewLayoutHeight;
bool mbDoesLayoutColsFitIntoWindow; bool mbDoesLayoutColsFitIntoWindow;
bool mbDoesLayoutRowsFitIntoWindow; bool mbDoesLayoutRowsFitIntoWindow;
...@@ -91,10 +91,10 @@ private: ...@@ -91,10 +91,10 @@ private:
Point maPaintStartPageOffset; Point maPaintStartPageOffset;
Point maPaintPreviewDocOffset; Point maPaintPreviewDocOffset;
Point maAdditionalPaintOffset; Point maAdditionalPaintOffset;
Rectangle maPaintedPrevwDocRect; Rectangle maPaintedPreviewDocRect;
sal_uInt16 mnSelectedPageNum; sal_uInt16 mnSelectedPageNum;
std::vector<PrevwPage*> maPrevwPages; std::vector<PreviewPage*> maPreviewPages;
/** #i22014# - internal booleans to indicate, that a new print /** #i22014# - internal booleans to indicate, that a new print
preview layout has been created during a paint. */ preview layout has been created during a paint. */
...@@ -113,19 +113,19 @@ private: ...@@ -113,19 +113,19 @@ private:
@author OD @author OD
*/ */
void _ClearPrevwLayoutSizes(); void _ClearPreviewLayoutSizes();
/** helper method to clear data in preview page vectors /** helper method to clear data in preview page vectors
@author OD @author OD
*/ */
void _ClearPrevwPageData(); void _ClearPreviewPageData();
/** calculate page preview layout sizes /** calculate page preview layout sizes
@author OD @author OD
*/ */
void _CalcPrevwLayoutSizes(); void _CalcPreviewLayoutSizes();
/** apply new zoom at given view shell /** apply new zoom at given view shell
...@@ -164,7 +164,7 @@ private: ...@@ -164,7 +164,7 @@ private:
@author OD @author OD
*/ */
void _CalcDocPrevwPaintRect(); void _CalcDocPreviewPaintRect();
/** determines preview data for a given page and a given preview offset /** determines preview data for a given page and a given preview offset
...@@ -175,19 +175,19 @@ private: ...@@ -175,19 +175,19 @@ private:
input parameter - constant reference to page frame, for which the input parameter - constant reference to page frame, for which the
preview data will be calculated. preview data will be calculated.
@param _rPrevwOffset @param _rPreviewOffset
input parameter - constant reference to the offset the given page has input parameter - constant reference to the offset the given page has
in the current preview window. in the current preview window.
Note: Offset can be negative. Note: Offset can be negative.
@param _opPrevwPage @param _opPreviewPage
output parameter - calculated preview data. output parameter - calculated preview data.
@return boolean, indicating, if calculation was successful. @return boolean, indicating, if calculation was successful.
*/ */
bool _CalcPreviewDataForPage( const SwPageFrm& _rPage, bool _CalcPreviewDataForPage( const SwPageFrm& _rPage,
const Point& _rPrevwOffset, const Point& _rPreviewOffset,
PrevwPage* _opPrevwPage ); PreviewPage* _opPreviewPage );
/** calculate preview pages /** calculate preview pages
...@@ -211,13 +211,13 @@ private: ...@@ -211,13 +211,13 @@ private:
@return pointer to preview page of current preview pages. If page doesn't @return pointer to preview page of current preview pages. If page doesn't
belongs to current preview pages, <0> is returned. belongs to current preview pages, <0> is returned.
*/ */
const PrevwPage* _GetPrevwPageByPageNum( const sal_uInt16 _nPageNum ) const; const PreviewPage* _GetPreviewPageByPageNum( const sal_uInt16 _nPageNum ) const;
/** paint selection mark at page /** paint selection mark at page
@author OD @author OD
*/ */
void _PaintSelectMarkAtPage( const PrevwPage* _aSelectedPrevwPage ) const; void _PaintSelectMarkAtPage( const PreviewPage* _aSelectedPreviewPage ) const;
public: public:
/** constructor of <SwPagePreviewLayout> /** constructor of <SwPagePreviewLayout>
...@@ -246,7 +246,7 @@ public: ...@@ -246,7 +246,7 @@ public:
*/ */
inline ~SwPagePreviewLayout() inline ~SwPagePreviewLayout()
{ {
_ClearPrevwPageData(); _ClearPreviewPageData();
} }
/** init page preview layout /** init page preview layout
...@@ -448,7 +448,7 @@ public: ...@@ -448,7 +448,7 @@ public:
@author OD @author OD
@param _aPrevwPos @param _aPreviewPos
input parameter - position inside the visible preview window. input parameter - position inside the visible preview window.
@param _orDocPos @param _orDocPos
...@@ -468,7 +468,7 @@ public: ...@@ -468,7 +468,7 @@ public:
@return boolean - indicating, that given preview position lays inside @return boolean - indicating, that given preview position lays inside
a shown document preview page, not an empty page. a shown document preview page, not an empty page.
*/ */
bool IsPrevwPosInDocPrevwPage( const Point _aPrevwPos, bool IsPreviewPosInDocPreviewPage( const Point _aPreviewPos,
Point& _orDocPos, Point& _orDocPos,
bool& _obPosInEmptyPage, bool& _obPosInEmptyPage,
sal_uInt16& _onPageNum ) const; sal_uInt16& _onPageNum ) const;
...@@ -525,7 +525,7 @@ public: ...@@ -525,7 +525,7 @@ public:
*/ */
sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const; sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const;
Size GetPrevwDocSize() const; Size GetPreviewDocSize() const;
/** get size of a preview page by its physical page number /** get size of a preview page by its physical page number
...@@ -537,7 +537,7 @@ public: ...@@ -537,7 +537,7 @@ public:
@return an object of class <Size> @return an object of class <Size>
*/ */
Size GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const; Size GetPreviewPageSizeByPageNum( sal_uInt16 _nPageNum ) const;
/** get virtual page number by its physical page number /** get virtual page number by its physical page number
...@@ -576,7 +576,7 @@ public: ...@@ -576,7 +576,7 @@ public:
@author FME @author FME
*/ */
sal_uInt16 GetNumberOfPreviewPages() { return sal::static_int_cast< sal_uInt16 >(maPrevwPages.size()); } sal_uInt16 GetNumberOfPreviewPages() { return sal::static_int_cast< sal_uInt16 >(maPreviewPages.size()); }
}; };
#endif // _PAGEPREVIEWLAYOUT_HXX #endif // _PAGEPREVIEWLAYOUT_HXX
......
...@@ -549,27 +549,27 @@ class SwAccPreviewData ...@@ -549,27 +549,27 @@ class SwAccPreviewData
input/output parameter - reference to the logic page rectangle, which input/output parameter - reference to the logic page rectangle, which
has to be adjusted. has to be adjusted.
@param _rPrevwPgSwRect @param _rPreviewPgSwRect
input parameter - constant reference to the corresponding preview page input parameter - constant reference to the corresponding preview page
rectangle; needed to determine the visible part of the logic page rectangle. rectangle; needed to determine the visible part of the logic page rectangle.
@param _rPrevwWinSize @param _rPreviewWinSize
input paramter - constant reference to the preview window size in TWIP; input paramter - constant reference to the preview window size in TWIP;
needed to determine the visible part of the logic page rectangle needed to determine the visible part of the logic page rectangle
*/ */
void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect, void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect,
const SwRect& _rPrevwPgSwRect, const SwRect& _rPreviewPgSwRect,
const Size& _rPrevwWinSize ); const Size& _rPreviewWinSize );
public: public:
SwAccPreviewData(); SwAccPreviewData();
~SwAccPreviewData(); ~SwAccPreviewData();
void Update( const SwAccessibleMap& rAccMap, void Update( const SwAccessibleMap& rAccMap,
const std::vector<PrevwPage*>& _rPrevwPages, const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ); const Size& _rPreviewWinSize );
void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ); void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm );
...@@ -599,10 +599,10 @@ SwAccPreviewData::~SwAccPreviewData() ...@@ -599,10 +599,10 @@ SwAccPreviewData::~SwAccPreviewData()
} }
void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap,
const std::vector<PrevwPage*>& _rPrevwPages, const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ) const Size& _rPreviewWinSize )
{ {
// store preview scaling, maximal preview page size and selected page // store preview scaling, maximal preview page size and selected page
maScale = _rScale; maScale = _rScale;
...@@ -616,15 +616,15 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, ...@@ -616,15 +616,15 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap,
// loop on preview pages to calculate <maPreviewRects>, <maLogicRects> and // loop on preview pages to calculate <maPreviewRects>, <maLogicRects> and
// <maVisArea> // <maVisArea>
for ( std::vector<PrevwPage*>::const_iterator aPageIter = _rPrevwPages.begin(); for ( std::vector<PreviewPage*>::const_iterator aPageIter = _rPreviewPages.begin();
aPageIter != _rPrevwPages.end(); aPageIter != _rPreviewPages.end();
++aPageIter ) ++aPageIter )
{ {
aPage = (*aPageIter)->pPage; aPage = (*aPageIter)->pPage;
// add preview page rectangle to <maPreviewRects> // add preview page rectangle to <maPreviewRects>
Rectangle aPrevwPgRect( (*aPageIter)->aPrevwWinPos, (*aPageIter)->aPageSize ); Rectangle aPreviewPgRect( (*aPageIter)->aPreviewWinPos, (*aPageIter)->aPageSize );
maPreviewRects.push_back( aPrevwPgRect ); maPreviewRects.push_back( aPreviewPgRect );
// add logic page rectangle to <maLogicRects> // add logic page rectangle to <maLogicRects>
SwRect aLogicPgSwRect( aPage.GetBox( rAccMap ) ); SwRect aLogicPgSwRect( aPage.GetBox( rAccMap ) );
...@@ -636,8 +636,8 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, ...@@ -636,8 +636,8 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap,
if ( !(*aPageIter)->pPage->IsEmptyPage() ) if ( !(*aPageIter)->pPage->IsEmptyPage() )
{ {
AdjustLogicPgRectToVisibleArea( aLogicPgSwRect, AdjustLogicPgRectToVisibleArea( aLogicPgSwRect,
SwRect( aPrevwPgRect ), SwRect( aPreviewPgRect ),
_rPrevwWinSize ); _rPreviewWinSize );
} }
if ( maVisArea.IsEmpty() ) if ( maVisArea.IsEmpty() )
maVisArea = aLogicPgSwRect; maVisArea = aLogicPgSwRect;
...@@ -700,30 +700,30 @@ void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm ) ...@@ -700,30 +700,30 @@ void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm )
// adjust logic page retangle to its visible part // adjust logic page retangle to its visible part
void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( void SwAccPreviewData::AdjustLogicPgRectToVisibleArea(
SwRect& _iorLogicPgSwRect, SwRect& _iorLogicPgSwRect,
const SwRect& _rPrevwPgSwRect, const SwRect& _rPreviewPgSwRect,
const Size& _rPrevwWinSize ) const Size& _rPreviewWinSize )
{ {
// determine preview window rectangle // determine preview window rectangle
const SwRect aPrevwWinSwRect( Point( 0, 0 ), _rPrevwWinSize ); const SwRect aPreviewWinSwRect( Point( 0, 0 ), _rPreviewWinSize );
// calculate visible preview page rectangle // calculate visible preview page rectangle
SwRect aVisPrevwPgSwRect( _rPrevwPgSwRect ); SwRect aVisPreviewPgSwRect( _rPreviewPgSwRect );
aVisPrevwPgSwRect.Intersection( aPrevwWinSwRect ); aVisPreviewPgSwRect.Intersection( aPreviewWinSwRect );
// adjust logic page rectangle // adjust logic page rectangle
SwTwips nTmpDiff; SwTwips nTmpDiff;
// left // left
nTmpDiff = aVisPrevwPgSwRect.Left() - _rPrevwPgSwRect.Left(); nTmpDiff = aVisPreviewPgSwRect.Left() - _rPreviewPgSwRect.Left();
if ( nTmpDiff > 0 ) if ( nTmpDiff > 0 )
_iorLogicPgSwRect.Left( _iorLogicPgSwRect.Left() + nTmpDiff ); _iorLogicPgSwRect.Left( _iorLogicPgSwRect.Left() + nTmpDiff );
// top // top
nTmpDiff = aVisPrevwPgSwRect.Top() - _rPrevwPgSwRect.Top(); nTmpDiff = aVisPreviewPgSwRect.Top() - _rPreviewPgSwRect.Top();
if ( nTmpDiff > 0 ) if ( nTmpDiff > 0 )
_iorLogicPgSwRect.Top( _iorLogicPgSwRect.Top() + nTmpDiff ); _iorLogicPgSwRect.Top( _iorLogicPgSwRect.Top() + nTmpDiff );
// right // right
nTmpDiff = _rPrevwPgSwRect.Right() - aVisPrevwPgSwRect.Right(); nTmpDiff = _rPreviewPgSwRect.Right() - aVisPreviewPgSwRect.Right();
if ( nTmpDiff > 0 ) if ( nTmpDiff > 0 )
_iorLogicPgSwRect.Right( _iorLogicPgSwRect.Right() - nTmpDiff ); _iorLogicPgSwRect.Right( _iorLogicPgSwRect.Right() - nTmpDiff );
// bottom // bottom
nTmpDiff = _rPrevwPgSwRect.Bottom() - aVisPrevwPgSwRect.Bottom(); nTmpDiff = _rPreviewPgSwRect.Bottom() - aVisPreviewPgSwRect.Bottom();
if ( nTmpDiff > 0 ) if ( nTmpDiff > 0 )
_iorLogicPgSwRect.Bottom( _iorLogicPgSwRect.Bottom() - nTmpDiff ); _iorLogicPgSwRect.Bottom( _iorLogicPgSwRect.Bottom() - nTmpDiff );
} }
...@@ -1299,15 +1299,15 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( ) ...@@ -1299,15 +1299,15 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( )
} }
uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview( uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview(
const std::vector<PrevwPage*>& _rPrevwPages, const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ) const Size& _rPreviewWinSize )
{ {
// create & update preview data object // create & update preview data object
if( mpPreview == NULL ) if( mpPreview == NULL )
mpPreview = new SwAccPreviewData(); mpPreview = new SwAccPreviewData();
mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize );
uno::Reference<XAccessible> xAcc = _GetDocumentView( true ); uno::Reference<XAccessible> xAcc = _GetDocumentView( true );
return xAcc; return xAcc;
...@@ -2178,15 +2178,15 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, ...@@ -2178,15 +2178,15 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm,
return nIndex; return nIndex;
} }
void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages, void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ) const Size& _rPreviewWinSize )
{ {
OSL_ENSURE( GetShell()->IsPreView(), "no preview?" ); OSL_ENSURE( GetShell()->IsPreView(), "no preview?" );
OSL_ENSURE( mpPreview != NULL, "no preview data?" ); OSL_ENSURE( mpPreview != NULL, "no preview data?" );
mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize );
// propagate change of VisArea through the document's // propagate change of VisArea through the document's
// accessibility tree; this will also send appropriate scroll // accessibility tree; this will also send appropriate scroll
...@@ -2524,14 +2524,14 @@ void SwAccessibleMap::GetMapMode( const Point& _rPoint, ...@@ -2524,14 +2524,14 @@ void SwAccessibleMap::GetMapMode( const Point& _rPoint,
_orMapMode = aMapMode; _orMapMode = aMapMode;
} }
Size SwAccessibleMap::GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const Size SwAccessibleMap::GetPreViewPageSize( sal_uInt16 _nPreviewPageNum ) const
{ {
OSL_ENSURE( mpVSh->IsPreView(), "no page preview accessible." ); OSL_ENSURE( mpVSh->IsPreView(), "no page preview accessible." );
OSL_ENSURE( mpVSh->IsPreView() && ( mpPreview != NULL ), OSL_ENSURE( mpVSh->IsPreView() && ( mpPreview != NULL ),
"missing accessible preview data at page preview" ); "missing accessible preview data at page preview" );
if ( mpVSh->IsPreView() && ( mpPreview != NULL ) ) if ( mpVSh->IsPreView() && ( mpPreview != NULL ) )
{ {
return mpVSh->PagePreviewLayout()->GetPrevwPageSizeByPageNum( _nPrevwPageNum ); return mpVSh->PagePreviewLayout()->GetPreviewPageSizeByPageNum( _nPreviewPageNum );
} }
else else
{ {
......
...@@ -27,23 +27,23 @@ class SwPageFrm; ...@@ -27,23 +27,23 @@ class SwPageFrm;
/** data structure for a preview page in the current preview layout /** data structure for a preview page in the current preview layout
*/ */
struct PrevwPage struct PreviewPage
{ {
const SwPageFrm* pPage; const SwPageFrm* pPage;
bool bVisible; bool bVisible;
Size aPageSize; Size aPageSize;
Point aPrevwWinPos; Point aPreviewWinPos;
Point aLogicPos; Point aLogicPos;
Point aMapOffset; Point aMapOffset;
inline PrevwPage(); inline PreviewPage();
}; };
inline PrevwPage::PrevwPage() inline PreviewPage::PreviewPage()
: pPage( 0 ), : pPage( 0 ),
bVisible( false ), bVisible( false ),
aPageSize( Size(0,0) ), aPageSize( Size(0,0) ),
aPrevwWinPos( Point(0,0) ), aPreviewWinPos( Point(0,0) ),
aLogicPos( Point(0,0) ), aLogicPos( Point(0,0) ),
aMapOffset( Point(0,0) ) aMapOffset( Point(0,0) )
{}; {};
......
...@@ -47,7 +47,7 @@ class SdrObject; ...@@ -47,7 +47,7 @@ class SdrObject;
class Fraction; class Fraction;
class SwPrintData; class SwPrintData;
class SwPagePreviewLayout; class SwPagePreviewLayout;
struct PrevwPage; struct PreviewPage;
class SwTxtFrm; class SwTxtFrm;
// --> OD #i76669# // --> OD #i76669#
namespace sdr { namespace contact { namespace sdr { namespace contact {
...@@ -96,7 +96,7 @@ class SwViewImp ...@@ -96,7 +96,7 @@ class SwViewImp
sal_uInt16 nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO) sal_uInt16 nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
SwRect aSmoothRect; SwRect aSmoothRect;
SwPagePreviewLayout* mpPgPrevwLayout; SwPagePreviewLayout* mpPgPreviewLayout;
/** /**
Returns if printer shall be stopped. Returns if printer shall be stopped.
...@@ -232,7 +232,7 @@ public: ...@@ -232,7 +232,7 @@ public:
inline SwPagePreviewLayout* PagePreviewLayout() inline SwPagePreviewLayout* PagePreviewLayout()
{ {
return mpPgPrevwLayout; return mpPgPreviewLayout;
} }
// Is this view accessible? // Is this view accessible?
...@@ -276,10 +276,10 @@ public: ...@@ -276,10 +276,10 @@ public:
// update data for accessible preview // update data for accessible preview
// change method signature due to new page preview functionality // change method signature due to new page preview functionality
void UpdateAccessiblePreview( const std::vector<PrevwPage*>& _rPrevwPages, void UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ); const Size& _rPreviewWinSize );
void InvalidateAccessiblePreViewSelection( sal_uInt16 nSelPage ); void InvalidateAccessiblePreViewSelection( sal_uInt16 nSelPage );
......
...@@ -100,7 +100,7 @@ SwViewImp::SwViewImp( ViewShell *pParent ) : ...@@ -100,7 +100,7 @@ SwViewImp::SwViewImp( ViewShell *pParent ) :
pSdrObjCached(NULL), pSdrObjCached(NULL),
nRestoreActions( 0 ), nRestoreActions( 0 ),
// OD 12.12.2002 #103492# // OD 12.12.2002 #103492#
mpPgPrevwLayout( 0 ) mpPgPreviewLayout( 0 )
{ {
bResetHdlHiddenPaint = bResetHdlHiddenPaint =
bSmoothUpdate = bStopSmooth = bStopPrt = sal_False; bSmoothUpdate = bStopSmooth = bStopPrt = sal_False;
...@@ -112,7 +112,7 @@ SwViewImp::~SwViewImp() ...@@ -112,7 +112,7 @@ SwViewImp::~SwViewImp()
delete pAccMap; delete pAccMap;
// OD 12.12.2002 #103492# // OD 12.12.2002 #103492#
delete mpPgPrevwLayout; delete mpPgPreviewLayout;
//JP 29.03.96: after ShowSdrPage HideSdrPage must also be executed!!! //JP 29.03.96: after ShowSdrPage HideSdrPage must also be executed!!!
if( pDrawView ) if( pDrawView )
...@@ -271,7 +271,7 @@ void SwViewImp::InitPagePreviewLayout() ...@@ -271,7 +271,7 @@ void SwViewImp::InitPagePreviewLayout()
{ {
OSL_ENSURE( pSh->GetLayout(), "no layout - page preview layout can not be created."); OSL_ENSURE( pSh->GetLayout(), "no layout - page preview layout can not be created.");
if ( pSh->GetLayout() ) if ( pSh->GetLayout() )
mpPgPrevwLayout = new SwPagePreviewLayout( *pSh, *(pSh->GetLayout()) ); mpPgPreviewLayout = new SwPagePreviewLayout( *pSh, *(pSh->GetLayout()) );
} }
void SwViewImp::UpdateAccessible() void SwViewImp::UpdateAccessible()
...@@ -433,14 +433,14 @@ void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm ) ...@@ -433,14 +433,14 @@ void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
} }
// OD 15.01.2003 #103492# - method signature change due to new page preview functionality // OD 15.01.2003 #103492# - method signature change due to new page preview functionality
void SwViewImp::UpdateAccessiblePreview( const std::vector<PrevwPage*>& _rPrevwPages, void SwViewImp::UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages,
const Fraction& _rScale, const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm, const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize ) const Size& _rPreviewWinSize )
{ {
if( IsAccessible() ) if( IsAccessible() )
GetAccessibleMap().UpdatePreview( _rPrevwPages, _rScale, GetAccessibleMap().UpdatePreview( _rPreviewPages, _rScale,
_pSelectedPageFrm, _rPrevwWinSize ); _pSelectedPageFrm, _rPreviewWinSize );
} }
void SwViewImp::InvalidateAccessiblePreViewSelection( sal_uInt16 nSelPage ) void SwViewImp::InvalidateAccessiblePreViewSelection( sal_uInt16 nSelPage )
......
...@@ -2163,7 +2163,7 @@ ViewShell::CreateAccessiblePreview() ...@@ -2163,7 +2163,7 @@ ViewShell::CreateAccessiblePreview()
if ( IsPreView() && GetLayout()&& GetWin() ) if ( IsPreView() && GetLayout()&& GetWin() )
{ {
return Imp()->GetAccessibleMap().GetDocumentPreview( return Imp()->GetAccessibleMap().GetDocumentPreview(
PagePreviewLayout()->maPrevwPages, PagePreviewLayout()->maPreviewPages,
GetWin()->GetMapMode().GetScaleX(), GetWin()->GetMapMode().GetScaleX(),
GetLayout()->GetPageByPageNum( PagePreviewLayout()->mnSelectedPageNum ), GetLayout()->GetPageByPageNum( PagePreviewLayout()->mnSelectedPageNum ),
PagePreviewLayout()->maWinSize ); //swmod 080305 PagePreviewLayout()->maWinSize ); //swmod 080305
......
...@@ -52,7 +52,7 @@ class SwPagePreViewWin : public Window ...@@ -52,7 +52,7 @@ class SwPagePreViewWin : public Window
SwPagePreView& mrView; SwPagePreView& mrView;
bool mbCalcScaleForPreviewLayout; bool mbCalcScaleForPreviewLayout;
Rectangle maPaintedPreviewDocRect; Rectangle maPaintedPreviewDocRect;
SwPagePreviewLayout* mpPgPrevwLayout; SwPagePreviewLayout* mpPgPreviewLayout;
void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol ); void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol );
......
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