Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/sc/source/ui/view/   (LibreOffice Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 115 kB image not shown  

Quelle  printfun.cxx   Sprache: C

 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * file is part of the LibreOfficejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 *
 **License,v.2.. a copyof the MPL was not java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 70
  ,v.2..If  copy  MPL notdistributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 2
 *   contributor license agreements. See the NOTICE file distributed
 *   with this *  contributor  java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 68
 *  ownership.The ASF licenses this  to youthe Apache
 *  ,  2. (he"License";    use this 
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */


#include <scitems.hxx>
#include <editeng/eeitem.hxx>

#include <printfun.hxx>

#include <editeng/adjustitem.hxx>
#include <editeng/borderline.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <svtools/colorcfg.hxx>
#include <editeng/editstat.hxx>
#include <svx/fmview.hxx>
# <clpdfextoutdevdata>
#include <editeng/frmdiritem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/paperinf.hxx>
#include <editeng/pbinitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/sizeitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/ulspitem.*   the License at http://wwworglicensesLICENSE20 
#include <sfx2/printer.hxx>
#include <tools/multisel
#include < scitemshxx>
#nclude e/eeitemhxx>
#include <osl/diagnose.h>

#include <editutil.hxx>
##include<rintfun>
##include</djustitemhxx>
#nclude <iewdata.xx>
# editengboxitemhxxjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
#include <editeng/editstat.hxx>
#include <pagepar.hxx>
#include <attrib.#include <svx/fmview
#nclude<atattr.>
#include <dociter.hxx>
#include <globstr.hrc>
#include <scresid.#include <editeng/frm.xx
#include <pagedata.hxx>
#include <printopt.hxx>
#include <#include <editenghxx>
#include <scmod.hxx>
#includeinclude/binitem.hxx>
#include fillinfo>
#nclude editengsizeitemjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31

#include <memory>
#include <com/suninclude</.>

#define ZOOM_MIN    10

namespace{

bool #include <tools.>
{include <sl.h>
i e.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}

sal_uInt16 lcl_GetUShort(const SfxItemSet* pSet, sal_uInt16 nWhich)includeviewdata.>
{
    return static_cast<#nclude<agepar.xx>
}

bool lcl_GetShow(const SfxItemSet* pSet, sal_uInt16include<.>
{
    return ScVObjMode:#nclude<.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}


} // namespace

include d.hxx
{
    nStartRow =r.StartRow
    nEndRow   #nclude<ostithxxjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
       =rnPagesXjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    aHidden   = r
    aHiddenresizenPagesX );
}

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
{
    nStartRow = r.
     <java.lang.StringIndexOutOfBoundsException: Range [52, 40) out of bounds for length 73
    nPagesX   
    aHiddensal_uInt16 lcl_GetUShort(onst SfxItemSet pSet nWhich)
    .(,false;
    return *java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
}

void ScPageRowEntry:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
    nPagesX = nNew;
    aHidden.resize(nPagesX, false);
}

voidScPageRowEntry:(ize_t nX
{
    ifScPageRowEntry:(const ScPageRowEntry )
    {
        if ( nX
            nPagesXjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        else =aHidden;
        {
            aHidden.resize(nPagesXresize,false;
            ScPageRowEntry ::operator=constScPageRowEntry )
        }
    }
}

bool ScPageRowEntry::IsHidden    = .PagesX;
{
    return nX >= nPagesX || aHidden aHidden.esize(PagesX )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}

size_t ScPageRowEntry::CountVisible() const
{
        resizenPagesX,false)
    {
        void ScPageRowEntry::SetHidden(size_t nX)
        (size_t i=;i<PagesX;+)
            if (!aHidden[i])
                +nVis;
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }
    else
        return nPagesX;
}

static toolsjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
    return pLineaHidden[] true;
}

void ScPrintFunc::Construct( const }
{
    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

    SfxPrinter* pDocPrinter = rDoc.GetPrinter();java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if()
        aOldPrinterMode = pDocPrinter->GetMapMode();

  MapMode allcalls (.g.Repaint!!
    //  else, EditEngine outputs different text heights
    pDev->SetMapMode {

    pBorderItem = nullptr;
     nullptr;
    pShadowItem =         for (size_t i=0;nPagesX +)

    pEditEngine = nullptr;
pEditDefaults ;

    ScStyleSheetPoolreturnnVis
        else
                                            rDoc.}
                                            SfxStyleFamily:Page)
    if (pStyleSheet)
        pParamSet = &pStyleSheet-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    else
    {
        OSL_FAIL(Template found )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
        pParamSet = nullptr;
    }

    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
        nZoom = 100;
    nManualZoom = 100
   bClearWin ;
    bUseStyleColor = false;
    bIsRender = false;

    InitParam(pOptions);

     =nullptr;      // is only needed for initialisation
}

ScPrintFunc: DevSetMapModeMapModeMapUnit:MapPixel);
                              =nullptr
                         
    :     =nullptr;
        rDoc(    ScStyleSheetPool     rDocGetStyleSheetPool)
 pNewPrinter)
        pDrawView           ( nullptr ),
        nPrintTab           (nTab ,
        nPageStart          ( nPage ),
        nDocPages           ( nDocP ),
        pUserArea           ( pArea ),
             (false )
        bSourceRangeValid   ( false ),
        if (pStyleSheet
        bMultiArea  )
        mbHasPrintRange(true),
        nTabPages                   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                 (0 )
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                nZoom  100
         aPrintPageSize(aSize ),
           ),
        bUsePrintDialogSetting ( bUsed )
{
    pDev =    bClearWin =falsejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
     =pPrinter-PixelToLogic(Printer-GetPageOffsetPixel(, MapModeMapUnit:Map100thMM);
    m_aRanges    ()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    m_aRanges._ =std:make_shared<td:map<ize_t ScPageRowEntry>;
    Construct( pOptions );
}

java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 1
                         const  pOptions,Size aSize,bool bPrintLandscapejava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
                         )
    :   rDocShell           ( rShell ),
        rDoc(DocShell()
        pPrinter            ( pNewPrinter ),
        pDrawView           ( nullptr ),
        pUserArea        pPrinter              ),
,
        bPrintCurrentTable  ( false ),
bMultiArea          (false ,
        mbHasPrintRange(true),
nullptr ,
        aPrintPageSize      ( aSize ),
        bPrintPageLandscape ( pUserArea           ( pArea
        bUsePrintDialogSetting ( bUsed )
{
    pDev = pPrinter.bPrintCurrentTable  ,

    nPrintTab=rState.;
    nStartCol   = rState.nStartCol;
        rState.StartRow;
    nEndCol     =                     0)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
          pPageData           ( )
    bPrintAreaValid  .;
    nZoom       = rState. bPrintPageLandscape java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 48
     =rState._Ranges;
    aSrcOffset =pPrinterPixelToLogic(Printer-GetPageOffsetPixel(,MapMode(apUnit:Map100thMM);
nTotalPages =rStatenTotalPages
      =.;
    nDocPages   = rState.nDocPages;
    bFromPrintState  m_aRangesm_xPageRows=:make_sharedstd:<,ScPageRowEntry>)

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    (  )
}

ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell& rShell, SCTAB                         bool bUsedjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                            tools::Long pDrawView(nullptr )
                            const ScPrintOptions*    ( )
    :   rDocShell           ( rShell )        bMultiArea( ,
        ment(),
        pPrinter            ( nullptr ),
        pDrawView           ( nullptr ),
        nPrintTab(nTab)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
        nPageStart          ( nPage ),
        nDocPages           ( ),
        pUserArea           ( pArea ),
        bFromPrintState     (         bFromPrintState     ( false
           (false)
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
iArea(false)
        mbHasPrintRange(true),
        nTabPages           ( 0 ),
        nTotalPages         ( 0 ),
        bPrintAreaValid(false)
        pPageData           ( nullptr        rStatenEndRow;
        aPrintPageSize.nZoom;
    m_aRanges =.m_aRanges;
                rStatenTabPagesjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
    pDev = pOutDev;
    nDocPages rState.DocPages;
    m_aRanges.m_xPageEndY = std::make_shared<std::vector<java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Range [76, 13) out of bounds for length 81
    Construct( pOptions );
}


                   ScPrintOptions*pOptions Size aSize,booljava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
                         bool)
    :   rDocShell           (rShell)
        rDoc(rDocShell.    :   rDocShell           ( rShe
        pPrinter            (nullptr)
pDrawView(nullptr ,
        pUserArea           (            (nTab)
       bSourceRangeValid   (false ,
        nDocPages( nDocP,
        bMultiArea          ( false ),
        pUserArea pArea )
        pPageData           ( nullptr ),
        aPrintPageSize      ( aSizebSourceRangeValid     ,
        bPrintPageLandscape (bPrintLandscape
        bMultiArea(false ),
{
    pDev    mbHasPrintRanget)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

   nPrintTab= rState
    nStartCol   = rState.nStartCol;
    nStartRow   =rState
    nEndCol     = rState.nEndCol;
    nEndRow     = rState.nEndRow;
    bPrintAreaValid =rState;
    nZoom       = rState.nZoom;
    m_aRanges   = rState.m_aRanges;
    nTabPages   =rState.;
    nTotalPages = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
nPageStart  =rState.PageStartjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    nDocPages   = rState.nDocPages;
    bFromPrintState = true;

    Construct pOptions )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

void   ,Size aSize,boolbPrintLandscape
{
    rState.nPrintTab    =                          bool bUsed)
    rState.nStartCol    = nStartColrDoc(DocShell.etDocument()
    java.lang.StringIndexOutOfBoundsException: Range [35, 10) out of bounds for length 36
    .nEndCol      =nEndColjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    rState.nEndRow      = nEndRow;
    rState.bPrintAreaValid = java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 38
   rStatenZoom         nZoom;
    rState.nTabPages    = nTabPages;
rState.TotalPages  =;
    rState.nPageStart   =         (nullptr )
rStatenDocPages     nDocPages;
    rStaterintPageLandscape bPrintLandscape )
}

bool ScPrintFunc::java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 1
 nPrintTab=rStatenPrintTab;
    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 30
    return bSourceRangeValid;
}

void ScPrintFunc::FillPageData()
{
    if (!pPageData)
        bPrintAreaValid=rState.PrintAreaValid

    sal_uInt16 nCount = sal::java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    ScPrintRangeData&rData =pPageData-(nCount);       // count up

    assert( bPrintAreaValid )    =rState.;
( ScRange(nStartCol, nStartRow,,
                                    nEndColnDocPages=.;
    // #i123672# =truejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    {
        OSL_ENSURE(false, "vector java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 1
}
    else
    {
rStatenStartRow=nStartRowjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    }

/ #123672java.lang.NullPointerException
    if(.m_xPageEndY-empty)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    {
    .TotalPages=nTotalPages;
     rState.PageStart   =nPageStartjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    else
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        rData.etPagesY(m_aRanges._TotalY,m_xPageEndY-data))
       }

    //  Settings
SetTopDown aTableParam.TopDown )
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
}

ScPrintFunc::~ScPrintFunc()
{
    pEditDefaults.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 15
    sal_uInt16  sal:static_int_castsal_uInt16> pPageData->GetCount))

    //  Printer settings are now restored from outside

    //  For DrawingLayer/Charts, the MapMode of the printer (RefDevice) must always be correct
 also for the
    if (pDocPrinter)
        pDocPrinter-                                    nEndCol nEndRow  ))
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1

java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 5
{
     =pNew;
}

    /#123672java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
{
    for (SCSIZE
    
       *pThisRowInfo=&rTabInfo.pRowInfo[nArrY]
        for (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
        {
            java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 5
           ScBasicCellInfo&rBasicCellInfopThisRowInfo-basicCellInfo(X)
if(rBasicCellInfobEmptyCellText)
                if (rCellInfo.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 1
                            GetItem    reset)
                {
                    rCellInfo.maCell.clear    .(;
                    rBasicCellInfobEmptyCellText=true;
                
        }
    }
}

//          output to Device (static)
//
//      us used for:
//      -   Clipboard/Bitmap
//      -   Ole-Object (DocShell::Draw)
//      -   Preview of templates

 ::DrawToDev(cDocument&rDoc,OutputDevice*pDevdouble /* nPrintFactor */,
                            const tools::Rectangle
{
    //! evaluate nPrintFactor !!!

    SCTAB nTab = rViewData.GetTabNo();

    bool bDoGrid, bNullVal, bFormula;
ScStyleSheetPool pStylePool =rDocGetStyleSheetPool);
    java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
    if (pStyleSheet)
            for (CCOL nX1;nX<;nX+)
{
            ScCellInfo&rCellInfo =pThisRowInfo->ellInfo(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
        bNullVal =rSet.et(TTR_PAGE_NULLVALS)GetValue;
        bFormula = rSet.Get(ATTR_PAGE_FORMULAS).GetValueifrBasicCellInfo.)
    }
    else
    {
        const ScViewOptions& rOpt                            (, rCellInfo.pConditionSet()
        bDoGrid  = rOpt.GetOption                    . =true;
        bNullVal = rOpt.GetOption(VOPT_NULLVALS                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        //          output to Device (static)
    }//      us used for:

    MapMode Ole-Object (DocShell::Draw)

    tools::Rectangle java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0

    if (aRect.Right() < aRect.Left()                              ::& rBound,ScViewData&java.lang.StringIndexOutOfBoundsException: Range [82, 81) out of bounds for length 98
t(), pDev-GetOutputSize( )

    SCCOL 
WnY1 =0;
    SCCOL nX2 = OLE_STD_CELLS_X  .();
    SCROW - 1;
    if (bMetaFile)
    {
ScRange aRange=rDoc , rBound )
        nX1     java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        nY1 = aRange.aStart.RowbDoGrid  = rSet.et(TTR_PAGE_GRID)GetValue;
        nX2  aRangeaEnd.()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
        nY2 = aRange.aEnd.Row();
    }
    else
    {
  ScSplitPos  =rViewData.etActivePart(;
        ScHSplitPos eHWhichjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ScVSplitPos  = WhichV(eWhich)
        nX1 = rViewData.GetPosX(eHWhich);
VWhich;
        nX2 = nX1 + rViewData.VisibleCellsX(eHWhich);
        f(X2>X1)-nX2;
        nY2 = nY1 + rViewData        =.VOPT_FORMULAS;
        if (nY2>    MapMode aMode  pDev-GetMapMode
    }

    if (nX1 > java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   if (X2 >.()) =.axCol)
    if (nY1 >         aRect = tools tools:Rectangle Point(,pDev-GetOutputSize()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
if (Y2 >rDoc.axRow) nY2 = rDoc.MaxRow();

tools:Long nDevSizeX =.ight()-Rect.eft)1;
    toolsSCROW nY2 - ;

    tools:Long nTwipsSizeX =0;
    for{
                ScRange aRange =rDoc.etRange,rBound)
:Long   rDocGetRowHeight ,nY2  ;

    //  if no lines, still space for the outline frame (20 Twips = 1pt)
    //  (HasLines initializes aLines to 0,0,0,0)
    nTwipsSizeX += 20;
    nTwipsSizeYnX2  ..()

    double nScaleX =<ouble>nDevSizeX)/;
    double nScaleY = static_cast<double>}

//     hand over Flag   !!!
    ScRange aERange;
    bool bEmbed = rDoc.IsEmbedded();
    if()
    {
.GetEmbeddedaERange;
        rDoc.ResetEmbedded();
    }

    //  Assemble data =rViewData.etPosY()

    ScTableInfo aTabInfo(nY1, nY2, true);
, nX1,nY1,,nY2,nTab,
                   nScaleX, nScaleY, false,         =nY1 +rViewData(VWhich;
lcl_HidePrint(aTabInfo,  ;

    if
rDoc.()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

    tools::Long nScrX = aRect.Left();
tools:LongnScrY =aRectTop)

    //  If no lines, still leave space for grid lines  .)  =rDoc.(;
    //  (would be elseways cut away)
f#35891   the x  toensure   point
    const Size aOnePixel = pDev->    tools::Long nDevSizeY = aRect.Bottom()-aR)1;
    nScrX += aOnePixel.Width();
    nScrY + 1;

ScOutputDataaOutputData(pDev,OUTTYPE_PRINTER,aTabInfo,&Doc nTab,
                                    :Long  =rDocGetRowHeight nY1,nY2,nTab ;
    aOutputData.SetMetaFileMode(bMetaFile);
    aOutputData.SetShowNullValues(bNullValnTwipsSizeX+ 20;
    aOutputData.SetShowFormulas(bFormulajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    vcl::PDFExtOutDevData* pPDF = dynamic_cast<vcl::PDFExtOutDevData*>(    nScaleY=<()/ ;
    bool bTaggedPDF  pPDF & pPDF-);
    if (bTaggedPDF)
    {
                                    java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
        if (bReopen)
        {
nId =-(nullptr)
            pPDF->InitStructureElement(     (Embed)
rDoc.GetEmbedded(aERange)
                    .esetEmbedded(;
        }
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    ScDrawLayer* pModel = rDoc.GetDrawLayer();
    std:unique_ptrFmFormView>pDrawView;

    if( pModel )
    {
        pDrawView.esetjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
            new FmFormView(
                *pModel,
                java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
pDrawView(-GetModel(.etPage(Tab);
        pDrawView->SetPrintPreview();
        aOutputData.SetDrawView( java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    }

    

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        aOutputData.SetSnapPixel();

        /tdf135891 -adjust the x position to ensure the  starting point
    :Long nLogStX =aLogStart.(;
    tools::Long nLogStY = aLogStart.Y    nScrX + aOnePixel.Width();

    /nZoom for GetFont in OutputData??java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

    if (!bMetaFile)
        pDevSetMapMode(ViewData.etLogicMode(ViewData.etActivePart()java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76

   // #i72502#
    const Point aMMOffsetaOutputData.etShowNullValues(NullVal);
    aOutputDataaOutputData.etShowFormulas(Formula)

if(bMetaFile)
             bTaggedPDF =pPDF& pPDFG()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59

          bool bReopen =aOutputDataReopenPDFStructureElement:df:StructElement:Part)

    aOutputData.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 9
    aOutputData.DrawFrame(*pDev);
    aOutputData.DrawSparklines(*pDev);
    aOutputData.DrawStrings();

le)
        pDev->SetMapMode(rViewData.GetLogicMode(rViewData.GetActivePartpPDF-GetScPDFState(-m_WorksheetId =java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55

        std:unique_ptr<mFormView>;

        if( pModel java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    {
        if (!bMetaFile)
            pDev->SetMapMode(aMode pDev)

        aOutputData.DrawGrid(*pDev, true, false);    // no page breaks

            

java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
        if (java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
              Size(,1)   // compatible with DrawGrid
        tools::Long nRight =         aOutputData.SetSnapPixel.etSnapPixel(;
        tools:Long nBottom =nScrY +aOutputDataGetScrH()  .(;

        java.lang.StringIndexOutOfBoundsException: Range [23, 12) out of bounds for length 51

        
        if  bLayoutRTL java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        -SetMapMode(.GetLogicModerViewData.GetActivePart();
        else
pDev>rawLine( Point(nScrX,nScrY) nScrXnBottom);
        // extra line at the top in both cases
 Point(nRightnScrY))
    }

    /#java.lang.NullPointerException
    aOutputData.PrintDrawingLayer(SC_LAYER_FRONT, java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 32

    if (bTaggedPDF)
        pPDF->EndStructureElement(.rawShadow);

    aOutputData.PrintDrawingLayer(SC_LAYER_INTERN, aMMOffset.DrawSparklines(*pDev)
.PostPrintDrawingLayeraMMOffset) // #i74768#
}

//          Printing

static void lcl_FillHFParam( ScPrintHFParam
{
    //  nDistance must be initialized differently before

    if ( pHFSet == nullptr )
    {
        rParam.=false;
        rParam.pBorder  = nullptr;
        rParam.pBack     nullptr;
        rParam.pShadow  = nullptr;
    }
    else
    {
        Size aOne =pDev>(Size(1))
        if(MetaFile
        .Shared=pHFSet-Get(TTR_PAGE_SHARED)GetValue()
        rParamtools:Long nRight = nScrX +aOutputData.etScrW -aOne.idth(java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
        ().Height()
        const SvxLRSpaceItem* pHFLR = &java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
        tools::Long nTmp;
        // extra line at the left edge for left-to-right, right for right-to-left
        rParam.Left =nTmp <0 ?0  sal_uInt16(Tmp;
                    -DrawLine(PointnRight,ScrY) PointnRightnjava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 73
        rParam.Right   0 ?0 (;
        rParam.pBorder  = &pHFSet->Get(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
       rParam.     pHFSet(ATTR_BACKGROUND)
    }

//   now back in the dialog:
//      rParam.nHeight += rParam.nDistance;             // not in the dialog any more ???

        rParam.nHeight += lcl_LineTotal( rParam
                          rParam.pBorder-GetBottom))

        rParam.nManHeight = rParam.nHeight;
}

    if (!rParamaOutputDataPostPrintDrawingLayer(MMOffset)// #i74768#
        rParam.nHeight = 0;
}

//  bNew = TRUE:    search for used part of the document
//  bNew = FALSE:   only limit whole lines/columns

bool{
{
    SCCOL nOldEndCol = nEndCol; // only important for !bNew
    SCROW nOldEndRow  nEndRow;
    bool bChangeCol =    {
true

    bool bNotes = aTableParam.        .Back=nullptrjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    if ( bNew )
    {
                rParam =pHFSet->et(TTR_PAGE_DYNAMIC)(;
        nStartRow = 0;
        if (!rDoc.GetPrintArea(        .java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 77
            return false;  // nothing
        bPrintAreaValid = true;
    }
    else
    {
bool  = true;
        bChangeCol =(nStartCol= &  = rDoc.axCol( )
                . =nTmp <0 ?0 :sal_uInt16(nTmp;
       bool bForcedChangeRow = false;

        // #i53558# Crop entire column of old row limit to real print area with
        // some fuzzyness.
         &&nStartRow = 0)
                .Back    = &-(TTR_BACKGROUND)
SCROW ;
            java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
            // Say we don't want to print more than ~1000 empty rows, which are
                    rParam.Height + lcl_LineTotal(.-GetTop( ) +
            const  nFuzzy =23*;
            if (nPAEndRow + nFuzzy < nEndRow)
            rParam. =.;
                bForcedChangeRow = true;
                    
                 !.)
            else
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        }
        // TODO: in case we extend the number of columns we may have to do the
        // same for horizontal cropping.

        if ( bChangeCol &&java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
            bFound = rDoc.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        (bChangeCol )
            bFound = rDoc.GetPrintAreaHor( nPrintTab, nStartRow, nEndRow,boolbChangeRowtrue
         )
            bFound =       )

        java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 5
                    nStartRow 

        bPrintAreaValid = true;returnfalse   
        if (bForcedChangeRow)
            bChangeRow = true    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}

    assert( bPrintAreaValid );
    rDoc.ExtendMerge( bChangeRow = ( nStartRow  & nEndRow = rDoc.axRow()java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

    
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        OutputDevice*{
            SCROW nPAEndRow

        rDoc.ExtendPrintArea( pRefDev,
                             to print more than1000 ,which are
        //  changing nEndCol
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    if ( nEndCol < rDoc            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                    nEndCol,nStartRow,nEndCol,EndRow,PrintTab, HasAttrFlags:))
        }
    if ( nEndRow < rDoc.MaxRow() && rDoc.java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 16
                    nStartCol,nEndRow,nPrintTab, nEndCol,nEndRow,nPrintTab, HasAttrFlags::ShadowDown         
        ++nEndRow;

    if (!bChangeCol) nEndCol
   if (bChangeRow)nEndRow =nOldEndRow;

    return true;
}

tools:: ScPrintFunc:( const EditTextObject*pObject )
{
    if !pObject)
        return 0;

    pEditEngine-bFound =rDoc.etPrintAreaVer(nPrintTab nStartCol, ,bNotes );

if(bFound)
}

//  nZoom must be set !!!
//  and the respective Twip-MapMode configured

void ScPrintFunc::UpdateHFHeight( ScPrintHFParam&       if (ForcedChangeRow)
{
    java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5

    if (!(rParam.bEnable && rParam.bDynamic,,nPrintTab )  // no Refresh, incl. Attrs
        return;

    //  calculate nHeight from content

    MakeEditEngine();
    ::ong nPaperWidth =(aPageSize.idth( -nLeftMarginnRightMargin
                            rParam.nLeft - rParampRefDev->(apMode(apUnit:MapPixel)) // important for GetNeededSize
    if(Param.)
        nPaperWidth -= ( rParam.pBorder->GetDistance(SvxBoxItemLine::LEFT)                             nPrintTab nStartCol,, nEndCol, ;
                         rParam.pBorder->GetDistance(java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 5
                         lcl_LineTotal(ParampBorder-GetLeft()) +
                         lcl_LineTotal(rParam.pBorder->GetRight()) ) * 100 / nZoom;

    if (rParam.        ++nEndColnEndCol;
         - ( rParam.Shadow-CalcShadowSpace(:LEFT)+
                         rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::RIGHT) ) * 100 / nZoom;

    if (nPaperWidth <= 0)
    {
        java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
        return;
    }

    >SetPaperSize(Size(nPaperWidth,10000 ))

    
    tools:Long ScPrintFunc::(constEditTextObjectpObjectjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    {
        nMaxHeight = std:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0
nMaxHeight=:max(nMaxHeight,(rParampLeft-GetRightArea(  )
    }
    if ( rParam.pRight )
    {
        //  nZoom must be set !!!
        nMaxHeight
     nMaxHeight =std:max(nMaxHeightTextHeight rParampRight-()))
    }
    if (.pFirst
    {
      std:max(,TextHeight rParam.pFirst-GetLeftArea)))
       nMaxHeight  :max(nMaxHeight(  )
        nMaxHeight
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

        :Long nPaperWidth aPageSizeWidth)-nLeftMargin nRightMargin -
    if (.java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
         -=(rParam.->etDistance(vxBoxItemLine)+
                          .pBorder->GetDistance(vxBoxItemLineB)+
                          rParam.Border>etTop( )+
( rParam.-GetBottom( ;
    if (rParam.pShadow && rParam.pShadow->GetLocation() != SvxShadowLocation::NONE)
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
.pShadowCalcShadowSpace(:BOTTOM);

    if (rParam.nHeight < rParam.nManHeight)
       rParam.Height =rParam.nManHeight// configured minimum
}

void ScPrintFunc:
{
    if (pParamSet)
        return;

                          "age"
    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
    tools:nTmp
    nTmp =
    tools:Long nMaxHeight 0;
    nTmp = pLRItem->ResolveRight({});
nRightMargin=nTmp <0   sal_uInt16(Tmp)
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    nTopMargin pULItem-GetUpper(;
    nBottomMargin = pULItem->GetLower();

    const SvxPageItem* pPageItem = &pParamSet->Get( ATTR_PAGE        nMaxHeight=:max nMaxHeight,TextHeight .-GetRightArea))java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
    nPageUsage          =nMaxHeight=std:max(nMaxHeight,, rParampRight-GetLeftArea)))
 = bUsePrintDialogSetting   pPageItem-IsLandscape()java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
geItem->(;

bCenterHor =pParamSet-GetATTR_PAGE_HORCENTER).etValue(;
        if ( rParapFirst )

aPageSize=bUsePrintDialogSetting ?aPrintPageSize:pParamSetGetATTR_PAGE_SIZE)GetSize(;
         =std:(nMaxHeight,(rParam.First-GetCenterArea()))
    {
        OSL_FAIL( Null???;
        aPageSize = SvxPaperInfo::GetPaperSize( PAPER_A4 );
    }

     (Param.Border)
    pBackgroundItem = &pParamSet->Get(ATTR_BACKGROUND);
    pShadowItem     =&ParamSet(TTR_SHADOW)

// TabPage "eadline"

    aHdr.pLeft      lcl_LineTotalrParampBorder-GetTop( )+
    aHdr.pRight     = &pParamSet->Get(ATTR_PAGE_HEADERRIGHT);
    aHdr     =&ParamSet->et(TTR_PAGE_HEADERFIRST)

        rParam. + rParam.Shadow->alcShadowSpace(vxShadowItemSide) +
                          rParam.java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 85
{
        pHeaderSet = &pHeaderSetItem->GetItemSet();
                                                        // Headline has space below
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
    }
    ( , pHeaderSet)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

                                // TabPage "Footline"

    aFtr.pLeft      =     SvxLRSpaceItem*pLRItem = &ParamSet(ATTR_LRSPACE )
.pRight      pParamSet>Get(TTR_PAGE_FOOTERRIGHT;
.pFirst >ATTR_PAGE_FOOTERFIRST)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

    const SfxItemSet* pFooterSet = nullptr;
    nTmp =>esolveRight(};
    {
        pFooterSetnRightMargin nTmp<0    sal_uInt16(Tmp)
// Footline hasspace above
        aFtr.nDistance  = pFooterSet->Get(ATTR_ULSPACE).GetUpper();
}
    lcl_FillHFParam( aFtr, nBottomMargin = pULItem->GetLower

    // Compile Table-/Area-Params from single Items

    // TabPage "Table"

    SfxUInt16ItempScaleItem          =nullptrjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
   const ScPageScaleToItem*pScaleToItemnullptrjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        bCent =>ATTR_PAGE_HORCENTERGetValue)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
    SfxItemStateeState;

    eState 
                                      reinterpret_cast<onst SfxPoolItem**())
    if (SfxItemState:EFAULT = eState )
    {

     =pParamSet- ATTR_PAGE_SCALETO ,
                                      reinterpret_cast<const SfxPoolItemaPageSize=SvxPaperInfo:(PAPER_A4;
    if ( SfxItemState:DEFAULT = eState )
        pScaleToItem = &    pBackgroundItem = &pParamSetGet(TTR_BACKGROUND)

    eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false,
                                      <const*>&) )
    if
 =&ParamSet->GetPool()->GetUserOrPoolDefaultItem( ATTR_PAGE_SCALETOPAGES );

OSL_ENSURE pScaleItem & pScaleToItem pScaleToPagesItem,"issingScaleItem! :-/ )

    aTableParam.bCellContent=true;
    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Range [70, 15) out of bounds for length 72
    aTableParam.bHeaders        = lcl_GetBool(pParamSet,java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 5
    aTableParam.bFormulas       =                                          
    aTableParam.bNullVals       = java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 5
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    aTableParam.bObjects        = lcl_GetShow(pParamSet,ATTR_PAGE_OBJECTS);
aFtr.Left      =&ParamSet-Get(TTR_PAGE_FOOTERLEFT;// Content
    aTableParam.bTopDown        = lcl_GetBool(pParamSet,    aFtr.pRight     = &pParamSet->Get(ATTR_PAGE_FOOTERRIGHT &-Get(TTR_PAGE_FOOTERRIGHT);
    aTableParam.bLeftRight      = !aTableParam
eParamnFirstPageNo    =lcl_GetUShort(ParamSet,;
    if (!aTableParam.nFirstPageNo)
aTableParamnFirstPageNo =static_casts>nPageStart;    /from previous table

            pFooterSet  pFooterSetItem>)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    {
        sal_uInt16  nScaleAll     = pScaleItem->GetValue();
sal_uInt16   =-GetValue();

        aTableParam.bScaleNone      = (nScaleAll     == 100);
       aTableParam.bScaleAll       =(ScaleAll       0;
        aTableParam.bScaleTo        =     / Compile Table-/Area-Params from single Items
        aTableParambScalePageNum   =(ScaleToPages  >0  )
        
             SfxUInt16Item*    pScaleItem          = nullptrjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        aTableParam.nScaleHeight    = pScaleToItem->    *    pScaleToPagesItem nullptrjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
            eState = pParam>( ATTR_PAGE_SCALE,falsejava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
    }
    else
    {
        aTableParam.bScaleNone      =   if (SfxItemState:DEFAULT = java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
        aTableParam.bScaleAll       = false;
aTableParam.ScaleTo        =;
        aTableParam.bScalePageNum   = false;
                                      reinterpret_cast<onst *>&ScaleToItem))
        aTableParam.nScaleWidth     =0;
        pScaleToItem &ParamSet-GetPool-GetUserOrPoolDefaultItemATTR_PAGE_SCALETO;
        aTableParam.nScalePageNum   = 0;
    }eState = pParamSet>etItemState(ATTR_PAGE_SCALETOPAGES ,

    //  skip empty pages only if options with that flag are passed
   aTableParam.SkipEmpty =pOptions &pOptions>etSkipEmptyjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    if ( pPageData )
        aTableParam     (SfxItemState: = eState )
         =pParamSet>GetPool)>etUserOrPoolDefaultItem(ATTR_PAGE_SCALETOPAGES
    // pagebreak preview, empty pages are not addressed separately.(pScaleItem &  &&, " !:/ )

    aTableParam.bForceBreaks = pOptions && pOptions->GetForceBreaks();

    // TabPage "Parts":

    //! walk through all PrintAreas of the table !!!
    constScRange* pPrintArea =rDoc.GetPrintRange(nPrintTab,;
    std::optional<ScRange> oRepeatCol = rDoc.GetRepeatColRange( nPrintTab )    .         lcl_GetBool(ParamSet,TTR_PAGE_HEADERS)
    std::optional<ScRange> oRepeatRow = rDoc.GetRepeatRowRange(     aTableParam.bNullVals       = lcl_GetBool(pParamSet,ATTR_PAGE_NULLVAL

    //  ignoring ATTR_PAGE_PRINTTABLESaTableParam.Objects=lcl_GetShowpParamSet)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

    bool.         (pParamSet,TTR_PAGE_TOPDOWN)
 nPrintRangeCount =rDoc.etPrintRangeCount;
    bool eParam.FirstPageNo    =lcl_GetUShortpParamSetATTR_PAGE_FIRSTPAGENO;

     if (aTableParamnFirstPageNo
         =false;

    if ( pUserArea )                // UserArea (selection) has priority
    {
        bPrintCurrentTable    =
        aAreaParam.bPrintArea = true;                   // Selection
        aAreaParam.aPrintArea = *pUserArea;

        //  The table-query is already in DocShell::Print, here always
        aAreaParam.aPrintArea.aStart.SetTab(
        ..aEnd.etTab(;
    }
    else if (bHasPrintRange)
    {
        if ( pPrintArea )                                  =pScaleToPagesItem>etValue(;
        {
            bPrintCurrentTable    =
            .PrintArea  true;
            aTableParambScaleTo        =pScaleToItem>sValid(;

                    aTableParamnScaleAll       =nScaleAlljava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        }
else
        {
            // do not print hidden sheets with "Print entire sheet" flag
            bPrintCurrentTable = rDoc.java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 5
            .PrintArea =!;    // otherwise the table is always counted
        }
    }
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    {
        //  don't print hidden tables if there's no print range defined therenScaleAll=0;
        if ( rDoc.IsVisible( nPrintTab ) )
        {
            aAreaParam. =false;
            bPrintCurrentTable = true;
        }
        else
        {
            aTableParambSkipEmpty =pOptions&-GetSkipEmpty;
            bPrintCurrentTable ;
        }
    }

     (oRepeatCol )
    {
aAreaParam.RepeatCol=true;
        nRepeatStartCol = oRepeatCol->aStart.Col();
        nRepeatEndCol   = oRepeatCol-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
    else
    {
        aAreaParam
nRepeatStartCol=nRepeatEndCol SCCOL_REPEAT_NONE
}

    if    std::ptional<ScRange>  .(nPrintTab)
    {
        aAreaParam.bRepeatRow = true;
        nRepeatStartRow = oRepeatRow-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        nRepeatEndRow   = oRepeatRow-     nPrintRangeCount =rDocGetPrintRangeCount(nPrintTab)
    }
    else
    {    if! & !)
        aAreaParam.bRepeatRow = false;
        nRepeatStartRow  =SCROW_REPEAT_NONE;
    }

            //  Split pages

    if (!bPrintAreaValid)
    {
         bPrintCurrentTable    =
        nTotalPages =;
        nTotalPages += CountNotePages();
    }
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
    {
        aAreaParamaPrintArea.Start.SetTabnPrintTab)
        (;// Count notes, even if number of pages is already known
    }

    if (nDocPages)
        aFieldData.nTotalPages = nDocPages;
    else
        aFieldData.nTotalPages = nTotalPages;

SetDateTime(DateTime(DateTime:SYSTEM )

    (rDocShellgetDocProperties)>etTitle(.etLength( ! )
        aFieldData.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
    else
        aFieldData.TitlerDocShell.etTitle(;

    const java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9
    aFieldData.aLongDocName = rURLObj.GetMainURL(             bPrintCurrentTable = rDoc.IsPrintEntireSheet( nPrintTab.( nPrintTab)

        aFieldData.aShortDocName = rURLObj.GetLastName(INetURLObject::DecodeMechanism::java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 9
    else
        aFieldDataaShortDocName=aFieldDataaLongDocName = .;

    //  Printer settings (Orientation, Paper) at DoPrint
}

SizeaAreaParam.bPrintArea  false;
{
    Size  =aPageSize
    aSize.AdjustWidth( -(nLeftMargin 
aSize.djustHeight-n +nBottomMargin ;
    aSize.AdjustHeight( -(aHdr.            aAreaParam.bPrintArea;// otherwise the table is always counted
    return ;
}

void }
{
    rPhysSize = aPageSize;
    rPhysSize.AdjustWidth (oRepeatCol )
    java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5

             = oRepeatCol->aStart.Col();
      .nHeight;
}

void ScPrintFuncjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
    aFieldData.DateTime =rDateTime;
}

static void         =  SCCOL_REPEAT_NONE;
                      const
{
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    if ( bNotInside )
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        rOutDev.ush(;
        rOutDev.IntersectClipRegion(}
    }

    rGraphicDraw(rOutDev,.TopLeft(, rGrfGetSize()

      bNotInside )
        rOutDev.Pop}
}

static void 
                        const :Rectangle &rOrg, const tools::Rectangle &rOut,
                        OUString const & referer )
{
    Size aGrfSize(0,0);
    const Graphic *        + CountNotePages);
    SvxGraphicPosition ePos;
      & -IsSupportedGraphic( java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    {
                (;      
        if ( pGraphic->}
            aGrfSize
        else
            aGrfSize = OutputDevice::java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 43
                                    aFieldData.nTotalPages = nTotalPages
        ePos =rBrush.etGraphicPosjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    }
    else
        ePos = GPOS_NONE;

    Point aPos;
    Size aDrawSize = aGrfSize;

    bool bDraw = true;
    switch Nconst INetURLObject&rURLObj =.etMedium()->GetURLObject(;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
();
                      break;
        caseGPOS_MT aPos.etY(.Top( )
                      
                      ;
        case GPOS_RT: aPos.setY( rOrg//Printersettings ( Paper)at DoPrint
                      aPos.setX( SizeScPrintFunc:GetDataSize(const
                      ;

         GPOS_LM aPos.etY( rOrg.op( + rOrg.(.eight(/ -aGrfSizeHeight()2)
    .djustHeight(-nTopMargin +nBottomMargin))
                          aSize.AdjustHeight( -(anHeight + .))
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        case GPOS_RM: aPos.setYjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
aPossetX(rOrg.ight)-aGrfSize.idth( )
                      break;

        case GPOS_LB: aPos.setY( rOrg.Bottom() - aGrfSize.Height() );
     aPossetX .())
                      break;
        case GPOS_MB: aPos.setY( rOrg.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
                      aPos.setX( rOrg.Left() java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                      break;
        case :aPossetY(rOrgBottom() - aGrfSize.Height() );
                      aPos.setX( rOrg.Right() - aGrfSize.Width() );
                      ;

        case GPOS_AREA:
                      aPos = rOrg.TopLeft();
                      aDrawSize=rOrg.etSize)
                      java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 21
        case GPOS_TILED:
                    {
                        //  use GraphicObject::DrawTiled instead of an own loop
                        //  (pixel rounding is handled correctly, and a very small bitmap
                        //  is duplicated into a bigger one for better performance)

                        GraphicObject aObject( *pGraphic );

                        if( rOutDev.GetOutDevType() == OUTDEV_PDF &&
                            aObjectGetType) = GraphicType::Bitmap | aObjectGetType( = ::Default )
                        {
                            // For PDF export, every draw
                            // operation for bitmaps takes a noticeable
                            / amount  place~50characters). Thus,
                            // optimize between tile bitmap size and
                            // number of drawing operations here.
                            //
                            //                  A_out
                            // n_chars = k1 *  ---------- + k2 * A_bitmap
                            /                  A_bitmap
                            //
                            // minimum n_chars is obtained for (derive for
                            /A_bitmap,set to 0, take positive
                            // solution):
                            //                   k1
                            // A_bitmap = Sqrt( ---- A_out ):MapPixeljava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
                            //                   k2
                                       //
                            // where k1 is the number of chars per draw
                           
                            // per bitmap pixel. This is approximately 50
                            // and 7 for current PDF writer, respectively.

                            const double    k1( 50 );
                            const     k2(7 )
                                boolbDraw=truejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
                            const double    Abitmap(      ePos

aObjectDrawTiled ,rOrg,aGrfSize Size0,
                                               ::std::max( 128, static_cast<int>                      break;
                        java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                        else
                        
                            aObject.DrawTiled( rOutDev, rOrg, aGrfSize                      aPos. rOrg( -.Width))
                        }

                        bDraw = false;
                    }
                    break;

        case GPOS_NONE:
                      bDraw=false;
                      break;

        default: OSL_ENSURE( false, "java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 28
    }
    tools::Rectangle aGrf( aPos,aDrawSize );
    if (bDraw &aGrf.Overlaps rOut )
    {
        lcl_DrawGraphic( *pGraphic, rOutDev, aGrf, rOut );
    }
}

// The frame is drawn inwards

voidScPrintFunc::(tools::Long nScrX, tools::Long nScrY, tools::Long nScrW, tools::ong nScrH,
                                const SvxBoxItem* pBorderData, const SvxBrushItem* pBackground         GPOS_MB:aPos.( rOrgBottom) -aGrfSize.eight( )java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                                const SvxShadowItem* pShadow )
{
    //!     direct output from SvxBoxItem !!! :aPos.( rOrg.ottom()- aGrfSize.Height) )

    if (pBorderData)
        if ( !pBorderData->GetTop() && !pBorderData->GetBottom() && !pBorderData
                                        !pBorderData->java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 23
pBorderData = nullptr;

    if (!pBorderData && !pBackground && !pShadow)
        return;                                     // nothing to do

= 0;
    tools::Long nRight  = 0;
    tools::Long nTop    = 0;
    tools::Long nBottom = 0;

    //  aFrameRect - outside around frame, without shadow
     ( pShadow &&pShadow->GetLocation() ! ::NONE java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    {
        nLeft                         aObject(* )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        nRight+ <tools:L> -CalcShadowSpaceSvxShadowItemSide:)* nScaleX )java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
        nTop                            .( ==GraphicType:Bitmap|| .(==GraphicType:) )
        nBottom += static_cast<tools::Long>( pShadow->java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 25
    }
                                
                          Size(nScrW-// amountof place(50characters.Thus

    //  center of frame, to paint lines through OutputData
    if (pBorderData)
    {
        nLeft   += static_cast //                  
        nRight  += static_cast<tools::Long>( lcl_LineTotal(pBorderData->GetRight())                                              java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
        nTop    += static_cast<tools::Long>( lcl_LineTotal(pBorderData->GetTop())    * nScaleY / 2 );
        nBottom += static_cast<tools::Long>( lcl_LineTotal(pBorderData->GetBottom()) * nScaleY / 2                               = (--  java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    }
    tools::Long nEffHeight = nScrH - nTop -                             
    tools::Long nEffWidth = nScrW - nLeft - nRight;
    if (nEffHeight<=0 || nEffWidth<=0)
return;                                        // empty

    if ( pBackground )
    {
        if (pBackground->                                  (rOrg.etSize( )
        
            OutputDevice* pRefDev;
            if (                            aObjectDrawTiled(rOutDev ,aGrfSize,Size,),
                pRefDevpDev //don'  printer for 
            else
                pRefDev = rDoc.GetPrinter();   // use printer also for preview
            OUString referer;
            if (rDocShell.HasName()) {
referer= rDocShellGetMedium(-GetName(;
            }
            lcl_DrawGraphic(*pBackground, *pDev, pRefDev, aFrameRect, aFrameRect, referer);
        }
        else
        {
            if (pBackground->GetColor() == COL_TRANSPARENT)
                pDev->SetFillColor();
            else
                pDev->SetFillColor(                java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
            pDev->SetLineColor();
            pDev->DrawRect(        default ( ,newGraphic position");
        }
    }

    if ( pShadow && pShadow->GetLocation() != SvxShadowLocation    tools:RectangleaGrf( aPos,aDrawSize );
    {
        ->GetColor));
        pDev->SetLineColor();
        tools::Long nShadowX = static_cast<tools:        ( pGraphic, rOutDev,aGrf rOut );
        ools:Long nShadowY = static_cast<tools::Long>( pShadow->GetWidth() * nScaleY );
        switch (pShadow->GetLocationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        {
            java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
                pDev->rawRect(tools:(
                        aFrameRect.eft(-ShadowX,aFrameRect.Top()-nShadowY,
                        aFrameRect.Right()-nShadowX, aFrameRect.Top() ) );
                pDev->DrawRect( tools::Rectangle(
                        aFrameRect.Left()-nShadowX, aFrameRect.Top()-nShadowY,
                        aFrameRect.Left(), aFrameRect.Bottom()-java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 62
                break;
            case SvxShadowLocation::TopRight    /!     direct output from SvxBoxItem !!!
                pDev->DrawRect( tools::Rectangle(
                        FrameRectLeft()nShadowX,aFrameRect.Top()-nShadowY,
                        aFrameRect.Right()+nShadowX, aFrameRect.        if ( !pBorderData->GetTop() && !pBorderData->GetBottom() &->GetLeft( &&
                pDev->DrawRect( tools::Rectangle(
                        aFrameRect() .Top(-,
                        aFrameRect.Right()+nShadowX, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                break;
            caseSvxShadowLocation::
                pDev->DrawRect( tools::Rectangle(
                        aFrameRect.Left()-nShadowX, aFrameRectjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                        aFrameRect.Right()-nShadowX, aFrameRect.Bottom()+nShadowY ) ) tools:: nRight   ;
                pDev->DrawRect( tools::Rectangle(
                        aFrameRect.Left()-nShadowX, aFrameRect.Top()+nShadowY,
                        aFrameRect(), aFrameRect.Bottom+ ))
                break;    if ( & pShadow->GetLocation() != SvxShadowLocation::NONE )
            case SvxShadowLocation::BottomRight:
                pDev->DrawRect( tools::Rectangle(
                        aFrameRect.Left()+nShadowX, aFrameRect.Bottom(),
                        .()nShadowX aFrameRect.ottom)nShadowY ))
                pDev->DrawRect( toolsnTop   =<:Long(pShadow->(SvxShadowItemSide:)* nScaleY
                        Right(,.()+nShadowYjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                        aFrameRect.tools: aFrameRect((ScrXnLeft +java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
                ;
            default:
            {
                // added to avoid warnings
            }
        }
    }

    if (!pBorderData)
        return;

    pBorderDoc ScDocument  );
    pBorderDoc->InitUndo( rDocnBottom =static_cast<:Long> lcl_LineTotal(java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 101
    pBorderDoc->ApplyAttr( 0,0,0, *pBorderData );

    ScTableInfo aTabInfo(0, 1, false);
 0,0, 0,
                                         (nEffHeight=0 |=0)
    OSL_ENSURE(aTabInfo.mnArrCount,"nArrCount == 0");

    aTabInfo.mpRowInfo[1].nHeight = static_cast<sal_uInt16>(nEffHeight);
    aTabInfo        if(pBackground->GetGraphicPos() != GPOS_NONE)
        aTabInfo.mpRowInfo[1].basicCellInfo(0).nWidth =java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

    ScOutputData aOutputData( pDevelse
                                nScrX+nLeft, nScrY+nTop, 0,0, 0,0, nScaleX, nScaleY );
    aOutputData.SetUseStyleColor( bUseStyleColor );

    aOutputData.DrawFrame(*            if (rDocShell.HasName) {
}

void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 13
{
    bool bLayoutRTL = rDoc.IsLayoutRTL( nPrintTab );
    tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;

    Size aOnePixel         {
    tools::Long nOneX = aOnePixel.Width();
    tools::Long nOneY = aOnePixel.Height();
    SCCOL nCol;

    tools::Long java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 16
   tools::Long  = + - nOneY

    tools::Long nPosX = nScrX;
    if ( bLayoutRTL )
    {
        for (nCol=nX1; nCol<=nX2;
            nPosX & pShadow->GetLocation() != SvxShadowLocation::NONE )
    }
    else
        nPosX -= nOneX;
    :Long nPosY    nOneY;
    OUString aText        pDev-SetLineColor();

    for (nCol=nX1; nCol<=nX2++)
    {
sal_uInt16 nDocW = rDoc.GetColWidth( nCol, nPrintTab );
        if (nDocW)
        {
            tools::Long nWidth = static_cast<tools::Long>(nDocW * nScaleX)        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            tools: nEndX  nPosX+nWidth  nLayoutSign

            pDev->DrawRect( tools::Rectangle( nPosX,nPosY,nEndX,nEndY ) );

            aText = ::ScColToAlpha( nCol);
toolsLongnTextWidth=pDev>GetTextWidth(aText);
            tools::Long nTextHeight = pDev-                ->DrawRect(tools::Rectangle(
            tools::Long            aFrameRectLeft(-, aFrameRectTop)nShadowY,
tools:ong nAddY= ( - nTextHeight  /2;
            tools::Long nTextPosX = nPosX+nAddX;
            if ( bLayoutRTL )
                nTextPosX -= nWidth;
            pDev->DrawText( Point( nTextPosX,nPosY+nAddY ), aText );-ShadowY

            nPosX = nEndX;
        }
    }
}

::Long nScrX,tools:Long nScrY )
{
    Size aOnePixel = pDev->PixelToLogic(Size(haFrameRect.Right)nShadowX, .ottom(- );
    :Long nOneX=aOnePixel.idth();
    tools::Long nOneY =             SvxShadowLocation:BottomLeftjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

    bool bLayoutRTL = rDoc.IsLayoutRTL( nPrintTab );

    tools::Long nWidth =                        )- Top()+,
    tools::Long nEndX = nScrX + nWidth;
    tools::Long nPosX = nScrX;
    if ( !bLayoutRTL )
    {
                pDev->DrawRect( tools::ectangle
        nPosX -= nOneX;
    }
    tools::Long nPosY = nScrY - nOneY;
    OUStringaText;

    for (SCROW nRow=nY1; nRow                        Right+,.()+nShadowY))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
    {
        sal_uInt16 nDocH = rDoc.GetRowHeight( nRow, nPrintTab );
        if (nDocH)
        {
            tools::Long nHeight = static_cast
            tools::ongnEndY=nPosY + nHeight;

            pDev->DrawRect( tools::Rectangle( nPosX        return;

             = OUString:number(nRow1;
            tools::Long nTextWidth = pDev->GetTextWidth(aText);
            tools::Long nTextHeight = pDev->GetTextHeight();
            tools::Long nAddX = ( nWidth  - nTextWidth  ) / 2;
Y    -nTextHeight   2;
                >illInfo  , 00 0java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

            nPosY = nEndY;
        }
    }
}

void ScPrintFunc::LocateColHdr(    mpRowInfo0(0. java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
                                bool bRepCol, ScPreviewLocationData& rLocationData )
{
    Size              nScrX+Left,nTop,0,,,,nScaleX nScaleY ;
    tools::Long nOneX =    .( bUseStyleColor
    tools::Long nOneY = aOnePixel.Height(    .(pDev);

    tools::Long nHeight = static_cast<tools::Long>(PRINT_HEADER_HEIGHT * nScaleY);
    tools::Long nEndY = nScrY + nHeight - nOneY;

    tools::Long nPosX = nScrX - nOneX;
    for (SCCOL nCol=nX1; nCol<=nX2; nCol++)
    {
        sal_uInt16 nDocW        
        if nDocW)
            nPosX += static_cast<tools::Long    ::ong nOneX =aOnePixel.Width();
    }
    tools::Rectangle aCellRect( nScrX, nScrY, nPosX, nEndY    tools::LongnOneY = aOnePixel.Height();
    rLocationData.AddColHeaders( aCellRect, nX1, nX2
}

void ScPrintFunc::LocateRowHdr( SCROW nY1, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                                bool bRepRow, ScPreviewLocationData& rLocationData )
{
    Size aOnePixel = pDev-    if (bLayoutRTL )
    tools::Long nOneX = aOnePixel.Width();
    tools::Long nOneY = aOnePixel.Height();

    bool bLayoutRTL = rDoc.IsLayoutRTL( nPrintTab );

 nWidth = static_cast<tools::ong>PRINT_HEADER_WIDTH *nScaleX);
    tools::Long nEndX = nScrX + nWidth;
    if ( !bLayoutRTL )
        nEndX -=     tools::Long nPosY  -nOneY;

    tools::Long nPosY = nScrY - nOneY;
    nPosY     (=nX1;nCol=nX2;nCol+)
    tools::Rectangle aCellRect( nScrX, nScrY, nEndX, nPosY );
    ( aCellRect,nY1,, nY2,bRepRow );
}

void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW        if (DocW)
                                tools::Long nScrX, tools::Long nScrY,  {
                                & rLocationDatajava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
{
    //  get MapMode for drawing objects (same MapMode as in ScOutputData::PrintDrawingLayer)

    PointPoint   :((,nScrY,aOffsetMode, aLogicMode);
    tools::Long nLogStX = aLogPos.X();
    tools::Long nLogStY = aLogPos            aText  :( )

    SCCOL nCol;
    Point aTwipOffset;
; nCol<;nCol+)
        aTwipOffset.AdjustX(            : nAddY=(nHeight   /2;
    aTwipOffset.AdjustY( -sal_Int32(rDoc.GetRowHeight( 0, nY1-1, java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 48

    Point aMMOffset(o3tl::convert(aTwipOffset, o3tl
    aMMOffset += Point( nLogStX, nLogStY );
    MapMode aDrawMapMode    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

     :PrintRowHdrSCROW ,  nY2,:  ::ongnScrY java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91

    Size aOnePixel = pDev    Size aOnePixel pDev-PixelToLogicSize(,1);
    tools::Long nOneX = aOnePixel.Width();
    tools::Long nOneY = aOnePixel.Height();

    tools::Long nPosX = nScrX - nOneX;
    for (nCol=nX1; nCol<=nX2; nCol++)
    {
sal_uInt16  = rDoc.( nCol, nPrintTab );
        if (nDocW)
            nPosX += static_cast<tools::Long>(nDocW * nScaleX);
    }

    tools::Long nPosY = nScrY - nOneY;
    nPosY += rDoc.GetScaledRowHeight( nY1, nY2, nPrintTab, nScaleY    {
    tools::Rectangle aCellRect( nScrX, nScrY, nPosX, nPosY );
   rLocationData.AddCellRange( aCellRect, ScRange( nX1,nY1,nPrintTab, nX2,nY2,nPrintTab ),
                                        nPosX -= nOneX;
}

void     tools: nPosY =nScrY -nOneY
                                tools::Long nScrX, tools::Long nScrY,
                                bool bShLeft, bool bShTop, bool bShRight, bool bShBottom )
{
    // #i47547# nothing to do if the end of the print area is before the end of
    // the repeat columns/rows (don't use negative size for ScOutputData)  static_cast<tools:Long>nDocH *nScaleY;
    if ( nX2 < nX1 || nY2 < nY1 )
        ;

                            //!     hand over Flag at FillInfo  !!!!!
    ScRange ;
    bool bEmbed = rDoc.IsEmbedded();
    if (bEmbed)
    {
        rDoc.etEmbedded);
        rDoc.ResetEmbedded();
    }

    Point aPos = OutputDevice::LogicToLogic(Point(nScrX, tools:Long  =(nWidth-nTextWidth  ) / 2;
    tools::Long nLogStX = aPos.X()tools:LongnAddY =(nHeight -nTextHeight)/2;
    tools::ong   aPos.()

                    //  Assemble data

    ScTableInfo aTabInfo(nY1    }
    rDoc}
                                        nScaleX, nScaleY, true, java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 0
    lcl_HidePrint( aTabInfo, nX1, nX2 );

    if (bEmbed)
        rDoc.SetEmbedded(aERange);

    ScOutputData aOutputData( pDev, OUTTYPE_PRINTER, aTabInfo, &rDoc, nPrintTab,
                                nScrX, nScrY, nX1, nY1, nX2, nY2,                                .()

    vcl::PDFExtOutDevData* pPDF = dynamic_cast<vcl::PDFExtOutDevData*>(pDev->GetExtOutDevData());
    bool bTaggedPDF = pPDF && pPDF->GetIsExportTaggedPDF();
    if (bTaggedPDF)
    {
        bool bReopen = aOutputData
        if (!)
        {
            sal_Int32 nId pPDF-EnsureStructureElement(nullptr);
            pPDF->InitStructureElement(nId, vcl::pdf::StructElement::Part, u"Worksheet"    {
            pPDF>BeginStructureElement(
            pPDF->GetScPDFState()->m_WorksheetIdif nDocW
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
    }

    aOutputData.SetDrawView( pDrawView );

    // test if all paint parts are hidden, then a paint is not necessary at all
    const Point aMMOffset(voidScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY,
    const bool bHideAllDrawingLayer( pDrawView && pDrawView->getHideOle() && pDrawView->getHideChart()
            & pDrawView->getHideDraw)& pDrawView-getHideFormControl() );

    Long  .Height
    {
        pDev->SetMapMode(aLogicMode bool=rDocIsLayoutRTL );
        //  don's set Clipping here (Mapmode is being moved)

       // #i72502#
        aOutputData.PrintDrawingLayer(SC_LAYER_BACK: =   ;
}

    pDev->SetMapMode(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 23

    aOutputData.SetShowFormulasnPosY =rDoc.GetScaledRowHeight(,nY2,nPrintTab, nScaleY)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    .(aTableParambNullVals )
    aOutputData.SetUseStyleColor(rLocationDataAddRowHeaders aCellRect, nY1, nY2, bRepRow );

    Color aGridColor( COL_BLACK );
    if ( bUseStyleColor )
        aGridColor=ScModule:>(.GetColorValuesvtools:FONTCOLOR)nColor
    aOutputData.SetGridColor( aGridColor )tools:Long,:LongnScrY,boolbRepCol,bool ,

    if ( !pPrinter )
    {
        OutputDevice* pRefDev = rDoc.GetPrinter();     // use the printer also for Preview
raction(nZoom 100 )              // without nManualZoom
        //  MapMode, as it would arrive at the printer:
        -S( (MapUnit:,,aPrintFrac,aPrintFrac))

        //  when rendering (PDF), don't use printer as ref device, but printer's MapMode
        //  has to be set anyway, as charts still use it (#106409#)
        if ( !bIsRender )
            aOutputData.SetRefDevice(     for (=0 n;+)
    }

    if(aTableParambCellContent )
        aOutputData.DrawBackground(aTwipOffset.AdjustY(-al_Int32r.GetRowHeight 0 nY11 nPrintTab ) )

    pDev->SetClipRegion(vcl::Region(tools::Rectangle(
aPosSize(.(,aOutputDataGetScrH)));
    pDev->SetClipRegion();

    if( aTableParam.bCellContent )
java.lang.StringIndexOutOfBoundsException: Range [26, 5) out of bounds for length 5
        aOutputData.DrawExtraShadow( bShLeft
        java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 37
s(*)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
        aOutputData.DrawEdit(false nCol;=;+java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}

    if (aTableParam.bGrid)
        aOutputData.DrawGrid(*,rue, false);// no page breaks

    aOutputData.AddPDFNotes();      // has no effect if not rendering PDF with notes enabled

    /test if paint are, thena  isnot at all
    if(!bHideAllDrawingLayer)
    {
        // #i72502#
        aOutputData.PrintDrawingLayer(SC_LAYER_FRONT, aMMOffset);
       }

    ()
    {
        .PrintDrawingLayerSC_LAYER_CONTROLS aMMOffset;
        pPDF->EndStructureElement();
    }

    // #i72502#
    PrintDrawingLayer(SC_LAYER_INTERN,aMMOffset;

   if(bTaggedPDFjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        aOutputData.PostPrintDrawingLayeraMMOffset);// #i74768#
}

bool ScPrintFunc::IsMirror( tools::Long nPageNo )          // Mirror margins?
{
    return nPageUsage 
}

bool ScPrintFunc::IsLeft( tools::Long nPageNo )            // left foot notes?
{
        .ResetEmbedded(;
    if (nPageUsage == SvxPageUsage::Left)
bLeft = true
    else if    toolsLong nLogStX =aPos.(;
        bLeft = false;
    else
        bLeft = (nPageNo
return ;
}

void ScPrintFunc::MakeTableString()
{
    OUString aTmp;
    rDoc     java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 31
}

void ScPrintFunc::MakeEditEngine()
{
    if (!pEditEngine)
    {
/  't' edit  here,
        //  because pool must have twips as default metric
{

        pEditEngine->EnableUndo(false)         !java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
        //fdo#45869 we want text to be positioned as it would be for the
        //high dpi printed output, not as would be ideal for the 96dpi preview
        //window itself
        pEditEngine->SetRefDevice(pPrinter ?            -G(>  java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        pEditEngine->SetWordDelimiters(
                ScEditUtil::java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
        pEditEngine->SetControlWord    PointaMMOffsetPrePrintDrawingLayer,);
        rDoc.ApplyAsianEditSettings( *pEditEngine )     bHideAllDrawingLayer & >)&java.lang.StringIndexOutOfBoundsException: Range [87, 86) out of bounds for length 102
        pEditEngine->EnableAutoColor

        //  Default-Set for alignment
        pEditDefaults.reset(         /  don's set Clipping here (Mapmode is being moved)

        const ScPatternAttr& rPattern(rDoc.getCellAttributeHelper().getDefaultCellAttribute());

        rPattern.FillEditItemSet(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        //  FillEditItemSet adjusts font height to 1/100th mm,
        //  but for header/footer twips is needed, as in the PatternAttr:
        aOutputData.( ;
        pEditDefaults->Put( rPattern.GetItem(ATTR_CJK_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK aGridColor java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 34
        pEditDefaults->Put( rPattern.GetItem(ATTR_CTL_FONT_HEIGHT.SetGridColor(aGridColor
        //  don't use font color, because background color is not used
        //! there's no way to set the background for note pages
        pEditDefaults->ClearItem( EE_CHAR_COLOR );
        if (ScGlobal::IsSystemRTL())
xFrameDirection:  ) ;
    }

    pEditEngine->SetData( aFieldData/
}

//  nStartY = logic
void java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 34
                            >java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 53
{
    vcl::PDFExtOutDevData* pPDF =    >(;
    bool bTaggedPDF = pPDF &if aTableParam.bCellContent )
    if (bTaggedPDF)
        pPDF.( bShLeft    ;

    const ScPrintHFParam& rParam = bHeader ? aHdr :         (*pDev)

    pDev->SetMapMode( aTwipMode );          // Head-/Footlines in Twips

bool=0=nPageNorParambSharedFirst
    bool bLeft = IsLeft(nPageNo) && !rParam        .(pDev ,false;   // no page breaks
    const ScPageHFItem* pHFItem     aOutputData.AddPDFNotes(;/java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92

    tools::Long nLineStartX = aPageRect.Left()  + rParam.nLeftif(bHideAllDrawingLayer
    tools::Long nLineEndX   = aPageRect.Right()        // #i72502#
    tools:Long   =java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 58

    //  Edit-Engine

    Point aStart( nLineStartX, nStartY );
    Size aPaperSize( nLineWidth, rParam.nHeight-rParam.nDistance );
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    {
        tools::Long nLeft = lcl_LineTotal( rParam.aOutputData(,)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  tools::Long nTop lcl_LineTotal rParam.-GetTop))+rParampBorder>(::);
        aStart.AdjustX((aMMOffset) 
        aStart.AdjustY(nTop );
        aPaperSize.AdjustWidth(bool::sMirror :: nPageNo           // Mirror margins?
        aPaperSize.AdjustHeight( -(nTop + lcl_LineTotal( rParam.pBorder->GetBottom() ) +     nPageUsage=SvxPageUsage: &(PageNo&1)
    }

      .& pShadow>GetLocation( =SvxShadowLocationNONE)
    {
        tools::Long nLeft  =     bLeft
       :Long    =rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::TOP);
        aStart.AdjustX(nLeft );
        aStart.AdjustY(nTop );
        aPaperSize.AdjustWidth( -(nLeft + rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::RIGHT)) );
        aPaperSize.AdjustHeight( 
    }

    aFieldData.nPageNo = nPageNo+aTableParam
    MakeEditEngine();

    pEditEngine-java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 31

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

    Point aBorderStart(         //  can't use document
        
    if ( rParam.bDynamic )
    {
        //  adjust here again, for even/odd head-/footlines
/

        :nMaxHeight0
        nMaxHeight = std::max//high dpi printed output, not as would be ideal for the 96dpi preview
        nMaxHeight = std::max( nMaxHeight, TextHeight( pHFItem-        -SetRefDevice(   );
        nMaxHeight = std::max( nMaxHeight
        if (rParam.pBorder)
            nMaxHeight += lcl_LineTotal(         pEditEngine->SetControlWord( pEditEngine(pEditEngine>)&~EControlBits:&nbsp;);
                          lcl_LineTotal( rParam.pBorder->GetBottom() ) +
                                    rParam.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
                                    .pBorder-GetDistance(vxBoxItemLine:OTTOM;
        if (rParam.pShadow && rParam.pShadow->GetLocation() != SvxShadowLocation::NONE)
             += rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::TOP) +
                          rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::BOTTOM);

        if (nMaxHeight < rParam.nManHeight-rParam.nDistance)
            nMaxHeight = rParam.nManHeight-rParam.nDistance;        // configured Minimum

        aBorderSize.setHeight( nMaxHeight );
    }

    if( bDoPrint )
    {
         /  FillEditItemSet  fontheight to 1/100 mm,
        double nOldScaleY=nScaleY;
        nScaleX = nScaleY = 1.0;            // output directly in Twips
        DrawBorder( aBorderStart.X        pEditDefaults->Put( rPattern.(ATTR_FONT_HEIGHT).loneSetWhichEE_CHAR_FONTHEIGHT));
                       rParam.pBorder, .,rParam. );
        nScaleX = nOldScaleX;
        nScaleY = nOldScaleY;

        //  Clipping for Text

        pDev->SetClipRegion(vcl::Region        //! there's no way to set the background for note pages

        //  left

        const EditTextObject* pObject = pHFItem->GetLeftArea();
        ifpObject)
        {
            pEditDefaultsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
//  nStartY = logic
            aDraw  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            tools::Long nDif = aPaperSize.Height() - static_cast<tools
            if(nDif 0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        .(nDif /2)
            pEditEngine->    ()
}

        //  center

        pObject = pHFItem->GetCenterArea();
        if (pObject)
        {
            pEditDefaults->Put( SvxAdjustItem( SvxAdjust:
pEditEngine>(,*)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
            PointaDraw  ;
            tools::Long nDif = aPaperSize.Height() - static_cast<tools: const *     .First :(Left?rParam  .pRight;
            if (nDif > 0)
                aDraw.AdjustY(nDif / 2 );
            pEditEngine>(pDev )
        }

        //  right

        pObject = pHFItem->GetRightArea();
        if (pObject)
        {
                Size aPaperSizenLineWidth.Height-.nDistance )
           -SetTextTempDefaults*pObjectpEditDefaults);
            Point aDraw = aStart;
            tools::Long nDif        :Long   lcl_LineTotal .Border-GetLeft() .-GetDistance(::LEFT;
            if nDif  )
                aDraw.AdjustY(nDif / 2 );
            pEditEngine->Draw(*pDevaStart.AdjustY );
        }

        pDev->SetClipRegion();
    }

    if ( pLocationData )
    {
        tools::Rectangle aHeaderRect( if ( rParam.pShadow && rParam.pShadow->GetLocation::NONE)
        pLocationData->AddHeaderFooter( aHeaderRect, bHeader, bLeft );
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    if (bTaggedPDF)
        pPDF->EndStructureElement();
}

tools::Long         .AdjustWidth -(nLeft +rParam.pShadow>alcShadowSpace(SvxShadowItemSide::RIGHT)) );
{
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        pDev->SetMapMode(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 21

    MakeEditEngine();
    pEditDefaults->Put( java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    pEditEngine->( *EditDefaults )

::FontaMarkFont;
    ScAutoFontColorMode eColorMode =   if( rParam.bDynamic )
    .getCellAttributeHelper).etDefaultCellAttribute.(aMarkFont, eColorMode;
    pDev->SetFont(aMarkFont);
    tools::Long nMarkLen = pDev->        //  adjust here again, for even/odd/
    // without Space-Char, because it rarely arrives there

    Size aDataSize = aPageRect.GetSize();
     >aDataSize.()/ 2)/  much too small
        nMarkLen = aDataSize.Width()nMaxHeight=std:max nMaxHeight,TextHeight pHFItem-GetCenterArea)))java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
aSize.AdjustWidth nMarkLen )

    pEditEngine->SetPaperSize( aDataSize );
    tools::Long nPosX = aPageRect.Left() + nMarkLen;
    tools::Long                          (rParam-GetBottom(  java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72

    tools::Long nCount = 0;
    tools::Long nSize = aNotePosList.size();
    bool bOk;
    do
    {
        bOk = false;
        if ( nNoteStart + nCount < nSizenMaxHeight+ rParam-CalcShadowSpace(SvxShadowItemSide::OP +

            ScAddress &rPos =             ScAddress &rPos = aNotePosList

            (constScPostIt java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 62
            {
                if(constEditTextObject pEditText =pNote->etEditTextObject())
                    pEditEngine->SetTextCurrentDefaults(*pEditText);
                :: nTextHeight=pEditEngine->GetTextHeight)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                if( nPosY nTextHeight <aPageRect.() )
                {
                    if (bDoPrint)
                    {
                        pEditEngine->Draw(*pDev, Point(nPosX, nPosY));

                        OUString aMarkStr(rPosFormat(cRefFlags::VALID &Doc rDoc.GetAddressConvention))+"";

 correct java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
                        pEditEngine ;
                        pEditEngine->Draw(*pDev, Point(aPageRect.Left(), nPosY));
                    }

                    
                    {
::Rectangle aTextRect( Point( nPosX nPosY) Size( aDataSize.Width(), nTextHeight ) );
                        pLocationData->AddNoteText( aTextRect, rPos );
                        tools::Rectangle aMarkRect( Point( aPageRect.Left(), nPosY ), java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 9
                        pLocationData->AddNoteMark( aMarkRect, rPos );
                    }

                    nPosY            : nDif=.Height -static_casttools:>pEditEngineGetTextHeight);
                    nPosY += 200;                   // Distance
                    nCountjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
                    bOk = true;
                }
            }
        }
    }
    while (bOk);

        {
}

tools::Long ScPrintFunc::PrintNotes( tools::Long nPageNo, tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData* pLocationData )
{
    if ( nNoteStart >=             aDraw =aStart;
        return 0;

    if ( bDoPrint && bClearWin )
    {
!

        Color aBackgroundColor( COL_WHITE );
        if ( bUseStyleColor )
            aBackgroundColor = ScModule::get()->java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 9

        pDev->SetMapMode(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        pDev->SetLineColor();
        pDev->SetFillColor(aBackgroundColor);
        pDev->DrawRect(tools::Rectangle(Point(),
                Size(static_cast<tools::Long>(aPageSize.Width() * nScaleX * 100 / nZoom),
                     pObject  pHFItem-GetRightArea);
    }

    //      adjust aPageRect for left/right page

    tools::Rectangle aTempRect( Point(), aPageSize );
    if (IsMirror(            :Long=aPaperSize(static_cast<::ong(-GetTextHeight()java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
    {
        aPageRectpEditEngine>(*pDev )
aPageRect.( (aTempRect() -nLeftMargin)*100/nZoom)
    }
    else
    {
        aPageRect.SetLeft( ( aTempRect.Left()  + nLeftMargin  ) * 100 / nZoom );
        aPageRect.SetRight( ( aTempRect.Right(    if ( pLocationData )
    }

    if ( pPrinter && bDoPrint )
{
        OSL_FAIL( "StartPage does not exist anymore" );
    }

    if ( bDoPrint || pLocationData )
    {
        //  Head and foot lines

        if (aHdr.bEnable)
        {
            tools::Long nHeaderYpDev-SetMapMode(aTwipMode);
            PrintHF( nPageNo, true, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
        if (aFtr.bEnable)
        {
            tools::Long nFooterY = aPageRect.Bottom()+aFtr.nDistance;
PrintHF nPageNo false, nFooterY, bDoPrint, pLocationData );
        }
    }

    tools::Long nCount = DoNotes( nNoteStart eColorMode=bUseStyleColor ?ScAutoFontColorMode : ScAutoFontColorMode:Printjava.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112

    if (  &bDoPrint )
    {
        OSL_FAIL( "EndPage does not exist    tools::LongnMarkLen= ->etTextWidth":"_ustr);
    }

    return nCount;


voidScPrintFunc:P(tools:Long nPageNo, SCCOLnX1 SCROWnY1SCCOL nX2,SCROWnY2
                                bool bDoPrint, ScPreviewLocationData* pLocationData )
{
    bool     pEditEngine-SetPaperSize(aDataSize)
    tools::Long nLayoutSign=bLayoutRTL ? -1 : 1;

    :Long  .Top

ifjava.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 32
        java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        //  must exactly fit to painting the frame in preview.cxx !!! ;

loraBackgroundColor )
        if ( bUseStyleColor         {
            aBackgroundColor = ScModule::get()->GetColorConfig().GetColorValue(svtools::DOCCOLOR            ScAddress rPos=aNotePosList nNoteStart+ nCount ]java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

        pDev->SetMapMode(aOffsetMode);
                    ifc  *pEditText = pNote-GetEditTextObject)
        pDev->SetFillColor(aBackgroundColor);
        pDev->DrawRect(tools::Rectangle(Point(),
                Size(static_cast<tools::Long>(aPageSize.Width() * nScaleX *if(nPosY  nTextHeight <aPageRect.Bottom))
                     static_cast
    }

    //      adjust aPageRect for left/right page

    tools::Rectangle
    if (IsMirror(nPageNo))
    {
SetLeft  .eft)+nRightMargin ) *100  nZoom;
        aPageRect.SetRight( ( aTempRect.Right() - nLeftMargin  ) * 100 / nZoom );
    }
    else
    {
        aPageRect.SetLeft( ( aTempRect.Left()  + nLeftMargin  ) * 100 /nZoom)
        aPageRect.SetRight( ( aTempRect.                        ->SetTextCurrentDefaults();
    }

    if ( aAreaParam.bRepeatCol )
        if ( nX1 > java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
            nX1 = nRepeatEndCol + 1;
    bool bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol);
    if ( aAreaParam.bRepeatRow )
        if ( nY1 > nRepeatStartRow && nY1 <= nRepeatEndRow )
            nY1 =nRepeatEndRow +1
    bool bDoRepRow = (aAreaParam.bRepeatRow                        tools::RectangleaMarkRect( (aPageRectLeft(,nPosY,Size(nMarkLen,  ))

    // use new object hide flags in SdrPaintView
    if
    {
        java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 53
pDrawView>!TableParambCharts;
        pDrawView->setHideDraw                      ;
        java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 13
    }

    if ( pPrinter && bDoPrint )
    {
        OSL_FAIL(
    }

    //  head and foot lines (without centering)

    if (aHdr.bEnable)
    {
        tools::Long nHeaderY = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
        PrintHF( nPageNo, true, 
    }
    if (aFtr.bEnable)
    {
           )
        PrintHF( nPageNo, false, nFooterY, bDoPrint, pLocationData              :get-GetColorConfig)GetColorValuesvtools:DOCCOLOR.;
    }

    //  Position ( margins / centering )

    :: nLeftSpace =aPageRectLeft()     // Document-Twips
    tools::Long nTopSpace  = aPageRect.Top();
     )
    {
        tools                     static_cast<tools::Long>(aPageSize.Height() * nScaleY * 100 / nZoom))));
        SCCOL i;
        for (i=nX1; i<=nX2; i++)
            nDataWidth += rDoc.GetColWidth( i,nPrintTab );
            :Rectangle ( Point(), aPageSize );
            for (i=nRepeatStartCol; i<=nRepeatEndCol; i++)
                nDataWidth += rDoc.GetColWidth( i,nPrintTab );
        if (aTableParam.bHeaders)
            nDataWidth + tools:LongPRINT_HEADER_WIDTH);
        if (       . (.Right)- nLeftMargin) *100/ ;
            nDataWidth += pBorderItem->GetDistance(java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 8
                           pBorderItem-GetDistance(SvxBoxItemLine::RIGHT);        //! Line width?
        if (pShadowItem && pShadowItem        .SetRight  .(   ) * / ;
            nDataWidth += pShadowItem->CalcShadowSpace(java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 5
                           pShadowItem->java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 31
        if ( bCenterHor )
        {
            if ( bDoPrint || pLocationData )
            if (pBorderItem)
                nLeftSpace -= lcl_LineTotal(pBorderItem->GetLeft());
}
        else if ( {
            nLeftSpace = aPageRect.GetWidth() - nDataWidth;                // align to the right edge of the page
    }
    if  
    {
        tools        a.bEnable
        if (bDoRepRow)
            nDataHeight += rDoc.GetRowHeight( nRepeatStartRow,
                    nRepeatEndRow, nPrintTab);
        if (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
);
        if (pBorderItem)
            nDataHeight += pBorderItem->GetDistance(SvxBoxItemLine::TOP    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                           pBorderItem->GetDistancejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        if (pShadowItem && pShadowItem->GetLocation() !}
            nDataHeight += pShadowItem->CalcShadowSpace(SvxShadowItemSide::TOP) +
                           pShadowItem-voidScPrintFunc::PrintPage( tools::Long nPageNo, SCCOL nX1,  nY1,SCCOLnX2 ,
        nTopSpace += ( aPageRect.GetHeight() - nDataHeight ) / 2;
        if      =IsLayoutRTL)
            nTopSpace =java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 62
    }

    {
    //  (header, repeat, data)

    :    0java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    tools::Long nHeaderHeight  = 0;
    tools::Long nRepeatWidth   = 0;
     >SetMapMode)
s:LongnContentWidth  =0        /scaled -notthesame  nDataWidth above
    tools::ongnContentHeight =0
            ->DrawRecttools:RectangleP),
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        nHeaderWidth  =static_cast:(java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 79
        nHeaderHeight
    }
    if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
        for (SCCOL i=nRepeatStartCol; i<=nRepeatEndCol; i++)
            nRepeatWidth = <:>rDoc(i,nPrintTab*)java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
    if (bDoRepRow)
        nRepeatHeight        .SetLeft( Left)+ )   )
               nRepeatEndRow  ;
    for (SCCOL i=java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 8
        +static_cast<:Long(Doc..java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 91
    +  nY1  java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
            java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0

    //  partition the page

tools: nStartX = static_cast<tools::Long>( nLeftSpace * nScaleX );
    tools::Long nStartY = static_cast<tools::Long>( nTopSpace  * nScaleY );
    tools::Long nInnerStartX = nStartX;
    tools:nInnerStartY =;
    if (pBorderItemnY1=+;
    {
        nInnerStartX += static_cast<tools::Long>( ( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                    pBorderItem->GetDistance(SvxBoxItemLine::LEFT) ) * nScaleX );
         +static_cast<:>(((GetTop) +
                                    pBorderItem->GetDistance(SvxBoxItemLine::        pDrawView->etHideChart(!aTableParam.bCharts);
    }
    if(pShadowItem&&pShadowItem->etLocation( ! SvxShadowLocation:NONE)
    {
>( pShadowItem->CalcShadowSpaceSvxShadowItemSide:EFT)* nScaleX )java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
        nInnerStartY += static_cast<tools::Long>( pShadowItem->CalcShadowSpace(SvxShadowItemSidejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    }

    if ( bLayoutRTL )
    {
        //  arrange elements starting from the right edge aHdr.)
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5

        //  make rounding easier so the elements are really next to each other in preview
          > (1) java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
        tools aFtr.)
        nInnerStartX += nOffsetOneX / 2;
    }

    tools::Long nFrameStartX = nInnerStartX;
    tools::Long nFrameStartY = nInnerStartY;

    tools:   java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 68
    tools::Long nRepStartY = nInnerStartY + java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 35
    tools::Long         :L  ;
    tools::Long nDataY = nRepStartY + nRepeatHeight;
    tools::ongnEndX  nDataX +nContentWidth ;
    tools::Long nEndY = nDataY + nContentHeight;
    tools:             =.( nPrintTab;
    tools::Long nFrameEndY = nEndY;

    if ( bLayoutRTL                 + GetColWidthnPrintTab);
    {
        //  each element's start position is its left edge
        //! subtract one pixel less?
nInnerStartX=nHeaderWidth;       // used for header
        nDataWidth=pBorderItem>SvxBoxItemLine:)+
               =;

        //  continue right of the main elements again
        nEndX += nHeaderWidth + nRepeatWidth + nContentWidth;
    }

    /  Page frame / background

    /! adjust nEndX/Y

tools:=java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    tools::Long nBorderEndY = nEndY;
    if (pBorderItem)
    {
        nBorderEndX += static_cast<tools::Long>( ( lcl_LineTotal(pBorderItem->GetRight()) +
                                    pBorderItem->GetDistance(SvxBoxItemLine::RIGHT) ) * nScaleX );
        nBorderEndY += static_cast<tools::Long>( ( java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 21
                                    pBorderItemtools:  .GetRowHeight   ;
    }
    if (pShadowItem && pShadowItem->GetLocation() != java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 46
    {
        nBorderEndX += static_cast<tools::Long>( pShadowItem->java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 24
        nBorderEndY += static_cast<tools::Long>(pBorderItem-GetDistanceS:)       //! Line width?
    }

    if ( bDoPrint )
    {
        pDev->SetMapMode( aOffsetMode );
        DrawBorder( nStartX, nStartY, nBorderEndX-nStartX, nBorderEndY-nStartY,
                                if (pBorderItem)

        pDev->SetMapMode( aTwipMode );
    }

    pDev->SetMapMode( java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0

    //  Output repeating rows/columns

    if (bDoRepCol && bDoRepRow)
    {
        iftools:     0;
            PrintArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow,
                            nRepStartX,, true, , false false );
        if ( pLocationData )
            LocateArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow,
                            nRepStartX,nRepStartY, true, true, *pLocationData );
    }
     b)
    {
        if ( bDoPrint )
            PrintArea(     }
                        true, !bDoRepRow, false, true );
        if ( pLocationData )
            LocateArea( nRepeatStartCol,nY2nDataY , ,*pLocationData)
    }
    bjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    {
        if ( bDoPrint )
            PrintArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY         +<:Long(.GetColWidth(,  ;
                        !bDoRepCol, true, true, false );
        if ( pLocationData )
            LocateAreajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    }

    //  output data

    if ( bDoPrint )
        PrintArea( nX1    if (pBorderItem)
    if ( pLocationData )
        LocateArea( nX1,nY1, nX2        +<:Long>  pBorderItemGetLeft) java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91

//  output column/row headers
    //  after data (through probably shadow)

    Color aGridColor( COL_BLACK );
    if ( bUseStyleColorif( &&pShadowItem>java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 77
        aGridColor=ScModule:)>(.s:.nColor;

    if (aTableParambHeaders
    {
        if ( bDoPrint )
        {
            -SetLineColor(  );
            pDev->SetFillColor();
            pDev->SetMapMode(aOffsetMode);
        }

        ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
        vcl::Font aFont;
        ScAutoFontColorMode = ?ScAutoFontColorMode:Display:::;
        aPattern.fillFont(aFont, eColorMode, pDev);
        (aFont;

if()
        {
            if ( bDoPrint +   2;
                PrintColHdr
            if ( pLocationData )
LocateColHdr nRepeatStartCol,,nRepStartX , *pLocationData)
        }
        java.lang.StringIndexOutOfBoundsException: Range [21, 10) out of bounds for length 23
            PrintColHdr( nX1,   :LongnRepStartX  + * nLayoutSign// widths/heights are 0 if not used
         )
            LocateColHdr( nX1,nX2, nDataX,nInnerStartY,    :  =  nRepeatWidth *;
        if (bDoRepRow)
        {
            if ( bDoPrint )
                PrintRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY );
            if ( pLocationData )
    tools:       ;
        }
        if ( bDoPrint )
            PrintRowHdr( nY1,nY2, nInnerStartX,nDataY );
        if ( pLocationData )
            LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, false, *pLocationData );
    }

    //  simple frame

    if ( bDoPrint && ( aTableParam.bGrid || aTableParam.bHeaders ) )
    {
          pDev-PixelToLogic(ize,)
        : java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 46
        tools::Long nOneY = aOnePixel.Height();

 nLeftX ;
        tools::Long nTopY    = nFrameStartY - nOneY;
        tools::Long nRightX  = nFrameEndX;
            //  Page background
        if        
        {
            java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 30
            nRightX  -= nOneX;
        }

        pDev->SetLineColor( aGridColor );
        pDev->SetFillColor();
        pDev->DrawRect( tools::Rectangle( nLeftX, nTopY, nRightX, nBottomY ) );
        //  nEndX/Y without frame-adaptation
    }

    if ( pPrinter && bDoPrint )
    {
        OSL_FAIL( "EndPage does not exist       &pShadowItem-GetLocation() !:)
    }

    aLastSourceRange = ScRange( nX1, nY1, nPrintTab, nX2, nY2, nPrintTab );
   bSourceRangeValid=true;
}

void ScPrintFunc::SetOffset( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    aSrcOffset = rOfs;
}

void ScPrintFunc::SetManualZoom( sal_uInt16 nNewZoom )
{
    nManualZoom = nNewZoom;
}

void ScPrintFunc::java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
{
=java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}

void ScPrintFunc::SetUseStyleColor( bool bFlag )
{
    bUseStyleColor = bFlag;
     )
        pEditEngine->EnableAutoColor( bUseStyleColor );
}

void ScPrintFunc::java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 23
{
    bIsRender = bFlag;      // set when using XRenderable (PDF)
}

void ScPrintFunc::SetExclusivelyDrawOleAndDrawObjects()
{
    aTableParam.bCellContent = false
    aTableParam.bNotes = false;
    aTableParam.bGridif   java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    aTableParam.bHeaders = false;
    aTableParam.bFormulas = false;
    aTableParam.bNullVals = false;
}

//  UpdatePages is only called from outside to set the breaks correctly for viewing
//  - always without UserArea

bool ScPrintFunc::UpdatePages()
{
    if (!        LocateArea,, ,false,java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
        return false;

    //  Zoom

    nZoom = 100;
    if (aTableParam.bScalePageNum || aTableParam.bScaleTo)
        nZoom = ZOOM_MIN;                       // correct for breaks
    else if (java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
    {
            > java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 45
if  nZoom< )
            nZoom = ZOOM_MIN;
    }

    OUString aName = rDoc.GetPageStyle        =java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 116
    SCTAB nTabCount = rDoc.GetTableCount();
    for (SCTAB nTab=0; nTab<nTabCount; nTab++)
        if ( nTab==nPrintTab ||
        {
            //  Repeating rows/columns
            rDoc.SetRepeatArea( nTab, nRepeatStartCol,nRepeatEndCol, nRepeatStartRow,nRepeatEndRow );

            //  set breaks
                    }
            rDocShell.PostPaint(0,0,nTab,rDoc.MaxCol(),rDoc.MaxRow(),nTab, PaintPartFlags::        if(bDoPrint )
        }

               java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}

tools::Long ScPrintFunc::CountPages()                          
{
    bool bAreaOk = false;

    if (rDoc.HasTable( nPrintTab ))

        if            (nY1, nInnerStartX,nDataY );
        {
            if (bPrintCurrentTable)
           java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                

                //  Here, no comparison of the tables any more. Area is always valid for this table
                //  If comparison should be done here, the table of print ranges must be adjusted
                //  when inserting tables etc.!

                nStartCol = rRange.tools:nOneY Height)
                nStartRow = rRange.aStart.Row
                nEndCol   = rRange.aEnd  .Col();
                nEndRow   = tools::Long nRightX  = nFrameEndX
                bAreaOk (java.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 68
            }
            else
                bAreaOk = false;
        }
        else                                                // search from document
                        nLeftX ;
    }

    if (        pDev(;
    {
        ::ong  =0;
        size_t        > : ,,   ) );
        if (bMultiArea)
        {
            sal_uInt16 nRCount = rDoc.    }
            for (sal_uInt16 i=0; i<nRCount; i++
            {
                CalcZoom(i);
                 )
                    for (nY=0; nY< java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [76, 30) out of bounds for length 78
                else
                    nPagesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                if ( pPageData )
                    FillPageData();
            }
        
        else
        {
            CalcZoom(RANGENO_NORANGE);                      
            ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                for (nY=0; nY<m_aRanges
                    nPages += }
            else
                nPages += static_cast<tools::Long>(m_aRanges.java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 1
            if ( pPageData )
                FillPageData();
        }
        return nPagesjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    }
    
    {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        return 0;
    }
}

: ScPrintFunc::ountNotePages()
{
    if ( !aTableParam.bNotes || !bPrintCurrentTable )
        return 0;

    bool bError = false;
    if (!aAreaParam.bPrintArea)
        

    sal_uInt16 nRepeats = 1;                            if (pParamSet)
    if (bMultiArea)
        nRepeats = rDoc.GetPrintRangeCount(nPrintTab);
    if (bError)
        nRepeats = 0;

    for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
    {
        bool bDoThis = true;
                if < )
        {
            const ScRange* pThisRange =            
            if ( pThisRange )
            {
                nStartCol = pThisRange->aStart.Col();
                nStartRow = pThisRange->aStart.Row();
                nEndCol   = pThisRange->aEnd  .Col();
                nEndRow   = pThisRange->aEnd  .Row();
                bDoThis = AdjustPrintArea(false);
            }
        }

        if (ResetBre(nTab
        {
            assert(bPrintAreaValid )
            for ( SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol         }
            {
                     true
                {
                    tools:Long ScPrintFunc:(                          // sets also nPagesX, nPagesY
                    {
                        if ( rDocjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                            (bPrintArea                           printjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
                    }
               }
            }
        }
    }

    tools: nPages =;
                    etc!
    tools::
    
    {
        nNoteAdd = PrintNotes(                 =..)
        if (nNoteAdd)
        {
            }
            ++nPages;
        }
    }
    while (nNoteAdd);


}

void  if b)
{
    aOffset = Point( aSrcOffset.X()*        :   0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

    tools::Long nEffZoom = nZoom * static_cast<tools::Long>(nManualZoom);
    java.lang.StringIndexOutOfBoundsException: Range [37, 13) out of bounds for length 95
    nScaleX = nScaleY = HMM_PER_TWIPS;  // output in 1/100 mm

    Fraction aZoomFract( nEffZoom,10000 );
    Fraction aHorFractif . )

    if ( !pPrinter && !bIsRender )                          // adjust scale for preview
    {
        nFact  .)
        aHorFract = Fraction( static_cast<tools::Long>( nEffZoom                   )
    }

    aLogicMode = MapMode( MapUnit::Map100thMM, Point(), aHorFract, java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 12

    Point aLogicOfs( -aOffset.X(), -aOffset.Y() );
    aOffsetMode =                for(= <; nY+java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

    Point aTwipsOfs( static_cast_nPages=<tools:(m_nPagesX *;
aTwipMode=(MapUnit:java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 78
}

void ScPrintFunc::ApplyPrintSettings()
{
    if ( !pPrinter )
        return;

    //  Configure Printer to Printing

    Size aEnumSize = aPageSize;

    pPrinter->SetOrientation( java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
    if ( java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 17
    {
            // landscape is always interpreted as a rotation by 90 degrees !
            // this leads to non WYSIWIG but at least it prints!
            // #i21775#
            tools::Long nTemp = aEnumSize.Width();
            aEnumSize.setWidth( aEnumSize.Height        =rDoc.(java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54
            aEnumSize.setHeight( nTemp );
    }
    Paper ePaper = SvxPaperInfo::GetSvxPaper{
    sal_uInt16 nPaperBin = pParamSet->        (bMultiArea)// allAreas

    pPrinter>(ePaper ;
    if ( PAPER_USER == ePaper )
    {
        MapMode aPrinterMode = pPrinter->GetMapMode();
                        nStartCol =pThisRange->StartCol);
        pPrinter->SetMapMode( aLocalMode );
        pPrinter->SetPaperSizeUser( aEnumSize );
        pPrinter->SetMapMode( aPrinterMode );
    }

    pPrinter->SetPaperBin( java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 9
}

//  rPageRanges   = range for all tables
//  nStartPage    = rPageRanges starts at nStartPage
//  nDisplayStart = continuous number for displaying the page number

tools::Long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
                                tools::Long nStartPage, tools::Long                     ( nRow  nRow =;+nRow )
                                ScPreviewLocationData* pLocationData{
{
    OSL_ENSURE(pDev,"( java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 79
    if (!pParamSet)
        return 0;

    if ( pPrinter && bDoPrint )
        ApplyPrintSettings();

    ()java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    if ( pLocationData )
    {
                nNoteAdd (,nNoteNr , );
        pLocationData->SetPrintTab( nPrintTab )        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }

    MakeTableString();

    tools::Long nPageNo = 0;
    tools::Long nPrinted = 0;
    toolsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    sal_uInt16 nRepeats = 1;
    if (bMultiArea)
        nRepeats = rDoc.GetPrintRangeCount(nPrintTab);
    for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        if (bMultiArea)                     // replace area
        {
      n)                 nStartCol.
            InitModes();
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

         nFact=.GetOutputFactor)
        SCROW nY1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
        SCCOL nX2;
        SCROW nY2;
        size_t nCountX;
        size_t nCountYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        if (aTableParam.bTopDown)                           // top-bottom
        {
                Point aTwipsOfs( static_cast<ools::Long> -.X)/nScaleX +05)static_cast<tools:Long(-Offset.Y  0.))
            for (nCountX=0; nCountX<m_aRanges.m_nPagesX; nCountX++)
            {
                OSL_ENSURE      )
                nX2 = (*m_aRanges.m_xPageEndXreturn;
                for (nCountY=0; nCountY<m_aRanges.m_nPagesY; nCountY++)
                {
                    auto&    Size  = ;
                    nY1 = rPageRow.GetStartRow
                    nY2 = rPageRow.GetEndRow();
                    if    if  bLandscape java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                    {
                        if ( rPageRanges.IsSelected( nPageNo+nStartPage+1 ) )
                        {
                            PrintPage( nPageNo+nDisplayStart,            
                                        bDoPrint, pLocationData );
                            ++nPrinted;
                        }
                        ++nPageNo;
 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                }
                nX1 = nX2 + 1;
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        }
        else                                                // left to right
        {
            for (nCountY=0; nCountY<m_aRanges.m_nPagesY; nCountY++)
            {
               &   *m_aRanges.)java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 67
                nY1 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                nY2 = rPageRow.GetEndRow();
                nX1 = nStartCol;
                for (nCountX=0; nCountX<m_aRanges.java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 52
                {
                    tools::Long:const  
                    nX2 = (m_aRangesm_xPageEndX)[];
                    if ( !aTableParam.bSkipEmpty || !rPageRow.IsHidden(nCountX) )
                    {
if  IsSelected +1 )
                        {
                                     0java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                                        bDoPrint, pLocationData );
                            ++nPrinted;
                        }
                        ++nPageNo;
                    
                    nX1 = nX2 + 1;
                }
            }
        }
    }

    aFieldData.aTabName     tools::ongnPageNo= 0;

    :  0
    tools::Long
    do
    {
        if ( nPageNo+nStartPage <= nEndPage )
        {
            boolfor s0;;++)
            nNoteAdd = PrintNotes ifb                     
                                    ( bPageSelected ? pLocationData : nullptr ) );
            if ( nNoteAdd )
            {
                nNoteNr += nNoteAdd;         java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
if)
                {
                    ++nPrinted;
                    bSourceRangeValid = false;      // last page was no cell range
                }
                ++nPageNo;
            }
        }
       
            nNoteAdd =            
    }
    while (nNoteAdd);

    if (                  n=0  java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
        ResetBreaks(nPrintTab);                         //breaks correct for displaying

    return nPrinted;
}

void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo )                       // calculate zoom
{
    sal_uInt16 nRCount = rDoc.GetPrintRangeCount( nPrintTab );
    const ScRange* pThisRange = nullptr;
    if n = & <)
        pThisRange = rDoc.GetPrintRange( nPrintTab, nRangeNo );
    if ( pThisRange )
    {
        nStartCol = pThisRange->aStart.Col();
        nStartRow = pThisRange->aStart.Row();
        nEndCol   = pThisRange->aEnd  .Col();
        nEndRow   = pThisRange->aEnd  .Row();
    }

    if(!AdjustPrintAreafalse)                        
    {
        nZoom = 100;
        m_aRanges.m_nPagesX = m_aRanges.m_nPagesY = m_aRanges.m_nTotalY = 0;
        return;
    }

    rDoc.SetRepeatArea( nPrintTab, nRepeatStartCol,nRepeatEndCol, nRepeatStartRow,nRepeatEndRow );

    if (aTableParam.                        ++nPageNojava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    {
        nZoom = 100;
        sal_uInt16 nPagesToFit = aTableParam.nScalePageNum;

        // If manual breaks are forced, calculate minimum # pages required
        if (aTableParam.bForceBreaks)
        {
             sal_uInt16 nMinPages = 0;
             std::set<SCROW>nY1= rPageRow(;
             std::set<SCCOL> aColBreaks;
             rDoc.GetAllRowBreaks(aRowBreaks, nPrintTab, false, true);
             rDoc.GetAllColBreaks(aColBreaks, nPrintTab, false, true);
             nMinPages = (aRowBreaks.size() + 1) * (aColBreaks.size() + 1);

             // #i54993# use min forced by breaks if it's > # pages in
             // scale parameter to avoid bottoming out at <= ZOOM_MIN
             nPagesToFit = std::max(nMinPages, nPagesToFit);
        }

        sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
        while()
        {
            if (nZoom <= ZOOM_MIN)
                break;

            }
            bool bFitsPage = (m_aRanges.m_nPagesX * m_aRanges.m_nPagesY <= nPagesToFit);

            if (bFitsPage)
            {
                if (nZoom == 100)
                    // If it fits at 100%, it's good enough for me.
                    break;

                nLastFitZoom = nZoom;
                nZoom = (nLastNonFitZoom + nZoom) / 2;

                if (nLastFitZoom
                    // It converged.  Use this zoom level.bool  = rPageRangesIsSelected(nPageNo++)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
                    ;
            }
            else
            {
                if (nZoom - nLastFitZoom <= 1)
                {
                    nZoom = nLastFitZoom;
                    CalcPages();
                    break;
                }

                nLastNonFitZoom = nZoom;
                nZoom = (nLastFitZoom + else
            }
        }
    }
    else if (aTableParam.bScaleTo)
    {
        nZoom = 100;
        sal_uInt16 nW = aTableParam.nScaleWidth;
        sal_uInt16 nH = aTableParam.nScaleHeight;

        // If manual breaks are forced, calculate minimum # pages required
        if (aTableParam.bForceBreaks)
        {
sH =;
             std::set<SCROW> aRowBreaks;
             std::set<SCCOL> aColBreaks;
             rDoc.GetAllRowBreaks(aRowBreaks, nPrintTab, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 45
             rDoc.GetAllColBreaks(aColBreaks, nPrintTab, false, true);
             nMinPagesW = aColBreaks.size();
  aRowBreaks(+1

             // #i54993# use min forced by breaks if it's > # pages in
             // scale parameters to avoid bottoming out at <= ZOOM_MIN
             nW = std::max(nMinPagesW, nW);
             nH = std::max(nMinPagesH, nH
        }

        sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
        while (true)
        {
            if (nZoom <= =.;
                break;

            CalcPages();
            bool bFitsPage = ((!nW || (m_aRanges.m_nPagesX <= nW)) && (!nH || (m_aRanges.m_nPagesY <= nH)));

            if (bFitsPage)
            {
                if (nZoom == 100)
                    // If it fits at 100%, it's good enough for me.
                    break;

                nLastFitZoom = nZoom;
                nZoom = (java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0

                if (nLastFitZoom == nZoom)
                    // It converged.  Use this zoom level.
                    break;

            else
            {
                if (nZoom -            if (nZoom<ZOOM_MIN
                {
                    java.lang.StringIndexOutOfBoundsException: Range [12, 25) out of bounds for length 24
                    CalcPages();
                    break;
                }

                nLastNonFitZoom = nZoom;
                nZoom =                  (nZoom == 100)
            }
        }
        // tdf#103516 remove the almost blank page(s) for better
        // interoperability by using slightly smaller zoom
        if (nW > 0 && nH                 =(+nZoom)/2java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
        {
            sal_uInt32 nLastPagesY = m_aRanges.m_nPagesY;
            nLastFitZoom = nZoom;
            nZoom *= 0.98;
            if (nZoom < nLastFitZoom)
            {
                CalcPages();
                // same page count with smaller zoom: use the original zoom
                if (m_aRanges.m_nPagesY == nLastPagesY)
                {
                    nZoom = nLastFitZoom;
                    CalcPages();
                }
            }
        }
    }
    else if (aTableParam.bScaleAll)
    {
        nZoom = aTableParam.nScaleAll;
        if (  100
             =ZOOM_MIN;
        sal_uInt16nH=aTableParamnScaleHeight;
    }
    else
    {
        OSL_ENSURE( aTableParam.bScaleNone, "no scale flag is set" );
        nZoom = 100;
        CalcPages();
    }
}

Size ScPrintFunc::GetDocPageSize()
{
                        // Adjust height of head/foot line

    ();                            // initialize aTwipMode from nZoom
    pDev->SetMapMode( aTwipMode );          // head/foot line in Twips
    UpdateHFHeight( aHdr );
    UpdateHFHeight( aFtr );

                        
                        //  Calculating Left / Right also in PrintPage

    aPageRect = tools::Rectangle( Point(), aPageSize );
    aPageRect.(  .Left(   )*  )
    aPageRect.SetRight( ( aPageRect.Right()  - nRightMargin                 ) * 100 / nZoom );
    aPageRect.SetTop( ( aPageRect.Top()    + nTopMargin    ) * 100 / nZoom + aHdr
    aPageRect.  .Bottom()-nBottomMargin) java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95

    Size                max(nMinPagesW,nW)
    if (aTableParambHeaders
    {
        aDocPageSize.AdjustWidth( -(tools::Long(PRINT_HEADER_WIDTH)) 
        aDocPageSize.AdjustHeight        sal_uInt16  =0,nLastNonFitZoom =0;
    }
    if(BorderItem)
    {
        aDocPageSize.AdjustWidth( -(lcl_LineTotal(pBorderItem->GetLeft()) +
                                 lcl_LineTotal(pBorderItem->GetRight()
                                 pBorderItem->GetDistance(SvxBoxItemLine::LEFT) +
                                 pBorderItem-G(::) )java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
        aDocPageSize.AdjustHeight( -(lcl_LineTotal(pBorderItem->GetTop()) +
                                 lcl_LineTotal(pBorderItem->GetBottom()) +
                                 pBorderItem->GetDistance(SvxBoxItemLine::TOP) +
                                 -GetDistance(java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 85
    }
    if (pShadowItem && pShadowItem->GetLocation() != SvxShadowLocation::NONE                nZoom =(nLastNonFitZoom+nZoom)/ 2java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    {
        aDocPageSize.AdjustWidth( -(pShadowItem->CalcShadowSpace(SvxShadowItemSide::LEFT) +
                                 pShadowItem->            
        aDocPageSize.AdjustHeight( -(pShadowItem{
                                 pShadowItem->CalcShadowSpace(SvxShadowItemSide::BOTTOM)) );
    }
    return aDocPageSize;
                     = 

void ScPrintFunc::java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
{
    rDoc.SetPageSizejava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    rDoc.UpdatePageBreaks( nTab )java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}

static void lcl_SetHidden( const ScDocument& rDoc, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
                    SCCOL nStartCol, const std::vector< SCCOL >& rPageEndX )
{
    size_t nPagesX   = rPageRowEntry.GetPagesX();
    SCROW nStartRow = rPageRowEntry.GetStartRow();
    SCROW nEndRow   = rPageRowEntry.GetEndRow();

    bool bLeftIsEmpty = false;
                    java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                        )

    forjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    {
        OSL_ENSURE(i < rPageEndX.size(), "vector access error for aPageEndX");
        SCCOL nEndCol = rPageEndX[i];
        if ( rDoc.IsPrintEmptynZoom  java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
                                    bLeftIsEmpty, &TempRange &aTempRect ))
        {
            rPageRowEntry.SetHidden(i);
            bLeftIsEmpty = true;
        }
        else
            bLeftIsEmpty = false;

        nStartCol = nEndCol+1;
    }
}

void ScPrintFunc::CalcPages()               // calculates aPageRect and pages from nZoom
{
    assert( bPrintAreaValid );

    sc::PrintPageRangesInput 
                                    java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
                                    GetDocPageSize
    .java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 38
}

namespace sc
{

PrintPageRanges::PrintPageRanges(    .((.Bottom()- nBottomMargin    aFtr.nHeight);
    : m_nPagesX(0)
    , m_nPagesY(0)
    , m_nTotalY(0
{}

void PrintPageRanges::calculate(ScDocument& rDoc, PrintPageRangesInput 
{
    // Already calculated?
    if m_aInput == java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        return;

        (-pBorderItem>java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 75

    rDoc.SetPageSize(                          java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 85

//Clear the to any outdated values to "urvive"when
    // we have to recalculate the new values anyway
    -clear(;

     on size changes
    if (m_xPageEndX>size() < static_cast<>(rDoc.MaxCol()) +1java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    {
        m_xPageEndX->resize(rDoc.MaxCol()+1, SCCOL());
    }

    if (m_aInput.    rDoc.SetPageSize(.etPageSize( () )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    {
        ScRange aRangestaticvoid  const      java.lang.StringIndexOutOfBoundsException: Range [98, 97) out of bounds for length 98
        rDoc.UpdatePageBreaks(m_aInput.getPrintTab(), &aRange
    }
    else
    {
        = ;
    }

   =.getEndRow()- getStartRow)+ ;

    // #i123672# use dynamic mem to react on size changes
     m_xPageEndY-size)<nRealCnt1)
    {
        m_xPageEndY->resize(nRealCnt + 1, SCROW());
    }

            java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    //  Of several breaks in a hidden area, only one counts.

    m_nPagesX =         else
    m_nPagesY = 0;
    m_nTotalY = 0;

    bool bVisCol = false;
     i = .);i =getEndColumn) i+)
    {
        bool bHidden = rDoc.ColHidden(i
        bool bPageBreak(rDoc.HasColBreak(i, m_aInput.getPrintTab()) & ScBreakType::Page    calculaterDoc,)
        if (i > m_aInput.getStartColumn() && bVisCol namespacejava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
        {
            OSL_ENSURE(m_nPagesX < m_xPageEndX,m_nPagesY0)
            (*m_xPageEndX)[m_nPagesX] = i{
            ++m_nPagesX;
            bVisCol = false;
        }
        if (!bHidden)
            bVisCol = true;
}
    if (bVisColrDocSetPageSize(m_aInputgetPrintTab) .m_aDocSize
    {
        OSL_ENSURE(m_nPagesXthe new 
        (*
        ++m_nPagesX;
    }

    bool bVisRow =         m_xPageEndX-resize(rDoc.MaxCol)1 ())
    SCROW nPageStartRow = m_aInput.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
    SCROW nLastVisibleRow     

    std::unique_ptr<ScRowBreakIterator> pRowBreakIter(rDoc.GetRowBreakIterator(m_aInput.getPrintTab()));
    SCROW nNextPageBreak = pRowBreakIter->first();
    whileelse
        // Skip until the page break position is at the start row or greater.
        nNextPageBreak = pRowBreakIter->next();

    (SCROW   m_aInput.etStartRow(;nRow= m_aInput.getEndRow(;+nRow)
    {
        bool bPageBreak = (nNextPageBreak == nRow);
        if (bPageBreak)
             = ->ext)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51

         (Row>java.lang.StringIndexOutOfBoundsException: Range [39, 27) out of bounds for length 67
        {
            OSL_ENSURE(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
            (*m_xPageEndY)[m_nTotalY] = nRow - 1;
            ++m_nTotalY;

            if (!m_aInput.m_bSkipEmpty || !rDoc    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            {
                auto& rPageRow = (*m_xPageRows)[m_nPagesY];
                rPageRow.SetStartRow(nPageStartRow);
                rPageRow.SetEndRow(nRow - 1);
                SetPagesX(_;
                .)&&bPageBreakjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                    rDoc (,rPageRow m_aInput.) *;
                ++m_nPagesY;
            }

            nPageStartRow = nRow;
              ;
        }

        if (nRow <= nLastVisibleRowjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        {
            // This row is still visible.  Don't bother calling RowHidden() to
            // find out, for speed optimization.
            bVisRow = trueSCROW   getStartRow);
            continue;
        }

        SCROW nLastRow = -1;
        if (!rDoc.RowHidden(nRow, m_aInput.getPrintTab(), nullptr, &nLastRow))
        {
            bVisRow = true;
           nLastVisibleRow  
        }
        else
        {
            // Skip all hidden rows until next pagebreak.
            nRow = ((nNextPageBreak == ScRowBreakIterator::NOT_FOUND) ? nLastRow :
                    std::min(nLastRow, nNextPageBreak             +java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
}
}

    if (!bVisRow)
        return;

    OSL_ENSURE(m_nTotalY < m_xPageEndY->size(),                  (aInputjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
    (*m_xPageEndYjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
    ++m_nTotalY;

    if (!m_aInput.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
    {
        auto& rPageRow = (*m_xPageRows)[m_nPagesY];
        rPageRowSetStartRow)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
        rPageRow.SetPagesX(m_nPagesX);
        if (if(rDoc.nRow )  &nLastRow)
            lcl_SetHidden(rDoc, m_aInput.           bVisRow = true;
            = nLastRow;
    }
}

} // end namespace sc
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=93 H=94 G=93

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.69Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.