/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed 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 the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ #include <ScrollHelper.hxx> #include <DesignView.hxx> #include <ReportController.hxx> #include <ReportWindow.hxx> #include <UITools.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp>
// now set the ranges without start marker
Fraction aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100);
tools::Long nWidth = tools::Long(_nWidth - static_cast<double>(aStartWidth));
m_aHScroll->SetRangeMax( nWidth );
m_aVScroll->SetRangeMax( m_aTotalPixelSize.Height() );
Resize();
}
Size OScrollWindowHelper::ResizeScrollBars()
{ // get the new output-size in pixel
Size aOutPixSz = GetOutputSizePixel(); if ( aOutPixSz.IsEmpty() ) return aOutPixSz;
aOutPixSz.AdjustHeight( -(m_aReportWindow->getRulerHeight()) ); // determine the size of the output-area and if we need scrollbars const tools::Long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); bool bVVisible = false; // by default no vertical-ScrollBar bool bHVisible = false; // by default no horizontal-ScrollBar bool bChanged; // determines if a visibility was changed do
{
bChanged = false;
// does we need a vertical ScrollBar if ( aOutPixSz.Width() < m_aTotalPixelSize.Width() && !bHVisible )
{
bHVisible = true;
aOutPixSz.AdjustHeight( -nScrSize );
bChanged = true;
}
// does we need a horizontal ScrollBar if ( aOutPixSz.Height() < m_aTotalPixelSize.Height() && !bVVisible )
{
bVVisible = true;
aOutPixSz.AdjustWidth( -nScrSize );
bChanged = true;
}
} while ( bChanged ); // until no visibility has changed
¤ 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.0.17Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-07)
¤
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.