diff options
Diffstat (limited to 'sd/source/ui/view/DocumentRenderer.cxx')
-rwxr-xr-x | sd/source/ui/view/DocumentRenderer.cxx | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index ddbf5cfc4388..baf2591de8f0 100755 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -153,7 +153,7 @@ namespace { return GetBoolValue("PageContentType", sal_Int32(3)); } - ULONG GetOutputQuality (void) const + sal_uLong GetOutputQuality (void) const { sal_Int32 nQuality = static_cast<sal_Int32>(mrProperties.getIntValue( "Quality", sal_Int32(0) )); return nQuality; @@ -218,7 +218,7 @@ namespace { /** When the value of the property with name pName is a boolean then return its value. When the property is unknown then - bDefaultValue is returned. Otherwise <FALSE/> is returned. + bDefaultValue is returned. Otherwise <sal_False/> is returned. */ bool GetBoolValue ( const sal_Char* pName, @@ -228,9 +228,9 @@ namespace { return bValue; } - /** Return <TRUE/> when the value of the property with name pName is + /** Return <sal_True/> when the value of the property with name pName is a string and its value equals pValue. When the property is - unknown then bDefaultValue is returned. Otherwise <FALSE/> is + unknown then bDefaultValue is returned. Otherwise <sal_False/> is returned. */ bool GetBoolValue ( @@ -245,8 +245,8 @@ namespace { return bDefaultValue; } - /** Return <TRUE/> when the value of the property with name pName is - an integer and its value is nTriggerValue. Otherwise <FALSE/> is + /** Return <sal_True/> when the value of the property with name pName is + an integer and its value is nTriggerValue. Otherwise <sal_False/> is returned. */ bool GetBoolValue ( @@ -327,7 +327,7 @@ namespace { {} const Printer* mpPrinter; - ULONG mnDrawMode; + sal_uLong mnDrawMode; ::rtl::OUString msTimeDate; ::rtl::OUString msPageString; Size maPrintSize; @@ -661,7 +661,7 @@ namespace { maProperties.push_back( aVal ); } - Sequence<rtl::OUString> CreateChoice (const USHORT nResourceId) const + Sequence<rtl::OUString> CreateChoice (const sal_uInt16 nResourceId) const { SdResId aResourceId (nResourceId); ResStringArray aChoiceStrings (aResourceId); @@ -709,9 +709,9 @@ namespace { const bool bPrintMarkedOnly, const ::rtl::OUString& rsPageString, const Point& rPageStringOffset, - const ULONG nDrawMode, + const sal_uLong nDrawMode, const Orientation eOrientation, - const USHORT nPaperTray) + const sal_uInt16 nPaperTray) : mePageKind(ePageKind), maMap(rMapMode), mbPrintMarkedOnly(bPrintMarkedOnly), @@ -734,9 +734,9 @@ namespace { const SetOfByte& rVisibleLayers, const SetOfByte& rPrintableLayers) const = 0; - ULONG GetDrawMode (void) const { return mnDrawMode; } + sal_uLong GetDrawMode (void) const { return mnDrawMode; } Orientation GetOrientation (void) const { return meOrientation; } - USHORT GetPaperTray (void) const { return mnPaperTray; } + sal_uInt16 GetPaperTray (void) const { return mnPaperTray; } protected: const PageKind mePageKind; @@ -744,9 +744,9 @@ namespace { const bool mbPrintMarkedOnly; const ::rtl::OUString msPageString; const Point maPageStringOffset; - const ULONG mnDrawMode; + const sal_uLong mnDrawMode; const Orientation meOrientation; - const USHORT mnPaperTray; + const sal_uInt16 mnPaperTray; }; @@ -759,15 +759,15 @@ namespace { { public: RegularPrinterPage ( - const USHORT nPageIndex, + const sal_uInt16 nPageIndex, const PageKind ePageKind, const MapMode& rMapMode, const bool bPrintMarkedOnly, const ::rtl::OUString& rsPageString, const Point& rPageStringOffset, - const ULONG nDrawMode, + const sal_uLong nDrawMode, const Orientation eOrientation, - const USHORT nPaperTray) + const sal_uInt16 nPaperTray) : PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, rsPageString, rPageStringOffset, nDrawMode, eOrientation, nPaperTray), mnPageIndex(nPageIndex) @@ -803,7 +803,7 @@ namespace { } private: - const USHORT mnPageIndex; + const sal_uInt16 mnPageIndex; }; @@ -816,15 +816,15 @@ namespace { { public: TiledPrinterPage ( - const USHORT nPageIndex, + const sal_uInt16 nPageIndex, const PageKind ePageKind, const sal_Int32 nGap, const bool bPrintMarkedOnly, const ::rtl::OUString& rsPageString, const Point& rPageStringOffset, - const ULONG nDrawMode, + const sal_uLong nDrawMode, const Orientation eOrientation, - const USHORT nPaperTray) + const sal_uInt16 nPaperTray) : PrinterPage(ePageKind, MapMode(), bPrintMarkedOnly, rsPageString, rPageStringOffset, nDrawMode, eOrientation, nPaperTray), mnPageIndex(nPageIndex), @@ -888,7 +888,7 @@ namespace { } private: - const USHORT mnPageIndex; + const sal_uInt16 mnPageIndex; const sal_Int32 mnGap; }; @@ -899,16 +899,16 @@ namespace { { public: BookletPrinterPage ( - const USHORT nFirstPageIndex, - const USHORT nSecondPageIndex, + const sal_uInt16 nFirstPageIndex, + const sal_uInt16 nSecondPageIndex, const Point& rFirstOffset, const Point& rSecondOffset, const PageKind ePageKind, const MapMode& rMapMode, const bool bPrintMarkedOnly, - const ULONG nDrawMode, + const sal_uLong nDrawMode, const Orientation eOrientation, - const USHORT nPaperTray) + const sal_uInt16 nPaperTray) : PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, ::rtl::OUString(), Point(), nDrawMode, eOrientation, nPaperTray), mnFirstPageIndex(nFirstPageIndex), @@ -963,8 +963,8 @@ namespace { } private: - const USHORT mnFirstPageIndex; - const USHORT mnSecondPageIndex; + const sal_uInt16 mnFirstPageIndex; + const sal_uInt16 mnSecondPageIndex; const Point maFirstOffset; const Point maSecondOffset; }; @@ -978,14 +978,14 @@ namespace { { public: HandoutPrinterPage ( - const USHORT nHandoutPageIndex, - const ::std::vector<USHORT>& rPageIndices, + const sal_uInt16 nHandoutPageIndex, + const ::std::vector<sal_uInt16>& rPageIndices, const MapMode& rMapMode, const ::rtl::OUString& rsPageString, const Point& rPageStringOffset, - const ULONG nDrawMode, + const sal_uLong nDrawMode, const Orientation eOrientation, - const USHORT nPaperTray) + const sal_uInt16 nPaperTray) : PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString, rPageStringOffset, nDrawMode, eOrientation, nPaperTray), mnHandoutPageIndex(nHandoutPageIndex), @@ -1021,7 +1021,7 @@ namespace { // Connect page objects with pages. std::vector<SdrPageObj*>::iterator aPageObjIter (aHandoutPageObjects.begin()); - for (std::vector<USHORT>::const_iterator + for (std::vector<sal_uInt16>::const_iterator iPageIndex(maPageIndices.begin()), iEnd(maPageIndices.end()); iPageIndex!=iEnd && aPageObjIter!=aHandoutPageObjects.end(); @@ -1110,8 +1110,8 @@ namespace { } private: - const USHORT mnHandoutPageIndex; - const ::std::vector<USHORT> maPageIndices; + const sal_uInt16 mnHandoutPageIndex; + const ::std::vector<sal_uInt16> maPageIndices; }; @@ -1128,9 +1128,9 @@ namespace { const MapMode& rMapMode, const ::rtl::OUString& rsPageString, const Point& rPageStringOffset, - const ULONG nDrawMode, + const sal_uLong nDrawMode, const Orientation eOrientation, - const USHORT nPaperTray) + const sal_uInt16 nPaperTray) : PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString, rPageStringOffset, nDrawMode, eOrientation, nPaperTray), mpParaObject(pParaObject) @@ -1163,13 +1163,13 @@ namespace { // Get and set up the outliner. const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize()); Outliner* pOutliner = rDocument.GetInternalOutliner(); - const USHORT nSavedOutlMode (pOutliner->GetMode()); - const BOOL bSavedUpdateMode (pOutliner->GetUpdateMode()); + const sal_uInt16 nSavedOutlMode (pOutliner->GetMode()); + const sal_Bool bSavedUpdateMode (pOutliner->GetUpdateMode()); const Size aSavedPaperSize (pOutliner->GetPaperSize()); pOutliner->Init(OUTLINERMODE_OUTLINEVIEW); pOutliner->SetPaperSize(aOutRect.GetSize()); - pOutliner->SetUpdateMode(TRUE); + pOutliner->SetUpdateMode(sal_True); pOutliner->Clear(); pOutliner->SetText(*mpParaObject); @@ -1352,9 +1352,9 @@ public: return; const Orientation eSavedOrientation (rPrinter.GetOrientation()); - const ULONG nSavedDrawMode (rPrinter.GetDrawMode()); + const sal_uLong nSavedDrawMode (rPrinter.GetDrawMode()); const MapMode aSavedMapMode (rPrinter.GetMapMode()); - const USHORT nSavedPaperBin (rPrinter.GetPaperBin()); + const sal_uInt16 nSavedPaperBin (rPrinter.GetPaperBin()); // Set page orientation. @@ -1484,15 +1484,15 @@ private: mpPrinter->SetMapMode(aMap); ::Outliner& rOutliner = mrBase.GetDocument()->GetDrawOutliner(); - const ULONG nSavedControlWord (rOutliner.GetControlWord()); - ULONG nCntrl = nSavedControlWord; + const sal_uLong nSavedControlWord (rOutliner.GetControlWord()); + sal_uLong nCntrl = nSavedControlWord; nCntrl &= ~EE_CNTRL_MARKFIELDS; nCntrl &= ~EE_CNTRL_ONLINESPELLING; rOutliner.SetControlWord( nCntrl ); // When in outline view then apply all pending changes to the model. if (pShell->ISA(OutlineViewShell)) - static_cast<OutlineViewShell*>(pShell)->PrepareClose (FALSE, FALSE); + static_cast<OutlineViewShell*>(pShell)->PrepareClose (sal_False, sal_False); // Collect some frequently used data. if (mpOptions->IsDate()) @@ -1502,7 +1502,7 @@ private: } if (mpOptions->IsTime()) - aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time(), FALSE, FALSE ); + aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time(), sal_False, sal_False ); aInfo.maPrintSize = aInfo.mpPrinter->GetOutputSize(); maPrintSize = awt::Size( aInfo.mpPrinter->GetPaperSize().Width(), @@ -1641,7 +1641,7 @@ private: // const bool bPrintExcluded (mpOptions->IsPrintExcluded()); bool bContainsTransparency = false; - for (USHORT + for (sal_uInt16 nIndex=0, nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); nIndex < nCount && !bContainsTransparency; @@ -1677,7 +1677,7 @@ private: if ( ! rInfo.maSelection.IsSelected(nPageIndex)) return NULL; SdPage* pPage = mrBase.GetDocument()->GetSdPage( - sal::static_int_cast<USHORT>(nPageIndex), + sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind); if (pPage == NULL) return NULL; @@ -1718,16 +1718,16 @@ private: Link aOldLink; Outliner* pOutliner = mrBase.GetDocument()->GetInternalOutliner(); pOutliner->Init(OUTLINERMODE_OUTLINEVIEW); - const USHORT nSavedOutlMode (pOutliner->GetMode()); - const BOOL bSavedUpdateMode (pOutliner->GetUpdateMode()); + const sal_uInt16 nSavedOutlMode (pOutliner->GetMode()); + const sal_Bool bSavedUpdateMode (pOutliner->GetUpdateMode()); const Size aSavedPaperSize (pOutliner->GetPaperSize()); const MapMode aSavedMapMode (pOutliner->GetRefMapMode()); pOutliner->SetPaperSize(aOutRect.GetSize()); - pOutliner->SetUpdateMode(TRUE); + pOutliner->SetUpdateMode(sal_True); long nPageH = aOutRect.GetHeight(); - for (USHORT + for (sal_uInt16 nIndex=0, nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); nIndex < nCount; @@ -1789,7 +1789,7 @@ private: pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT)); // Untertitel vorhanden? } - ULONG nParaCount1 = pOutliner->GetParagraphCount(); + sal_uLong nParaCount1 = pOutliner->GetParagraphCount(); if (pTextObj!=NULL && !pTextObj->IsEmptyPresObj() @@ -1804,7 +1804,7 @@ private: for (sal_Int32 nPara=nParaCount1; nPara<nParaCount2; ++nPara) { Paragraph* pP = pOutliner->GetParagraph(nPara); - if (pP!=NULL && pOutliner->GetDepth((USHORT)nPara) > 0) + if (pP!=NULL && pOutliner->GetDepth((sal_uInt16)nPara) > 0) pOutliner->SetDepth(pP, 0); } } @@ -1816,9 +1816,9 @@ private: // the current page. if (nH > nPageH && pPara!=NULL) { - ULONG nCnt = pOutliner->GetAbsPos( + sal_uLong nCnt = pOutliner->GetAbsPos( pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 ) ); - ULONG nParaPos = pOutliner->GetAbsPos( pPara ); + sal_uLong nParaPos = pOutliner->GetAbsPos( pPara ); nCnt -= nParaPos; pPara = pOutliner->GetParagraph( ++nParaPos ); if ( nCnt && pPara ) @@ -1859,7 +1859,7 @@ private: const bool bScalePage (mpOptions->IsPageSize()); - USHORT nPaperBin; + sal_uInt16 nPaperBin; if ( ! mpOptions->IsPaperBin()) nPaperBin = rHandoutPage.GetPaperBin(); else @@ -1922,15 +1922,15 @@ private: ++nShapeCount; } - const USHORT nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); - const USHORT nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0; + const sal_uInt16 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); + const sal_uInt16 nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0; pViewShell->SetPrintedHandoutPageCount( nHandoutPageCount ); mrBase.GetDocument()->setHandoutPageCount( nHandoutPageCount ); // Distribute pages to handout pages. - ::std::vector<USHORT> aPageIndices; + ::std::vector<sal_uInt16> aPageIndices; std::vector<SdPage*> aPagesVector; - for (USHORT + for (sal_uInt16 nIndex=0, nCount= nPageCount, nHandoutPageIndex=0; @@ -2010,7 +2010,7 @@ private: pViewShell->WriteFrameViewData(); Point aPtZero; - for (USHORT + for (sal_uInt16 nIndex=0, nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); nIndex < nCount; @@ -2054,13 +2054,13 @@ private: // Bugfix zu 44530: // Falls implizit umgestellt wurde (Landscape/Portrait) // wird dies beim Kacheln, bzw. aufteilen (Poster) beruecksichtigt - BOOL bSwitchPageSize = FALSE; + sal_Bool bSwitchPageSize = sal_False; if( ( rInfo.maPrintSize.Width() > rInfo.maPrintSize.Height() && aPageWidth < aPageHeight ) || ( rInfo.maPrintSize.Width() < rInfo.maPrintSize.Height() && aPageWidth > aPageHeight ) ) { - bSwitchPageSize = TRUE; + bSwitchPageSize = sal_True; const sal_Int32 nTmp (rInfo.maPrintSize.Width()); rInfo.maPrintSize.Width() = rInfo.maPrintSize.Height(); rInfo.maPrintSize.Height() = nTmp; @@ -2136,8 +2136,8 @@ private: } // create vector of pages to print - ::std::vector< USHORT > aPageVector; - for (USHORT + ::std::vector< sal_uInt16 > aPageVector; + for (sal_uInt16 nIndex=0, nCount=mrBase.GetDocument()->GetSdPageCount(ePageKind); nIndex < nCount; @@ -2149,14 +2149,14 @@ private: } // create pairs of pages to print on each page - typedef ::std::vector< ::std::pair< USHORT, USHORT > > PairVector; + typedef ::std::vector< ::std::pair< sal_uInt16, sal_uInt16 > > PairVector; PairVector aPairVector; if ( ! aPageVector.empty()) { sal_uInt32 nFirstIndex = 0, nLastIndex = aPageVector.size() - 1; if( aPageVector.size() & 1 ) - aPairVector.push_back( ::std::make_pair( (USHORT) 65535, aPageVector[ nFirstIndex++ ] ) ); + aPairVector.push_back( ::std::make_pair( (sal_uInt16) 65535, aPageVector[ nFirstIndex++ ] ) ); else aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) ); @@ -2179,7 +2179,7 @@ private: if ((!bIsIndexOdd && mpOptions->IsPrintFrontPage()) || (bIsIndexOdd && mpOptions->IsPrintBackPage())) { - const ::std::pair<USHORT, USHORT> aPair (aPairVector[nIndex]); + const ::std::pair<sal_uInt16, sal_uInt16> aPair (aPairVector[nIndex]); Point aSecondOffset (aOffset); if (rInfo.meOrientation == ORIENTATION_LANDSCAPE) aSecondOffset.X() += aAdjustedPrintSize.Width() / 2; @@ -2215,7 +2215,7 @@ private: const PageKind ePageKind, const PrintInfo& rInfo) { - USHORT nPaperBin; + sal_uInt16 nPaperBin; if ( ! mpOptions->IsPaperBin()) nPaperBin = rPage.GetPaperBin(); else @@ -2224,7 +2224,7 @@ private: maPrinterPages.push_back( ::boost::shared_ptr<PrinterPage>( new TiledPrinterPage( - sal::static_int_cast<USHORT>(nPageIndex), + sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind, 500, rInfo.mbPrintMarkedOnly, @@ -2249,7 +2249,7 @@ private: { const Point aPageOffset (rInfo.mpPrinter->GetPageOffset()); - USHORT nPaperBin; + sal_uInt16 nPaperBin; if ( ! mpOptions->IsPaperBin()) nPaperBin = rPage.GetPaperBin(); else @@ -2280,7 +2280,7 @@ private: maPrinterPages.push_back( ::boost::shared_ptr<PrinterPage>( new RegularPrinterPage( - sal::static_int_cast<USHORT>(nPageIndex), + sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind, aMap, rInfo.mbPrintMarkedOnly, @@ -2320,7 +2320,7 @@ private: maPrinterPages.push_back( ::boost::shared_ptr<PrinterPage>( new RegularPrinterPage( - sal::static_int_cast<USHORT>(nPageIndex), + sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind, aMap, rInfo.mbPrintMarkedOnly, |