Lines 83-88
Link Here
|
83 |
|
83 |
|
84 |
#include <IDocumentDeviceAccess.hxx> |
84 |
#include <IDocumentDeviceAccess.hxx> |
85 |
|
85 |
|
|
|
86 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
87 |
#ifndef _SVX_FRMDIRITEM_HXX |
88 |
#include <svx/frmdiritem.hxx> |
89 |
#endif |
90 |
#include "frmfmt.hxx" |
91 |
|
86 |
// OD 20.02.2003 #107369# - method to update statics for paint |
92 |
// OD 20.02.2003 #107369# - method to update statics for paint |
87 |
// Note: method defined in '/sw/source/core/layout/paintfrm.cxx' |
93 |
// Note: method defined in '/sw/source/core/layout/paintfrm.cxx' |
88 |
extern void SwCalcPixStatics( OutputDevice *pOut ); |
94 |
extern void SwCalcPixStatics( OutputDevice *pOut ); |
Lines 105-110
Link Here
|
105 |
|
111 |
|
106 |
const SwPrintData* pPrintData = mrParentViewShell.getIDocumentDeviceAccess()->getPrintData(); |
112 |
const SwPrintData* pPrintData = mrParentViewShell.getIDocumentDeviceAccess()->getPrintData(); |
107 |
mbPrintEmptyPages = pPrintData ? pPrintData->IsPrintEmptyPages() : true; |
113 |
mbPrintEmptyPages = pPrintData ? pPrintData->IsPrintEmptyPages() : true; |
|
|
114 |
|
115 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
116 |
// Reverse column order for RTL |
117 |
// Layout direction determined by layout direction of the first page. |
118 |
{ |
119 |
const SwPageFrm* pPage = dynamic_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower()); |
120 |
const UINT16 nDir = ((SvxFrameDirectionItem&)pPage->GetFmt()->GetAttr( RES_FRAMEDIR )).GetValue(); |
121 |
mbRTL = (nDir == FRMDIR_HORI_RIGHT_TOP); |
122 |
} |
123 |
// <-- |
108 |
} |
124 |
} |
109 |
|
125 |
|
110 |
void SwPagePreviewLayout::_Clear() |
126 |
void SwPagePreviewLayout::_Clear() |
Lines 637-642
Link Here
|
637 |
sal_uInt16 nCurrCol = mnPaintStartCol; |
653 |
sal_uInt16 nCurrCol = mnPaintStartCol; |
638 |
sal_uInt16 nConsideredRows = 0; |
654 |
sal_uInt16 nConsideredRows = 0; |
639 |
Point aCurrPaintOffset = aInitialPaintOffset; |
655 |
Point aCurrPaintOffset = aInitialPaintOffset; |
|
|
656 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
657 |
if ( mbRTL ) |
658 |
{ |
659 |
aCurrPaintOffset.X() += (mnCols - 1) * mnColWidth; |
660 |
} |
661 |
// <-- |
640 |
// loop on pages to determine preview background retangles |
662 |
// loop on pages to determine preview background retangles |
641 |
while ( pPage && |
663 |
while ( pPage && |
642 |
(!mbDoesLayoutRowsFitIntoWindow || nConsideredRows < mnRows) && |
664 |
(!mbDoesLayoutRowsFitIntoWindow || nConsideredRows < mnRows) && |
Lines 666-672
Link Here
|
666 |
++nCurrCol; |
688 |
++nCurrCol; |
667 |
continue; |
689 |
continue; |
668 |
} |
690 |
} |
669 |
if ( aCurrPaintOffset.X() < maWinSize.Width() ) |
691 |
|
|
|
692 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
693 |
// if ( aCurrPaintOffset.X() < maWinSize.Width() ) |
694 |
const bool bInside = mbRTL |
695 |
? aCurrPaintOffset.X() >= aInitialPaintOffset.X() |
696 |
: aCurrPaintOffset.X() < maWinSize.Width(); |
697 |
if ( bInside ) |
698 |
// <-- |
670 |
{ |
699 |
{ |
671 |
// OD 19.02.2003 #107369# - leaving left-top-corner blank is |
700 |
// OD 19.02.2003 #107369# - leaving left-top-corner blank is |
672 |
// controlled by <mbBookPreview>. |
701 |
// controlled by <mbBookPreview>. |
Lines 675-681
Link Here
|
675 |
{ |
704 |
{ |
676 |
// first page in 2nd column |
705 |
// first page in 2nd column |
677 |
// --> continue with increased paint offset and next column |
706 |
// --> continue with increased paint offset and next column |
|
|
707 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
708 |
// aCurrPaintOffset.X() += mnColWidth; |
709 |
if ( mbRTL ) |
710 |
aCurrPaintOffset.X() -= mnColWidth; |
711 |
else |
678 |
aCurrPaintOffset.X() += mnColWidth; |
712 |
aCurrPaintOffset.X() += mnColWidth; |
|
|
713 |
// <-- |
679 |
++nCurrCol; |
714 |
++nCurrCol; |
680 |
continue; |
715 |
continue; |
681 |
} |
716 |
} |
Lines 698-709
Link Here
|
698 |
// prepare data for next loop |
733 |
// prepare data for next loop |
699 |
pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); |
734 |
pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); |
700 |
|
735 |
|
|
|
736 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
737 |
// aCurrPaintOffset.X() += mnColWidth; |
738 |
if ( mbRTL ) |
739 |
aCurrPaintOffset.X() -= mnColWidth; |
740 |
else |
701 |
aCurrPaintOffset.X() += mnColWidth; |
741 |
aCurrPaintOffset.X() += mnColWidth; |
|
|
742 |
// <-- |
702 |
++nCurrCol; |
743 |
++nCurrCol; |
703 |
if ( nCurrCol > mnCols ) |
744 |
if ( nCurrCol > mnCols ) |
704 |
{ |
745 |
{ |
705 |
++nConsideredRows; |
746 |
++nConsideredRows; |
706 |
aCurrPaintOffset.X() = aInitialPaintOffset.X(); |
747 |
aCurrPaintOffset.X() = aInitialPaintOffset.X(); |
|
|
748 |
if ( mbRTL ) |
749 |
{ |
750 |
aCurrPaintOffset.X() += (mnCols - 1) * mnColWidth; |
751 |
} |
752 |
// <-- |
707 |
nCurrCol = 1; |
753 |
nCurrCol = 1; |
708 |
aCurrPaintOffset.Y() += mnRowHeight; |
754 |
aCurrPaintOffset.Y() += mnRowHeight; |
709 |
} |
755 |
} |
Lines 879-890
Link Here
|
879 |
@author OD, IN/OUT parameters are absolute page numbers!!! |
925 |
@author OD, IN/OUT parameters are absolute page numbers!!! |
880 |
*/ |
926 |
*/ |
881 |
bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove( |
927 |
bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove( |
882 |
const sal_Int16 _nHoriMove, |
928 |
sal_Int16 _nHoriMove, |
883 |
const sal_Int16 _nVertMove, |
929 |
const sal_Int16 _nVertMove, |
884 |
sal_uInt16& _orNewSelectedPage, |
930 |
sal_uInt16& _orNewSelectedPage, |
885 |
sal_uInt16& _orNewStartPage, |
931 |
sal_uInt16& _orNewStartPage, |
886 |
Point& _orNewStartPos ) const |
932 |
Point& _orNewStartPos ) const |
887 |
{ |
933 |
{ |
|
|
934 |
// --> OD 2007-09-10 #i80209# - patch by ayaniger |
935 |
if ( mbRTL ) |
936 |
_nHoriMove = -_nHoriMove; |
937 |
// <-- |
888 |
// determine position of current selected page |
938 |
// determine position of current selected page |
889 |
sal_uInt16 nTmpRelSelPageNum = ConvertAbsoluteToRelativePageNum( mnSelectedPageNum ); |
939 |
sal_uInt16 nTmpRelSelPageNum = ConvertAbsoluteToRelativePageNum( mnSelectedPageNum ); |
890 |
sal_uInt16 nNewRelSelectedPageNum = nTmpRelSelPageNum; |
940 |
sal_uInt16 nNewRelSelectedPageNum = nTmpRelSelPageNum; |