split OutputDevice from Window
as part of a longer-term goal of doing our
widget rendering only inside a top-level render-
context.
I moved all of the OutputDevice-related code that existed in vcl::Window
into a new subclass of OutputDevice called WindowOutputDevice.
Notes for further work
(*) not sure why we are getting an 1x1 surface in
SvpSalGraphics::releaseCairoContext, but to fix it I clamp
the size there
(*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice
(*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code?
Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
c8cf2e0e08
commit
9090dc1f3b
@@ -1239,13 +1239,13 @@ void EditorWindow::ImplSetFont()
|
||||
{
|
||||
vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED,
|
||||
Application::GetSettings().GetUILanguageTag().getLanguageType(),
|
||||
GetDefaultFontFlags::NONE, this));
|
||||
GetDefaultFontFlags::NONE, GetOutDev()));
|
||||
sFontName = aTmpFont.GetFamilyName();
|
||||
}
|
||||
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
|
||||
vcl::Font aFont(sFontName, aFontSize);
|
||||
aFont.SetColor(rModulWindow.GetLayout().GetFontColor());
|
||||
SetPointFont(*this, aFont); // FIXME RenderContext
|
||||
SetPointFont(*GetOutDev(), aFont); // FIXME RenderContext
|
||||
aFont = GetFont();
|
||||
|
||||
rModulWindow.GetBreakPointWindow().SetFont(aFont);
|
||||
@@ -1330,7 +1330,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted )
|
||||
rModulWindow.GetBreakPoints().AdjustBreakPoints( static_cast<sal_uInt16>(nPara)+1, bInserted );
|
||||
|
||||
tools::Long nLineHeight = GetTextHeight();
|
||||
Size aSz = rModulWindow.GetBreakPointWindow().GetOutputSize();
|
||||
Size aSz = rModulWindow.GetBreakPointWindow().GetOutDev()->GetOutputSize();
|
||||
tools::Rectangle aInvRect( Point( 0, 0 ), aSz );
|
||||
tools::Long nY = nPara*nLineHeight - rModulWindow.GetBreakPointWindow().GetCurYOffset();
|
||||
aInvRect.SetTop( nY );
|
||||
@@ -1417,7 +1417,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
|
||||
if (nMarkerPos == NoMarker)
|
||||
return;
|
||||
|
||||
Size const aOutSz = GetOutputSize();
|
||||
Size const aOutSz = GetOutDev()->GetOutputSize();
|
||||
tools::Long const nLineHeight = GetTextHeight();
|
||||
|
||||
Image aMarker = GetImage(OUString(bErrorMarker ? std::u16string_view(u"" RID_BMP_ERRORMARKER) : std::u16string_view(u"" RID_BMP_STEPMARKER)));
|
||||
|
||||
@@ -1232,7 +1232,7 @@ void DialogWindow::InitSettings()
|
||||
// FIXME RenderContext
|
||||
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
||||
vcl::Font aFont = rStyleSettings.GetFieldFont();
|
||||
SetPointFont(*this, aFont);
|
||||
SetPointFont(*GetOutDev(), aFont);
|
||||
|
||||
SetTextColor( rStyleSettings.GetFieldTextColor() );
|
||||
SetTextFillColor();
|
||||
|
||||
@@ -420,8 +420,8 @@ void Layout::SplittedSide::InitSplitter (Splitter& rSplitter)
|
||||
rSplitter.SetSplitHdl(LINK(this, SplittedSide, SplitHdl));
|
||||
// color
|
||||
Color aColor = rLayout.GetSettings().GetStyleSettings().GetShadowColor();
|
||||
rSplitter.SetLineColor(aColor);
|
||||
rSplitter.SetFillColor(aColor);
|
||||
rSplitter.GetOutDev()->SetLineColor(aColor);
|
||||
rSplitter.GetOutDev()->SetFillColor(aColor);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ DlgEditor::DlgEditor (
|
||||
,m_xDocument( xModel )
|
||||
{
|
||||
pDlgEdModel->GetItemPool().FreezeIdRanges();
|
||||
pDlgEdView.reset(new DlgEdView(*pDlgEdModel, rWindow_, *this));
|
||||
pDlgEdView.reset(new DlgEdView(*pDlgEdModel, *rWindow_.GetOutDev(), *this));
|
||||
pDlgEdModel->SetScaleUnit( MapUnit::Map100thMM );
|
||||
|
||||
SdrLayerAdmin& rAdmin = pDlgEdModel->GetLayerAdmin();
|
||||
@@ -274,7 +274,7 @@ void DlgEditor::InitScrollBars()
|
||||
if ( !pHScroll || !pVScroll )
|
||||
return;
|
||||
|
||||
Size aOutSize = rWindow.GetOutputSize();
|
||||
Size aOutSize = rWindow.GetOutDev()->GetOutputSize();
|
||||
Size aPgSize = pDlgEdPage->GetSize();
|
||||
|
||||
pHScroll->SetRange( Range( 0, aPgSize.Width() ));
|
||||
|
||||
@@ -342,7 +342,7 @@ void DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
|
||||
SdrView& rView = rParent.GetView();
|
||||
vcl::Window& rWindow = rParent.GetWindow();
|
||||
rView.SetActualWin(&rWindow);
|
||||
rView.SetActualWin(rWindow.GetOutDev());
|
||||
|
||||
Point aPos = rWindow.PixelToLogic( rMEvt.GetPosPixel() );
|
||||
sal_uInt16 nHitLog = static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
|
||||
@@ -378,7 +378,7 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
|
||||
SdrView& rView = rParent.GetView();
|
||||
vcl::Window& rWindow = rParent.GetWindow();
|
||||
rView.SetActualWin(&rWindow);
|
||||
rView.SetActualWin(rWindow.GetOutDev());
|
||||
|
||||
rWindow.ReleaseMouse();
|
||||
|
||||
@@ -408,7 +408,7 @@ void DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
|
||||
{
|
||||
SdrView& rView = rParent.GetView();
|
||||
vcl::Window& rWindow = rParent.GetWindow();
|
||||
rView.SetActualWin(&rWindow);
|
||||
rView.SetActualWin(rWindow.GetOutDev());
|
||||
|
||||
Point aPos = rWindow.PixelToLogic(rMEvt.GetPosPixel());
|
||||
sal_uInt16 nHitLog = static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
|
||||
@@ -419,7 +419,7 @@ void DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
|
||||
rView.MovAction(aPos);
|
||||
}
|
||||
|
||||
rWindow.SetPointer( rView.GetPreferredPointer( aPos, &rWindow, nHitLog ) );
|
||||
rWindow.SetPointer( rView.GetPreferredPointer( aPos, rWindow.GetOutDev(), nHitLog ) );
|
||||
}
|
||||
|
||||
DlgEdFuncSelect::DlgEdFuncSelect (DlgEditor& rParent_) :
|
||||
@@ -436,7 +436,7 @@ void DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
// get view from parent
|
||||
SdrView& rView = rParent.GetView();
|
||||
vcl::Window& rWindow = rParent.GetWindow();
|
||||
rView.SetActualWin(&rWindow);
|
||||
rView.SetActualWin(rWindow.GetOutDev());
|
||||
|
||||
sal_uInt16 nDrgLog = static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
|
||||
sal_uInt16 nHitLog = static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
|
||||
@@ -497,7 +497,7 @@ bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
// get view from parent
|
||||
SdrView& rView = rParent.GetView();
|
||||
vcl::Window& rWindow = rParent.GetWindow();
|
||||
rView.SetActualWin(&rWindow);
|
||||
rView.SetActualWin(rWindow.GetOutDev());
|
||||
|
||||
Point aPnt = rWindow.PixelToLogic(rMEvt.GetPosPixel());
|
||||
sal_uInt16 nHitLog = static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
|
||||
@@ -516,7 +516,7 @@ bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
}
|
||||
}
|
||||
|
||||
rWindow.SetPointer( rView.GetPreferredPointer( aPnt, &rWindow, nHitLog ) );
|
||||
rWindow.SetPointer( rView.GetPreferredPointer( aPnt, rWindow.GetOutDev(), nHitLog ) );
|
||||
rWindow.ReleaseMouse();
|
||||
|
||||
return true;
|
||||
@@ -526,7 +526,7 @@ void DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
|
||||
{
|
||||
SdrView& rView = rParent.GetView();
|
||||
vcl::Window& rWindow = rParent.GetWindow();
|
||||
rView.SetActualWin(&rWindow);
|
||||
rView.SetActualWin(rWindow.GetOutDev());
|
||||
|
||||
Point aPnt = rWindow.PixelToLogic(rMEvt.GetPosPixel());
|
||||
sal_uInt16 nHitLog = static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
|
||||
@@ -540,7 +540,7 @@ void DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
|
||||
rView.MovAction(aPnt_);
|
||||
}
|
||||
|
||||
rWindow.SetPointer( rView.GetPreferredPointer( aPnt, &rWindow, nHitLog ) );
|
||||
rWindow.SetPointer( rView.GetPreferredPointer( aPnt, rWindow.GetOutDev(), nHitLog ) );
|
||||
}
|
||||
|
||||
} // namespace basctl
|
||||
|
||||
@@ -152,7 +152,7 @@ uno::Reference< awt::XControl > DlgEdObj::GetControl() const
|
||||
if (DlgEdForm const* pForm = GetDlgEdForm())
|
||||
{
|
||||
DlgEditor const& rEditor = pForm->GetDlgEditor();
|
||||
xControl = GetUnoControl(rEditor.GetView(), rEditor.GetWindow());
|
||||
xControl = GetUnoControl(rEditor.GetView(), *rEditor.GetWindow().GetOutDev());
|
||||
}
|
||||
return xControl;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void DlgEdView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin )
|
||||
// visible area
|
||||
MapMode aMap( rWin.GetMapMode() );
|
||||
Point aOrg( aMap.GetOrigin() );
|
||||
Size aVisSize( rWin.GetOutputSize() );
|
||||
Size aVisSize( rWin.GetOutDev()->GetOutputSize() );
|
||||
tools::Rectangle RectTmp( Point(-aOrg.X(),-aOrg.Y()), aVisSize );
|
||||
tools::Rectangle aVisRect( RectTmp );
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <vcl/sysdata.hxx>
|
||||
#include <vcl/skia/SkiaHelper.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include "cairo_canvas.hxx"
|
||||
@@ -68,7 +69,6 @@ namespace cairocanvas
|
||||
sal_Int64 nPtr = 0;
|
||||
maArguments[0] >>= nPtr;
|
||||
OutputDevice* pOutDev = reinterpret_cast<OutputDevice*>(nPtr);
|
||||
|
||||
ENSURE_ARG_OR_THROW( pOutDev != nullptr,
|
||||
"Canvas::initialize: invalid OutDev pointer" );
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace cairocanvas
|
||||
throw lang::NoSupportException(
|
||||
"Parent window not VCL window, or canvas out-of-process!", nullptr);
|
||||
|
||||
bool bHasCairo = pParentWindow->SupportsCairo();
|
||||
bool bHasCairo = pParentWindow->GetOutDev()->SupportsCairo();
|
||||
ENSURE_ARG_OR_THROW(bHasCairo,
|
||||
"CairoSpriteCanvas::SpriteCanvas: No Cairo capability");
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace cairocanvas
|
||||
bool bFullscreen )
|
||||
{
|
||||
DeviceHelper::init(rSpriteCanvas,
|
||||
rOutputWindow);
|
||||
*rOutputWindow.GetOutDev());
|
||||
|
||||
mpSpriteCanvas = &rSpriteCanvas;
|
||||
mbFullScreen = bFullscreen;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <vcl/sysdata.hxx>
|
||||
#include <vcl/skia/SkiaHelper.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
|
||||
#include <canvas/canvastools.hxx>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <sal/log.hxx>
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <vcl/outdev.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
|
||||
#include "outdevholder.hxx"
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
explicit OutDevHolder(OutputDevice& rOutDev)
|
||||
: mrOutDev(rOutDev)
|
||||
{
|
||||
assert(&rOutDev);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace vclcanvas
|
||||
vcl::Window* pTargetWindow = nullptr;
|
||||
if( rOutDev.GetOutDevType() == OUTDEV_WINDOW )
|
||||
{
|
||||
pTargetWindow = &static_cast<vcl::Window&>(rOutDev); // TODO(Q3): Evil downcast.
|
||||
pTargetWindow = rOutDev.GetOwnerWindow(); // TODO(Q3): Evil downcast.
|
||||
|
||||
// we're double-buffered, thus no need for paint area-limiting
|
||||
// clips. besides that, will interfere with animations (as for
|
||||
@@ -309,7 +309,7 @@ namespace vclcanvas
|
||||
if( pTargetWindow )
|
||||
{
|
||||
// commit to screen
|
||||
pTargetWindow->Flush();
|
||||
pTargetWindow->GetOutDev()->Flush();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace vclcanvas
|
||||
explicit WindowOutDevHolder( const css::uno::Reference< css::awt::XWindow>& xWin );
|
||||
|
||||
private:
|
||||
virtual OutputDevice& getOutDev() override { return mrOutputWindow; }
|
||||
virtual const OutputDevice& getOutDev() const override { return mrOutputWindow; }
|
||||
virtual OutputDevice& getOutDev() override { return *mrOutputWindow.GetOutDev(); }
|
||||
virtual const OutputDevice& getOutDev() const override { return *mrOutputWindow.GetOutDev(); }
|
||||
|
||||
// TODO(Q2): Lifetime issue. Though WindowGraphicDeviceBase
|
||||
// now listens to the window component, I still consider
|
||||
|
||||
@@ -536,7 +536,7 @@ void TestWindow::Paint(vcl::RenderContext&, const tools::Rectangle&)
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< rendering::XCanvas > xVDevCanvas( GetCanvas(),
|
||||
uno::Reference< rendering::XCanvas > xVDevCanvas( GetOutDev()->GetCanvas(),
|
||||
uno::UNO_SET_THROW );
|
||||
uno::Reference< rendering::XGraphicDevice > xVDevDevice( xVDevCanvas->getDevice(),
|
||||
uno::UNO_SET_THROW );
|
||||
@@ -551,7 +551,7 @@ void TestWindow::Paint(vcl::RenderContext&, const tools::Rectangle&)
|
||||
aVDevRenderer.drawArcs();
|
||||
aVDevRenderer.drawPolygons();
|
||||
|
||||
uno::Reference< rendering::XCanvas > xCanvas( GetSpriteCanvas(),
|
||||
uno::Reference< rendering::XCanvas > xCanvas( GetOutDev()->GetSpriteCanvas(),
|
||||
uno::UNO_QUERY_THROW );
|
||||
uno::Reference< rendering::XGraphicDevice > xDevice( xCanvas->getDevice(),
|
||||
uno::UNO_SET_THROW );
|
||||
|
||||
@@ -84,7 +84,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
|
||||
SdrObject * pTextObj = m_pDrawViewWrapper->getNamedSdrObject( aCID );
|
||||
if( pTextObj )
|
||||
{
|
||||
m_pTextHelper.reset( new ::accessibility::AccessibleTextHelper(std::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow)) );
|
||||
m_pTextHelper.reset( new ::accessibility::AccessibleTextHelper(std::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow->GetOutDev())) );
|
||||
m_pTextHelper->SetEventSource( xEventSource );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ void ChartController::impl_createDrawViewController()
|
||||
{
|
||||
if( m_pDrawModelWrapper )
|
||||
{
|
||||
m_pDrawViewWrapper.reset( new DrawViewWrapper(m_pDrawModelWrapper->getSdrModel(),GetChartWindow()) );
|
||||
m_pDrawViewWrapper.reset( new DrawViewWrapper(m_pDrawModelWrapper->getSdrModel(),GetChartWindow()->GetOutDev()) );
|
||||
m_pDrawViewWrapper->attachParentReferenceDevice( getModel() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ void SAL_CALL ChartController::setPosSize(
|
||||
//a correct work area is at least necessary for correct values in the position and size dialog and for dragging area
|
||||
if(m_pDrawViewWrapper)
|
||||
{
|
||||
tools::Rectangle aRect(Point(0,0), pChartWindow->GetOutputSize());
|
||||
tools::Rectangle aRect(Point(0,0), pChartWindow->GetOutDev()->GetOutputSize());
|
||||
m_pDrawViewWrapper->SetWorkArea( aRect );
|
||||
}
|
||||
pChartWindow->Invalidate();
|
||||
@@ -600,7 +600,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
|
||||
// #i12587# support for shapes in chart
|
||||
( rMEvt.IsRight() && pDrawViewWrapper->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) == SdrHitKind::MarkedObject ) )
|
||||
{
|
||||
pDrawViewWrapper->MouseButtonDown(rMEvt, pChartWindow);
|
||||
pDrawViewWrapper->MouseButtonDown(rMEvt, pChartWindow->GetOutDev());
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -725,7 +725,7 @@ void ChartController::execute_MouseMove( const MouseEvent& rMEvt )
|
||||
|
||||
if( m_pDrawViewWrapper->IsTextEdit() )
|
||||
{
|
||||
if( m_pDrawViewWrapper->MouseMove(rMEvt,pChartWindow) )
|
||||
if( m_pDrawViewWrapper->MouseMove(rMEvt,pChartWindow->GetOutDev()) )
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -771,7 +771,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
|
||||
|
||||
if(pDrawViewWrapper->IsTextEdit())
|
||||
{
|
||||
if( pDrawViewWrapper->MouseButtonUp(rMEvt,pChartWindow) )
|
||||
if( pDrawViewWrapper->MouseButtonUp(rMEvt,pChartWindow->GetOutDev()) )
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1925,7 +1925,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
|
||||
if( m_pDrawViewWrapper->IsTextEditHit( aMousePos ) )
|
||||
{
|
||||
pChartWindow->SetPointer( m_pDrawViewWrapper->GetPreferredPointer(
|
||||
aMousePos, pChartWindow, nModifier, bLeftDown ) );
|
||||
aMousePos, pChartWindow->GetOutDev(), nModifier, bLeftDown ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1941,7 +1941,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
|
||||
if( pHitSelectionHdl )
|
||||
{
|
||||
PointerStyle aPointer = m_pDrawViewWrapper->GetPreferredPointer(
|
||||
aMousePos, pChartWindow, nModifier, bLeftDown );
|
||||
aMousePos, pChartWindow->GetOutDev(), nModifier, bLeftDown );
|
||||
bool bForceArrowPointer = false;
|
||||
|
||||
ObjectIdentifier aOID( m_aSelection.getSelectedOID() );
|
||||
|
||||
@@ -61,7 +61,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi
|
||||
SetMapMode( MapMode(MapUnit::Map100thMM) );
|
||||
adjustHighContrastMode();
|
||||
// chart does not depend on exact pixel painting => enable antialiased drawing
|
||||
SetAntialiasing( AntialiasingFlags::Enable | GetAntialiasing() );
|
||||
GetOutDev()->SetAntialiasing( AntialiasingFlags::Enable | GetOutDev()->GetAntialiasing() );
|
||||
EnableRTL( false );
|
||||
if( pParent )
|
||||
pParent->EnableRTL( false );// #i96215# necessary for a correct position of the context menu in rtl mode
|
||||
@@ -252,7 +252,7 @@ void ChartWindow::adjustHighContrastMode()
|
||||
DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
|
||||
|
||||
bool bUseContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
|
||||
SetDrawMode( bUseContrast ? nContrastMode : DrawModeFlags::Default );
|
||||
GetOutDev()->SetDrawMode( bUseContrast ? nContrastMode : DrawModeFlags::Default );
|
||||
}
|
||||
|
||||
void ChartWindow::ForceInvalidate()
|
||||
|
||||
@@ -596,11 +596,13 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl )
|
||||
// check the last thing that the dispose() method does, is to call into the superclass dispose method
|
||||
if (loplugin::DeclCheck(functionDecl).Function("dispose")) {
|
||||
if (!isDisposeCallingSuperclassDispose(pMethodDecl)) {
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
BASE_REF_COUNTED_CLASS " subclass dispose() function MUST call dispose() of its superclass as the last thing it does",
|
||||
compat::getBeginLoc(functionDecl))
|
||||
<< functionDecl->getSourceRange();
|
||||
// We specifically have to clear a member variable AFTER calling super::dispose() here, unfortunately
|
||||
if (!loplugin::DeclCheck(pMethodDecl->getParent()).Class("WindowOutputDevice"))
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
BASE_REF_COUNTED_CLASS " subclass dispose() function MUST call dispose() of its superclass as the last thing it does",
|
||||
compat::getBeginLoc(functionDecl))
|
||||
<< functionDecl->getSourceRange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ void CanvasTest::testComposite()
|
||||
#ifdef LINUX
|
||||
ScopedVclPtrInstance<WorkWindow> pWin( nullptr, WB_STDWORK );
|
||||
|
||||
uno::Reference<rendering::XCanvas> xCanvas = pWin->GetCanvas ();
|
||||
uno::Reference<rendering::XCanvas> xCanvas = pWin->GetOutDev()->GetCanvas ();
|
||||
if( !xCanvas.is() )
|
||||
return; // can't get a canvas working at all - truly headless ?
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace cppcanvas
|
||||
SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow )
|
||||
{
|
||||
return std::make_shared<internal::ImplSpriteCanvas>(
|
||||
rVCLWindow.GetSpriteCanvas() );
|
||||
rVCLWindow.GetOutDev()->GetSpriteCanvas() );
|
||||
}
|
||||
|
||||
SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas )
|
||||
|
||||
@@ -462,7 +462,7 @@ void OApplicationView::ImplInitSettings()
|
||||
|
||||
vcl::Font aFont = rStyleSettings.GetFieldFont();
|
||||
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
|
||||
SetPointFont(*this, aFont);
|
||||
SetPointFont(*GetOutDev(), aFont);
|
||||
|
||||
SetTextColor( rStyleSettings.GetFieldTextColor() );
|
||||
SetTextFillColor();
|
||||
|
||||
@@ -1434,7 +1434,7 @@ void OJoinTableView::StateChanged( StateChangedType nType )
|
||||
vcl::Font aFont = rStyleSettings.GetGroupFont();
|
||||
if ( IsControlFont() )
|
||||
aFont.Merge( GetControlFont() );
|
||||
SetZoomedPointFont(*this, aFont);
|
||||
SetZoomedPointFont(*GetOutDev(), aFont);
|
||||
|
||||
for (auto const& elem : m_aTableMap)
|
||||
{
|
||||
|
||||
@@ -509,7 +509,7 @@ void OTableWindow::StateChanged( StateChangedType nType )
|
||||
vcl::Font aFont = rStyleSettings.GetGroupFont();
|
||||
if ( IsControlFont() )
|
||||
aFont.Merge( GetControlFont() );
|
||||
SetZoomedPointFont(*this, aFont);
|
||||
SetZoomedPointFont(*GetOutDev(), aFont);
|
||||
|
||||
m_xTitle->SetZoom(GetZoom());
|
||||
m_xListBox->SetZoom(GetZoom());
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash)
|
||||
: IntroWindow()
|
||||
, pSpl( pSplash )
|
||||
, _vdev(VclPtr<VirtualDevice>::Create(*this))
|
||||
, _vdev(VclPtr<VirtualDevice>::Create(*GetOutDev()))
|
||||
{
|
||||
_vdev->EnableRTL(IsRTLEnabled());
|
||||
}
|
||||
@@ -138,8 +138,8 @@ void SplashScreenWindow::Redraw()
|
||||
Invalidate();
|
||||
// Trigger direct painting too - otherwise the splash screen won't be
|
||||
// shown in some cases (when the idle timer won't be hit).
|
||||
Paint(*this, tools::Rectangle());
|
||||
Flush();
|
||||
Paint(*GetOutDev(), tools::Rectangle());
|
||||
GetOutDev()->Flush();
|
||||
}
|
||||
|
||||
SplashScreen::SplashScreen()
|
||||
|
||||
@@ -1051,9 +1051,9 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
|
||||
Point P2( P1 );
|
||||
P2.AdjustX(n20 );
|
||||
P2.AdjustY(nH );
|
||||
pEditView->GetWindow()->SetLineColor();
|
||||
pEditView->GetWindow()->SetFillColor( (n%2) ? COL_YELLOW : COL_LIGHTGREEN );
|
||||
pEditView->GetWindow()->DrawRect( tools::Rectangle( P1, P2 ) );
|
||||
pEditView->GetWindow()->GetOutDev()->SetLineColor();
|
||||
pEditView->GetWindow()->GetOutDev()->SetFillColor( (n%2) ? COL_YELLOW : COL_LIGHTGREEN );
|
||||
pEditView->GetWindow()->GetOutDev()->DrawRect( tools::Rectangle( P1, P2 ) );
|
||||
aPos.AdjustY(nH );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ void ImpEditView::lokSelectionCallback(const std::unique_ptr<tools::PolyPolygon>
|
||||
}
|
||||
else
|
||||
{
|
||||
pOutWin->Push(PushFlags::MAPMODE);
|
||||
pOutWin->GetOutDev()->Push(PushFlags::MAPMODE);
|
||||
if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip)
|
||||
{
|
||||
// Find the parent that is not right
|
||||
@@ -442,7 +442,7 @@ void ImpEditView::lokSelectionCallback(const std::unique_ptr<tools::PolyPolygon>
|
||||
mpViewShell->NotifyOtherViews(LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", sRectangle);
|
||||
}
|
||||
|
||||
pOutWin->Pop();
|
||||
pOutWin->GetOutDev()->Pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -705,7 +705,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice& rTarget, const Point& rDo
|
||||
|
||||
if (pWindow)
|
||||
{
|
||||
pWindow->Invert( aRect );
|
||||
pWindow->GetOutDev()->Invert( aRect );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -822,7 +822,7 @@ OutputDevice& ImpEditView::GetOutputDevice() const
|
||||
{
|
||||
if (EditViewCallbacks* pCallbacks = getEditViewCallbacks())
|
||||
return pCallbacks->EditViewOutputDevice();
|
||||
return *pOutWin;
|
||||
return *pOutWin->GetOutDev();
|
||||
}
|
||||
|
||||
weld::Widget* ImpEditView::GetPopupParent(tools::Rectangle& rRect) const
|
||||
|
||||
@@ -582,7 +582,7 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
|
||||
{
|
||||
if ( ( rMEvt.GetClicks() == 1 ) && rMEvt.IsLeft() && !rMEvt.IsMod2() )
|
||||
{
|
||||
const OutputDevice& rOutDev = pView->getEditViewCallbacks() ? pView->getEditViewCallbacks()->EditViewOutputDevice() : *pView->GetWindow();
|
||||
const OutputDevice& rOutDev = pView->getEditViewCallbacks() ? pView->getEditViewCallbacks()->EditViewOutputDevice() : *pView->GetWindow()->GetOutDev();
|
||||
Point aLogicClick = rOutDev.PixelToLogic(rMEvt.GetPosPixel());
|
||||
if (const SvxFieldItem* pFld = pView->GetField(aLogicClick))
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <vcl/metaact.hxx>
|
||||
#include <vcl/gdimtf.hxx>
|
||||
#include <vcl/settings.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
|
||||
#include <editeng/tstpitem.hxx>
|
||||
#include <editeng/lspcitem.hxx>
|
||||
@@ -3782,7 +3783,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, Ou
|
||||
tools::Rectangle aClipRect( pView->GetOutputArea() );
|
||||
aClipRect.Intersection( rRect );
|
||||
|
||||
OutputDevice& rTarget = pTargetDevice ? *pTargetDevice : pView->GetOutputDevice();
|
||||
OutputDevice& rTarget = pTargetDevice ? *pTargetDevice : *pView->GetWindow()->GetOutDev();
|
||||
|
||||
Point aStartPos;
|
||||
if ( !IsVertical() )
|
||||
|
||||
@@ -52,7 +52,7 @@ bool SvxDrawOutlinerViewForwarder::IsValid() const
|
||||
|
||||
Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
|
||||
{
|
||||
OutputDevice* pOutDev = mrOutlinerView.GetWindow();
|
||||
OutputDevice* pOutDev = mrOutlinerView.GetWindow()->GetOutDev();
|
||||
|
||||
if( pOutDev )
|
||||
{
|
||||
@@ -74,7 +74,7 @@ Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const Map
|
||||
|
||||
Point SvxDrawOutlinerViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
|
||||
{
|
||||
OutputDevice* pOutDev = mrOutlinerView.GetWindow();
|
||||
OutputDevice* pOutDev = mrOutlinerView.GetWindow()->GetOutDev();
|
||||
|
||||
if( pOutDev )
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace frm
|
||||
}
|
||||
|
||||
// ensure that it's initially scrolled to the upper left
|
||||
m_pView->SetVisArea( tools::Rectangle( Point( ), m_pViewport->GetOutputSize() ) );
|
||||
m_pView->SetVisArea( tools::Rectangle( Point( ), m_pViewport->GetOutDev()->GetOutputSize() ) );
|
||||
|
||||
ensureScrollbars();
|
||||
|
||||
@@ -451,10 +451,10 @@ namespace frm
|
||||
tools::Long nFontWidth = m_pEngine->GetStandardFont(0).GetFontSize().Width();
|
||||
if ( !nFontWidth )
|
||||
{
|
||||
m_pViewport->Push( PushFlags::FONT );
|
||||
m_pViewport->GetOutDev()->Push( PushFlags::FONT );
|
||||
m_pViewport->SetFont( m_pEngine->GetStandardFont(0) );
|
||||
nFontWidth = m_pViewport->GetTextWidth( "x" );
|
||||
m_pViewport->Pop();
|
||||
m_pViewport->GetOutDev()->Pop();
|
||||
}
|
||||
// ... is the scroll size for the horizontal scrollbar
|
||||
m_pHScroll->SetLineSize( 5 * nFontWidth );
|
||||
|
||||
@@ -58,7 +58,7 @@ void SAL_CALL VCLStatusIndicator::start(const OUString& sText ,
|
||||
// force repaint!
|
||||
pParentWindow->Show();
|
||||
pParentWindow->Invalidate(InvalidateFlags::Children);
|
||||
pParentWindow->Flush();
|
||||
pParentWindow->GetOutDev()->Flush();
|
||||
|
||||
m_nRange = nRange;
|
||||
m_nValue = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
if (aControlRectHMM.IsInside(aPointHmm))
|
||||
{
|
||||
css::uno::Reference<css::awt::XControl> xControl
|
||||
= pUnoObect->GetUnoControl(*pDrawView, rMainWindow);
|
||||
= pUnoObect->GetUnoControl(*pDrawView, *rMainWindow.GetOutDev());
|
||||
if (!xControl.is())
|
||||
return false;
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
tools::Rectangle const& rTileRectHMM, double scaleX, double scaleY)
|
||||
{
|
||||
css::uno::Reference<css::awt::XControl> xControl
|
||||
= pUnoObect->GetUnoControl(*pDrawView, rMainWindow);
|
||||
= pUnoObect->GetUnoControl(*pDrawView, *rMainWindow.GetOutDev());
|
||||
if (!xControl.is())
|
||||
return;
|
||||
|
||||
|
||||
@@ -839,10 +839,6 @@ private:
|
||||
// upper module, you should investigate whether you really wanted to call base class methods,
|
||||
// or the versions at this class. In the latter case, use the renamed versions above.
|
||||
|
||||
// Set/GetLineColor - superseded by Set/GetGridLineColor
|
||||
using OutputDevice::SetLineColor;
|
||||
using OutputDevice::GetLineColor;
|
||||
|
||||
// ToTop/ToBottom were never property implemented. If you currently call it, this is most probably wrong
|
||||
// and not doing as intended
|
||||
using Window::ToTop;
|
||||
|
||||
@@ -123,10 +123,14 @@ public:
|
||||
|
||||
virtual void SetWindow( const VclPtr< vcl::Window > &pWindow );
|
||||
template< class derived_type > derived_type* GetAs() const {
|
||||
return static_cast< derived_type * >( GetOutputDevice().get() ); }
|
||||
return static_cast< derived_type * >( GetWindow() ); }
|
||||
template< class derived_type > derived_type* GetAsDynamic() const {
|
||||
return dynamic_cast< derived_type * >( GetOutputDevice().get() ); }
|
||||
vcl::Window* GetWindow() const { return GetAs<vcl::Window>(); }
|
||||
return dynamic_cast< derived_type * >( GetWindow() ); }
|
||||
vcl::Window* GetWindow() const
|
||||
{
|
||||
auto p = GetOutputDevice().get();
|
||||
return p ? p->GetOwnerWindow() : nullptr;
|
||||
}
|
||||
|
||||
void suspendVclEventListening( );
|
||||
void resumeVclEventListening( );
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace vcl
|
||||
struct FontCapabilities;
|
||||
class TextLayoutCache;
|
||||
class Window;
|
||||
class WindowOutputDevice;
|
||||
namespace font {
|
||||
struct Feature;
|
||||
}
|
||||
@@ -163,6 +164,7 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC OutputDevice : public virtual VclReferenceBa
|
||||
friend class Printer;
|
||||
friend class VirtualDevice;
|
||||
friend class vcl::Window;
|
||||
friend class vcl::WindowOutputDevice;
|
||||
friend class WorkWindow;
|
||||
friend void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
|
||||
|
||||
@@ -1898,6 +1900,9 @@ public:
|
||||
public:
|
||||
virtual css::awt::DeviceInfo GetDeviceInfo() const;
|
||||
|
||||
/** Get the vcl::Window that this OutputDevice belongs to, if any */
|
||||
virtual vcl::Window* GetOwnerWindow() const { return nullptr; }
|
||||
|
||||
protected:
|
||||
css::awt::DeviceInfo GetCommonDeviceInfo(Size const& aDevSize) const;
|
||||
|
||||
|
||||
@@ -227,6 +227,8 @@ public:
|
||||
SAL_DLLPRIVATE int ImplGetDragWidth() const;
|
||||
static SAL_DLLPRIVATE int ImplGetDragWidth( const vcl::RenderContext& rRenderContext,
|
||||
bool bHorz );
|
||||
static SAL_DLLPRIVATE int ImplGetDragWidth( const vcl::Window& rWindow,
|
||||
bool bHorz );
|
||||
SAL_DLLPRIVATE void ImplUpdateDragArea() const;
|
||||
SAL_DLLPRIVATE void ImplCalcBorder( WindowAlign eAlign, tools::Long& rLeft, tools::Long& rTop,
|
||||
tools::Long& rRight, tools::Long& rBottom ) const;
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
void SetClickHdl( const Link<SvtIconChoiceCtrl*,void>& rLink ) { _aClickIconHdl = rLink; }
|
||||
|
||||
using OutputDevice::SetBackground;
|
||||
using Window::SetBackground;
|
||||
void SetBackground( const Wallpaper& rWallpaper );
|
||||
|
||||
void ArrangeIcons();
|
||||
|
||||
+143
-36
@@ -389,6 +389,7 @@ const char* ImplDbgCheckWindow( const void* pObj );
|
||||
|
||||
namespace vcl { class Window; }
|
||||
namespace vcl { class Cursor; }
|
||||
namespace vcl { class WindowOutputDevice; }
|
||||
class Dialog;
|
||||
class Edit;
|
||||
class WindowImpl;
|
||||
@@ -449,9 +450,10 @@ public:
|
||||
Color const * pPaintColor = nullptr);
|
||||
};
|
||||
|
||||
class VCL_DLLPUBLIC Window : public ::OutputDevice
|
||||
class VCL_DLLPUBLIC Window : public virtual VclReferenceBase
|
||||
{
|
||||
friend class ::vcl::Cursor;
|
||||
friend class ::vcl::WindowOutputDevice;
|
||||
friend class ::OutputDevice;
|
||||
friend class ::Application;
|
||||
friend class ::SystemWindow;
|
||||
@@ -595,8 +597,6 @@ protected:
|
||||
SAL_DLLPRIVATE void PushPaintHelper(PaintHelper* pHelper, vcl::RenderContext& rRenderContext);
|
||||
SAL_DLLPRIVATE void PopPaintHelper(PaintHelper const * pHelper);
|
||||
|
||||
virtual css::uno::Reference< css::rendering::XCanvas > ImplGetCanvas( bool bSpriteCanvas ) const override;
|
||||
|
||||
private:
|
||||
|
||||
SAL_DLLPRIVATE void ImplSetFrameParent( const vcl::Window* pParent );
|
||||
@@ -708,10 +708,6 @@ private:
|
||||
|
||||
virtual void ImplPaintToDevice( ::OutputDevice* pTargetOutDev, const Point& rPos );
|
||||
|
||||
public:
|
||||
virtual vcl::Region GetActiveClipRegion() const override;
|
||||
virtual vcl::Region GetOutputBoundsClipRegion() const override;
|
||||
|
||||
protected:
|
||||
// Single argument ctors shall be explicit.
|
||||
explicit Window( WindowType nType );
|
||||
@@ -720,24 +716,9 @@ protected:
|
||||
|
||||
void CallEventListeners( VclEventId nEvent, void* pData = nullptr );
|
||||
|
||||
virtual bool AcquireGraphics() const override;
|
||||
virtual void ReleaseGraphics( bool bRelease = true ) override;
|
||||
|
||||
virtual void InitClipRegion() override;
|
||||
|
||||
void ImplClearFontData(bool bNewFontLists) override;
|
||||
void ImplRefreshFontData(bool bNewFontLists) override;
|
||||
void ImplInitMapModeObjects() override;
|
||||
|
||||
// FIXME: this is a hack to workaround missing layout functionality
|
||||
virtual void ImplAdjustNWFSizes();
|
||||
|
||||
virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate) override;
|
||||
virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice& rSrcDev) const override;
|
||||
virtual void DrawOutDevDirectProcess(const OutputDevice& rSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
|
||||
virtual void ClipToPaintRegion( tools::Rectangle& rDstRect ) override;
|
||||
virtual bool UsePolyPolygonForComplexGradient() override;
|
||||
|
||||
virtual void ApplySettings(vcl::RenderContext& rRenderContext);
|
||||
|
||||
public:
|
||||
@@ -749,12 +730,13 @@ public:
|
||||
::OutputDevice const* GetOutDev() const;
|
||||
::OutputDevice* GetOutDev();
|
||||
|
||||
bool CanEnableNativeWidget() const override { return IsNativeWidgetEnabled(); }
|
||||
Color GetBackgroundColor() const;
|
||||
const Wallpaper & GetBackground() const;
|
||||
bool IsBackground() const;
|
||||
const MapMode& GetMapMode() const;
|
||||
void SetBackground();
|
||||
void SetBackground( const Wallpaper& rBackground );
|
||||
|
||||
Color GetBackgroundColor() const override;
|
||||
|
||||
size_t GetSyncCount() const override { return 0x000000ff; }
|
||||
virtual void EnableRTL ( bool bEnable = true ) override;
|
||||
virtual void MouseMove( const MouseEvent& rMEvt );
|
||||
virtual void MouseButtonDown( const MouseEvent& rMEvt );
|
||||
virtual void MouseButtonUp( const MouseEvent& rMEvt );
|
||||
@@ -764,7 +746,6 @@ public:
|
||||
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
|
||||
virtual void PostPaint(vcl::RenderContext& rRenderContext);
|
||||
|
||||
using OutputDevice::Erase;
|
||||
void Erase(vcl::RenderContext& rRenderContext);
|
||||
|
||||
virtual void Draw( ::OutputDevice* pDev, const Point& rPos, DrawFlags nFlags );
|
||||
@@ -865,9 +846,6 @@ public:
|
||||
|
||||
void SetCompositionCharRect( const tools::Rectangle* pRect, tools::Long nCompositionLength, bool bVertical = false );
|
||||
|
||||
using ::OutputDevice::SetSettings;
|
||||
virtual void SetSettings( const AllSettings& rSettings ) override;
|
||||
void SetSettings( const AllSettings& rSettings, bool bChild );
|
||||
void UpdateSettings( const AllSettings& rSettings, bool bChild = false );
|
||||
void NotifyAllChildren( DataChangedEvent& rDCEvt );
|
||||
|
||||
@@ -1013,7 +991,6 @@ public:
|
||||
void Validate();
|
||||
bool HasPaintEvent() const;
|
||||
void PaintImmediately();
|
||||
void Flush() override;
|
||||
|
||||
// toggles new docking support, enabled via toolkit
|
||||
void EnableDocking( bool bEnable = true );
|
||||
@@ -1123,9 +1100,6 @@ public:
|
||||
ScrollBar* pHScrl,
|
||||
ScrollBar* pVScrl );
|
||||
|
||||
void SaveBackground(VirtualDevice& rSaveDevice,
|
||||
const Point& rPos, const Size& rSize, const Size&) const override;
|
||||
|
||||
virtual const SystemEnvData* GetSystemData() const;
|
||||
|
||||
// API to set/query the component interfaces
|
||||
@@ -1510,7 +1484,140 @@ public:
|
||||
void SetModalHierarchyHdl(const Link<bool, void>& rLink);
|
||||
void SetDumpAsPropertyTreeHdl(const Link<tools::JsonWriter&, void>& rLink);
|
||||
|
||||
css::awt::DeviceInfo GetDeviceInfo() const override;
|
||||
Size GetOutputSizePixel() const;
|
||||
tools::Rectangle GetOutputRectPixel() const;
|
||||
|
||||
Point LogicToPixel( const Point& rLogicPt ) const;
|
||||
Size LogicToPixel( const Size& rLogicSize ) const;
|
||||
tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const;
|
||||
tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
|
||||
tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
|
||||
basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
|
||||
vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
|
||||
Point LogicToPixel( const Point& rLogicPt,
|
||||
const MapMode& rMapMode ) const;
|
||||
Size LogicToPixel( const Size& rLogicSize,
|
||||
const MapMode& rMapMode ) const;
|
||||
tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect,
|
||||
const MapMode& rMapMode ) const;
|
||||
tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
|
||||
const MapMode& rMapMode ) const;
|
||||
basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly,
|
||||
const MapMode& rMapMode ) const;
|
||||
|
||||
Point PixelToLogic( const Point& rDevicePt ) const;
|
||||
Size PixelToLogic( const Size& rDeviceSize ) const;
|
||||
tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
|
||||
tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
|
||||
tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
|
||||
basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
|
||||
vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
|
||||
Point PixelToLogic( const Point& rDevicePt,
|
||||
const MapMode& rMapMode ) const;
|
||||
Size PixelToLogic( const Size& rDeviceSize,
|
||||
const MapMode& rMapMode ) const;
|
||||
tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect,
|
||||
const MapMode& rMapMode ) const;
|
||||
tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
|
||||
const MapMode& rMapMode ) const;
|
||||
basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon& rDevicePoly,
|
||||
const MapMode& rMapMode ) const;
|
||||
basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly,
|
||||
const MapMode& rMapMode ) const;
|
||||
|
||||
Point LogicToLogic( const Point& rPtSource,
|
||||
const MapMode* pMapModeSource,
|
||||
const MapMode* pMapModeDest ) const;
|
||||
Size LogicToLogic( const Size& rSzSource,
|
||||
const MapMode* pMapModeSource,
|
||||
const MapMode* pMapModeDest ) const;
|
||||
tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
|
||||
const MapMode* pMapModeSource,
|
||||
const MapMode* pMapModeDest ) const;
|
||||
|
||||
const AllSettings& GetSettings() const;
|
||||
void SetSettings( const AllSettings& rSettings );
|
||||
void SetSettings( const AllSettings& rSettings, bool bChild );
|
||||
|
||||
tools::Rectangle GetTextRect( const tools::Rectangle& rRect,
|
||||
const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
|
||||
TextRectInfo* pInfo = nullptr,
|
||||
const vcl::ITextLayout* _pTextLayout = nullptr ) const;
|
||||
float GetDPIScaleFactor() const;
|
||||
sal_Int32 GetDPIScalePercentage() const;
|
||||
tools::Long GetOutOffXPixel() const;
|
||||
tools::Long GetOutOffYPixel() const;
|
||||
void SetOutOffXPixel(tools::Long nOutOffX);
|
||||
void SetOutOffYPixel(tools::Long nOutOffY);
|
||||
|
||||
void EnableMapMode( bool bEnable = true );
|
||||
bool IsMapModeEnabled() const;
|
||||
void SetMapMode();
|
||||
void SetMapMode( const MapMode& rNewMapMode );
|
||||
|
||||
// Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
|
||||
virtual void EnableRTL( bool bEnable = true);
|
||||
bool IsRTLEnabled() const;
|
||||
|
||||
void SetFont( const vcl::Font& rNewFont );
|
||||
const vcl::Font& GetFont() const;
|
||||
|
||||
/** Width of the text.
|
||||
|
||||
See also GetTextBoundRect() for more explanation + code examples.
|
||||
*/
|
||||
tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
|
||||
vcl::TextLayoutCache const* = nullptr,
|
||||
SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
|
||||
|
||||
/** Height where any character of the current font fits; in logic coordinates.
|
||||
|
||||
See also GetTextBoundRect() for more explanation + code examples.
|
||||
*/
|
||||
tools::Long GetTextHeight() const;
|
||||
float approximate_digit_width() const;
|
||||
|
||||
void SetTextColor( const Color& rColor );
|
||||
const Color& GetTextColor() const;
|
||||
|
||||
void SetTextFillColor();
|
||||
void SetTextFillColor( const Color& rColor );
|
||||
Color GetTextFillColor() const;
|
||||
bool IsTextFillColor() const;
|
||||
|
||||
void SetTextLineColor();
|
||||
void SetTextLineColor( const Color& rColor );
|
||||
const Color& GetTextLineColor() const;
|
||||
bool IsTextLineColor() const;
|
||||
|
||||
void SetOverlineColor();
|
||||
void SetOverlineColor( const Color& rColor );
|
||||
const Color& GetOverlineColor() const;
|
||||
bool IsOverlineColor() const;
|
||||
|
||||
void SetTextAlign( TextAlign eAlign );
|
||||
TextAlign GetTextAlign() const;
|
||||
|
||||
/** Query the platform layer for control support
|
||||
*/
|
||||
bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
|
||||
|
||||
static OUString GetNonMnemonicString(const OUString& rStr) { return OutputDevice::GetNonMnemonicString(rStr); }
|
||||
|
||||
/** Query the native control's actual drawing region (including adornment)
|
||||
*/
|
||||
bool GetNativeControlRegion(
|
||||
ControlType nType,
|
||||
ControlPart nPart,
|
||||
const tools::Rectangle& rControlRegion,
|
||||
ControlState nState,
|
||||
const ImplControlValue& aValue,
|
||||
tools::Rectangle &rNativeBoundingRegion,
|
||||
tools::Rectangle &rNativeContentRegion ) const;
|
||||
protected:
|
||||
SAL_DLLPRIVATE float approximate_char_width() const;
|
||||
private:
|
||||
SAL_DLLPRIVATE void ImplEnableRTL(bool bEnable);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@ public class AccessibleFixedText extends TestCase {
|
||||
@Override
|
||||
protected void cleanup(TestParameters Param, PrintWriter log) {
|
||||
log.println(" Closing dialog ... ");
|
||||
xWinDlg.dispose();
|
||||
if (xWinDlg != null)
|
||||
xWinDlg.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace rptui
|
||||
@param _aZoom the zoom scale
|
||||
@param _rWindow where to set the map mode
|
||||
*/
|
||||
void setZoomFactor(const Fraction& _aZoom, OutputDevice& _rWindow);
|
||||
void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow);
|
||||
}
|
||||
#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_UITOOLS_HXX
|
||||
|
||||
|
||||
@@ -1018,7 +1018,7 @@ void correctOverlapping(SdrObject* _pControl,OReportSection const & _aReportSect
|
||||
rSectionView.InsertObjectAtView(_pControl,*rSectionView.GetSdrPageView(), SdrInsertFlags::ADDMARK);
|
||||
}
|
||||
|
||||
void setZoomFactor(const Fraction& _aZoom, OutputDevice& _rWindow)
|
||||
void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow)
|
||||
{
|
||||
MapMode aMapMode( _rWindow.GetMapMode() );
|
||||
aMapMode.SetScaleX(_aZoom);
|
||||
|
||||
@@ -393,7 +393,7 @@ void ODesignView::GetFocus()
|
||||
void ODesignView::ImplInitSettings()
|
||||
{
|
||||
SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
|
||||
SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
|
||||
GetOutDev()->SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
|
||||
SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangl
|
||||
tools::Rectangle aRect(Point(-nCornerSpace, nCornerSpace),
|
||||
Size(aSize.Width() - nCornerSpace,
|
||||
aSize.Height() - nCornerSpace - nCornerSpace));
|
||||
ColorChanger aColors(this, COL_WHITE, COL_WHITE);
|
||||
ColorChanger aColors(GetOutDev(), COL_WHITE, COL_WHITE);
|
||||
rRenderContext.DrawPolyLine( tools::Polygon(PixelToLogic(aRect)), LineInfo(LineStyle::Solid, 2));
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ void OEndMarker::ImplInitSettings()
|
||||
SetPaintTransparent( true );
|
||||
|
||||
SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) );
|
||||
SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
|
||||
GetOutDev()->SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
|
||||
}
|
||||
|
||||
void OEndMarker::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace rptui
|
||||
{
|
||||
OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice
|
||||
OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView
|
||||
xControl = pUnoObj->GetUnoControl(aSdrView, aOutputDevice);
|
||||
xControl = pUnoObj->GetUnoControl(aSdrView, *aOutputDevice.GetOutDev());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace rptui
|
||||
{
|
||||
OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice
|
||||
OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView
|
||||
uno::Reference<awt::XControl> xControl = pUnoObj->GetUnoControl(aSdrView, aOutputDevice);
|
||||
uno::Reference<awt::XControl> xControl = pUnoObj->GetUnoControl(aSdrView, *aOutputDevice.GetOutDev());
|
||||
xVclWindowPeer.set( xControl->getPeer(), uno::UNO_QUERY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3152,7 +3152,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
|
||||
std::unique_ptr<SdrUnoObj, SdrObjectFreeOp> pControl;
|
||||
|
||||
FmFormView::createControlLabelPair(
|
||||
getDesignView(),
|
||||
getDesignView()->GetOutDev(),
|
||||
nLeftMargin,
|
||||
0,
|
||||
nullptr,
|
||||
@@ -3459,7 +3459,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
|
||||
|
||||
// find this in svx
|
||||
FmFormView::createControlLabelPair(
|
||||
getDesignView(),
|
||||
getDesignView()->GetOutDev(),
|
||||
nLeftMargin,
|
||||
0,
|
||||
xField,
|
||||
@@ -4115,7 +4115,7 @@ void OReportController::impl_fillState_nothrow(const OUString& _sProperty,dbaui:
|
||||
void OReportController::impl_zoom_nothrow()
|
||||
{
|
||||
Fraction aZoom(m_nZoomValue,100);
|
||||
setZoomFactor( aZoom,*getDesignView() );
|
||||
setZoomFactor( aZoom, *getDesignView() );
|
||||
getDesignView()->zoom(aZoom);
|
||||
InvalidateFeature(SID_ATTR_ZOOM,Reference< XStatusListener >(), true);
|
||||
InvalidateFeature(SID_ATTR_ZOOMSLIDER,Reference< XStatusListener >(), true);
|
||||
|
||||
@@ -145,7 +145,7 @@ void OReportSection::Paint( vcl::RenderContext& rRenderContext, const tools::Rec
|
||||
// mark repaint start
|
||||
if (pPgView)
|
||||
{
|
||||
pTargetPaintWindow = pPgView->GetView().BeginDrawLayers(this, aPaintRectRegion);
|
||||
pTargetPaintWindow = pPgView->GetView().BeginDrawLayers(GetOutDev(), aPaintRectRegion);
|
||||
OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
|
||||
// draw background self using wallpaper
|
||||
OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
|
||||
|
||||
@@ -353,7 +353,7 @@ void OScrollWindowHelper::alignMarkedObjects(ControlModification _nControlModifi
|
||||
void OScrollWindowHelper::ImplInitSettings()
|
||||
{
|
||||
SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
|
||||
SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
|
||||
GetOutDev()->SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
|
||||
SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ OSectionView::OSectionView(
|
||||
SdrModel& rSdrModel,
|
||||
OReportSection* _pSectionWindow,
|
||||
OReportWindow* pEditor)
|
||||
: SdrView(rSdrModel, _pSectionWindow)
|
||||
: SdrView(rSdrModel, _pSectionWindow->GetOutDev())
|
||||
,m_pReportWindow( pEditor )
|
||||
,m_pSectionWindow(_pSectionWindow)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ void OSectionView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin
|
||||
// visible area
|
||||
MapMode aMap( rWin.GetMapMode() );
|
||||
const Point aOrg( aMap.GetOrigin() );
|
||||
const Size aVisSize( rWin.GetOutputSize() );
|
||||
const Size aVisSize( rWin.GetOutDev()->GetOutputSize() );
|
||||
const tools::Rectangle aVisRect( Point(-aOrg.X(),-aOrg.Y()), aVisSize );
|
||||
|
||||
// check, if rectangle is inside visible area
|
||||
|
||||
@@ -211,7 +211,7 @@ void OStartMarker::ApplySettings(vcl::RenderContext& rRenderContext)
|
||||
|
||||
void OStartMarker::ImplInitSettings()
|
||||
{
|
||||
ApplySettings(*this);
|
||||
ApplySettings(*GetOutDev());
|
||||
}
|
||||
|
||||
void OStartMarker::Resize()
|
||||
|
||||
@@ -117,7 +117,7 @@ DlgEdFunc::DlgEdFunc( OReportSection* _pParent )
|
||||
, m_bShowPropertyBrowser(false)
|
||||
{
|
||||
aScrollTimer.SetInvokeHandler( LINK( this, DlgEdFunc, ScrollTimeout ) );
|
||||
m_rView.SetActualWin( m_pParent);
|
||||
m_rView.SetActualWin( m_pParent->GetOutDev() );
|
||||
aScrollTimer.SetTimeout( SELENG_AUTOREPEAT_INTERVAL );
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
|
||||
}
|
||||
|
||||
if ( !bIsSetPoint )
|
||||
m_pParent->SetPointer( m_rView.GetPreferredPointer( aPos, m_pParent) );
|
||||
m_pParent->SetPointer( m_rView.GetPreferredPointer( aPos, m_pParent->GetOutDev()) );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -834,7 +834,7 @@ bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
m_pParent->getSectionWindow()->getViewsWindow()->EndAction();
|
||||
checkTwoClicks(rMEvt);
|
||||
|
||||
m_pParent->SetPointer( m_rView.GetPreferredPointer( aPnt, m_pParent) );
|
||||
m_pParent->SetPointer( m_rView.GetPreferredPointer( aPnt, m_pParent->GetOutDev() ) );
|
||||
|
||||
if ( !m_bUiActive )
|
||||
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView);
|
||||
@@ -878,7 +878,7 @@ bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
|
||||
|
||||
if ( !bIsSetPoint )
|
||||
{
|
||||
m_pParent->SetPointer( m_rView.GetPreferredPointer( aPnt, m_pParent) );
|
||||
m_pParent->SetPointer( m_rView.GetPreferredPointer( aPnt, m_pParent->GetOutDev() ) );
|
||||
|
||||
// restore color
|
||||
unColorizeOverlappedObj();
|
||||
|
||||
@@ -353,7 +353,7 @@ bool ScAccessibleEditObject::IsDefunc(
|
||||
|
||||
OutputDevice* ScAccessibleEditObject::GetOutputDeviceForView()
|
||||
{
|
||||
return mpWindow;
|
||||
return mpWindow->GetOutDev();
|
||||
}
|
||||
|
||||
void ScAccessibleEditObject::CreateTextHelper()
|
||||
|
||||
@@ -266,7 +266,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, Configura
|
||||
{
|
||||
ScPreview* pPreview = pPreviewSh->GetPreview();
|
||||
|
||||
pPreview->SetDigitLanguage( GetOptDigitLanguage() );
|
||||
pPreview->GetOutDev()->SetDigitLanguage( GetOptDigitLanguage() );
|
||||
pPreview->Invalidate();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ bool FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
pView->EnableExtendedMouseEventDispatcher(true);
|
||||
}
|
||||
|
||||
if ( pView->MouseButtonDown(rMEvt, pWindow) )
|
||||
if ( pView->MouseButtonDown(rMEvt, pWindow->GetOutDev()) )
|
||||
bReturn = true;
|
||||
|
||||
return bReturn;
|
||||
@@ -66,7 +66,7 @@ bool FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
|
||||
bool FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
|
||||
{
|
||||
pView->MouseMove(rMEvt, pWindow);
|
||||
pView->MouseMove(rMEvt, pWindow->GetOutDev());
|
||||
return FuConstruct::MouseMove(rMEvt);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ bool FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
SdrViewEvent aVEvt;
|
||||
(void)pView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONUP, aVEvt);
|
||||
|
||||
pView->MouseButtonUp(rMEvt, pWindow);
|
||||
pView->MouseButtonUp(rMEvt, pWindow->GetOutDev());
|
||||
|
||||
if (aVEvt.eEvent == SdrEventKind::EndCreate)
|
||||
{
|
||||
|
||||
@@ -655,7 +655,7 @@ static bool lcl_UrlHit( const SdrView* pView, const Point& rPosPixel, const vcl:
|
||||
if ( eHit != SdrHitKind::NONE && aVEvt.pObj != nullptr )
|
||||
{
|
||||
if ( SvxIMapInfo::GetIMapInfo( aVEvt.pObj ) && SvxIMapInfo::GetHitIMapObject(
|
||||
aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), pWindow ) )
|
||||
aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), pWindow->GetOutDev() ) )
|
||||
return true;
|
||||
|
||||
if ( aVEvt.eEvent == SdrEventKind::ExecuteUrl )
|
||||
@@ -696,7 +696,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
|
||||
else if ( pHdl )
|
||||
{
|
||||
rViewShell.SetActivePointer(
|
||||
pView->GetPreferredPointer( aPnt, pWindow ) );
|
||||
pView->GetPreferredPointer( aPnt, pWindow->GetOutDev() ) );
|
||||
}
|
||||
else if ( pView->IsMarkedHit(aPnt) )
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
if ( SvxIMapInfo::GetIMapInfo( aVEvt.pObj ) ) // ImageMap
|
||||
{
|
||||
const IMapObject* pIMapObj =
|
||||
SvxIMapInfo::GetHitIMapObject( aVEvt.pObj, aMDPos, pWindow );
|
||||
SvxIMapInfo::GetHitIMapObject( aVEvt.pObj, aMDPos, pWindow->GetOutDev() );
|
||||
if ( pIMapObj && !pIMapObj->GetURL().isEmpty() )
|
||||
{
|
||||
sURL = pIMapObj->GetURL();
|
||||
|
||||
@@ -116,7 +116,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
SetMouseButtonCode(rMEvt.GetButtons());
|
||||
bool bStraightEnter = true;
|
||||
|
||||
if ( pView->MouseButtonDown(rMEvt, pWindow) )
|
||||
if ( pView->MouseButtonDown(rMEvt, pWindow->GetOutDev()) )
|
||||
return true; // event handled from SdrView
|
||||
|
||||
if ( pView->IsTextEdit() )
|
||||
@@ -318,7 +318,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
}
|
||||
|
||||
rViewShell.SetActivePointer(pView->GetPreferredPointer(
|
||||
pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
|
||||
pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow->GetOutDev() ));
|
||||
if (!bStraightEnter)
|
||||
{
|
||||
pView->UnmarkAll();
|
||||
@@ -332,7 +332,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
bool FuText::MouseMove(const MouseEvent& rMEvt)
|
||||
{
|
||||
rViewShell.SetActivePointer(pView->GetPreferredPointer(
|
||||
pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
|
||||
pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow->GetOutDev() ));
|
||||
|
||||
if (aDragTimer.IsActive() )
|
||||
{
|
||||
@@ -346,7 +346,7 @@ bool FuText::MouseMove(const MouseEvent& rMEvt)
|
||||
Point aPix(rMEvt.GetPosPixel());
|
||||
Point aPnt(pWindow->PixelToLogic(aPix));
|
||||
|
||||
if ( pView->MouseMove(rMEvt, pWindow) )
|
||||
if ( pView->MouseMove(rMEvt, pWindow->GetOutDev()) )
|
||||
return true; // event handled from SdrView
|
||||
|
||||
if ( pView->IsAction() )
|
||||
@@ -372,7 +372,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
|
||||
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
|
||||
if ( pView->MouseButtonUp(rMEvt, pWindow) )
|
||||
if ( pView->MouseButtonUp(rMEvt, pWindow->GetOutDev()) )
|
||||
return true; // Event evaluated by SdrView
|
||||
|
||||
if ( pView->IsDragObj() )
|
||||
|
||||
@@ -37,7 +37,7 @@ std::unique_ptr<SdrOutliner> FuText::MakeOutliner()
|
||||
// #i10426# The ref device isn't set to the EditEngine before SdrBeginTextEdit now,
|
||||
// so the device must be taken from the model here.
|
||||
OutputDevice* pRef = pDrDoc->GetRefDevice();
|
||||
if (pRef && pRef != pWindow)
|
||||
if (pRef && pRef != pWindow->GetOutDev())
|
||||
pRef->SetMapMode(MapMode(MapUnit::Map100thMM));
|
||||
|
||||
return pOutl;
|
||||
|
||||
@@ -317,7 +317,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFor
|
||||
SdrView* pSdrView( nullptr );
|
||||
FmFormShell* pFormShell( nullptr );
|
||||
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
|
||||
xController = FmFormShell::GetFormController( Form, *pSdrView, *pWindow );
|
||||
xController = FmFormShell::GetFormController( Form, *pSdrView, *pWindow->GetOutDev() );
|
||||
|
||||
return xController;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ uno::Reference<awt::XControl> SAL_CALL ScViewPaneBase::getControl(
|
||||
SdrView* pSdrView( nullptr );
|
||||
FmFormShell* pFormShell( nullptr );
|
||||
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
|
||||
pFormShell->GetFormControl( xModel, *pSdrView, *pWindow, xRet );
|
||||
pFormShell->GetFormControl( xModel, *pSdrView, *pWindow->GetOutDev(), xRet );
|
||||
|
||||
if ( !xRet.is() )
|
||||
throw container::NoSuchElementException(); // no control found
|
||||
|
||||
@@ -195,7 +195,7 @@ void ScColBar::DrawInvert( tools::Long nDragPosP )
|
||||
{
|
||||
tools::Rectangle aRect( nDragPosP,0, nDragPosP+HDR_SLIDERSIZE-1,GetOutputSizePixel().Width()-1 );
|
||||
PaintImmediately();
|
||||
Invert(aRect);
|
||||
GetOutDev()->Invert(aRect);
|
||||
|
||||
pTabView->GetViewData().GetView()->InvertVertical(meWhich,nDragPosP);
|
||||
}
|
||||
@@ -355,7 +355,7 @@ void ScRowBar::DrawInvert( tools::Long nDragPosP )
|
||||
{
|
||||
tools::Rectangle aRect( 0,nDragPosP, GetOutputSizePixel().Width()-1,nDragPosP+HDR_SLIDERSIZE-1 );
|
||||
PaintImmediately();
|
||||
Invert(aRect);
|
||||
GetOutDev()->Invert(aRect);
|
||||
|
||||
pTabView->GetViewData().GetView()->InvertHorizontal(meWhich,nDragPosP);
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ void ScDrawView::MarkListHasChanged()
|
||||
|
||||
if(OUTDEV_WINDOW == rOutDev.GetOutDevType())
|
||||
{
|
||||
static_cast<vcl::Window&>(rOutDev).PaintImmediately();
|
||||
rOutDev.GetOwnerWindow()->PaintImmediately();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData& rData, ScSplitPos
|
||||
nDragEndX( -1 ),
|
||||
nDragEndY( -1 ),
|
||||
meDragInsertMode( INS_NONE ),
|
||||
aComboButton( this ),
|
||||
aComboButton( GetOutDev() ),
|
||||
aCurMousePos( 0,0 ),
|
||||
nPaintCount( 0 ),
|
||||
aRFSelectedCorned( NONE ),
|
||||
@@ -422,7 +422,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData& rData, ScSplitPos
|
||||
|
||||
SetHelpId( HID_SC_WIN_GRIDWIN );
|
||||
|
||||
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
|
||||
GetOutDev()->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
|
||||
EnableRTL( false );
|
||||
}
|
||||
|
||||
@@ -1500,7 +1500,7 @@ bool ScGridWindow::IsCellCoveredByText(SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCC
|
||||
|
||||
Fraction aZoomX = mrViewData.GetZoomX();
|
||||
Fraction aZoomY = mrViewData.GetZoomY();
|
||||
ScOutputData aOutputData(this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
|
||||
ScOutputData aOutputData(GetOutDev(), OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
|
||||
0, 0, 0, nPosY, nPosX, nPosY, nPPTX, nPPTY,
|
||||
&aZoomX, &aZoomY);
|
||||
|
||||
@@ -3173,8 +3173,8 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, S
|
||||
// clicked outside the selected text - deselect and move text cursor
|
||||
// use DrawView to allow extra handling there (none currently)
|
||||
MouseEvent aEvent( rPosPixel );
|
||||
pDrawView->MouseButtonDown( aEvent, this );
|
||||
pDrawView->MouseButtonUp( aEvent, this );
|
||||
pDrawView->MouseButtonDown( aEvent, GetOutDev() );
|
||||
pDrawView->MouseButtonUp( aEvent, GetOutDev() );
|
||||
}
|
||||
|
||||
return; // clicked within the edit area - keep edit mode
|
||||
@@ -4754,7 +4754,7 @@ void ScGridWindow::UpdateFormulas(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
|
||||
|
||||
Fraction aZoomX = mrViewData.GetZoomX();
|
||||
Fraction aZoomY = mrViewData.GetZoomY();
|
||||
ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
|
||||
ScOutputData aOutputData( GetOutDev(), OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
|
||||
nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY,
|
||||
&aZoomX, &aZoomY );
|
||||
aOutputData.SetMirrorWidth( nMirrorWidth );
|
||||
@@ -6188,7 +6188,7 @@ void ScGridWindow::UpdateCursorOverlay()
|
||||
// non-active pane uses a different color.
|
||||
aCursorColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor;
|
||||
std::vector< basegfx::B2DRange > aRanges;
|
||||
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
|
||||
const basegfx::B2DHomMatrix aTransform(GetOutDev()->GetInverseViewTransformation());
|
||||
|
||||
for(const tools::Rectangle & rRA : aPixelRects)
|
||||
{
|
||||
@@ -6259,7 +6259,7 @@ void ScGridWindow::UpdateSelectionOverlay()
|
||||
else if (xOverlayManager.is())
|
||||
{
|
||||
std::vector< basegfx::B2DRange > aRanges;
|
||||
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
|
||||
const basegfx::B2DHomMatrix aTransform(GetOutDev()->GetInverseViewTransformation());
|
||||
ScDocument& rDoc = mrViewData.GetDocument();
|
||||
SCTAB nTab = mrViewData.GetTabNo();
|
||||
bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
|
||||
@@ -6384,7 +6384,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
|
||||
// non-active pane uses a different color.
|
||||
aHandleColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor;
|
||||
std::vector< basegfx::B2DRange > aRanges;
|
||||
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
|
||||
const basegfx::B2DHomMatrix aTransform(GetOutDev()->GetInverseViewTransformation());
|
||||
basegfx::B2DRange aRB = vcl::unotools::b2DRectangleFromRectangle(aFillRect);
|
||||
|
||||
aRB.transform(aTransform);
|
||||
@@ -6507,7 +6507,7 @@ void ScGridWindow::UpdateDragRectOverlay()
|
||||
if (xOverlayManager.is() && !comphelper::LibreOfficeKit::isActive())
|
||||
{
|
||||
std::vector< basegfx::B2DRange > aRanges;
|
||||
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
|
||||
const basegfx::B2DHomMatrix aTransform(GetOutDev()->GetInverseViewTransformation());
|
||||
|
||||
for(const tools::Rectangle & rRA : aPixelRects)
|
||||
{
|
||||
@@ -6556,7 +6556,7 @@ void ScGridWindow::UpdateHeaderOverlay()
|
||||
{
|
||||
// Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
|
||||
std::vector< basegfx::B2DRange > aRanges;
|
||||
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
|
||||
const basegfx::B2DHomMatrix aTransform(GetOutDev()->GetInverseViewTransformation());
|
||||
basegfx::B2DRange aRB(aInvertRect.Left(), aInvertRect.Top(), aInvertRect.Right() + 1, aInvertRect.Bottom() + 1);
|
||||
|
||||
aRB.transform(aTransform);
|
||||
@@ -6623,7 +6623,7 @@ void ScGridWindow::UpdateShrinkOverlay()
|
||||
if (xOverlayManager.is() && !comphelper::LibreOfficeKit::isActive())
|
||||
{
|
||||
std::vector< basegfx::B2DRange > aRanges;
|
||||
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
|
||||
const basegfx::B2DHomMatrix aTransform(GetOutDev()->GetInverseViewTransformation());
|
||||
basegfx::B2DRange aRB(aPixRect.Left(), aPixRect.Top(), aPixRect.Right() + 1, aPixRect.Bottom() + 1);
|
||||
|
||||
aRB.transform(aTransform);
|
||||
@@ -6652,7 +6652,7 @@ rtl::Reference<sdr::overlay::OverlayManager> ScGridWindow::getOverlayManager() c
|
||||
|
||||
if(pPV)
|
||||
{
|
||||
SdrPageWindow* pPageWin = pPV->FindPageWindow( *this );
|
||||
SdrPageWindow* pPageWin = pPV->FindPageWindow( *GetOutDev() );
|
||||
|
||||
if ( pPageWin )
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
|
||||
Size aScrSize(nSizeX-1, nSizeY-1);
|
||||
|
||||
// Check if the mouse cursor is clicking on the popup arrow box.
|
||||
mpFilterButton.reset(new ScDPFieldButton(this, &GetSettings().GetStyleSettings(), &mrViewData.GetZoomY(), &rDoc));
|
||||
mpFilterButton.reset(new ScDPFieldButton(GetOutDev(), &GetSettings().GetStyleSettings(), &mrViewData.GetZoomY(), &rDoc));
|
||||
mpFilterButton->setBoundingBox(aScrPos, aScrSize, bLayoutRTL);
|
||||
mpFilterButton->setPopupLeft(bLayoutRTL); // #i114944# AutoFilter button is left-aligned in RTL
|
||||
Point aPopupPos;
|
||||
@@ -351,7 +351,7 @@ bool ScGridWindow::DPTestFieldPopupArrow(
|
||||
Size aScrSize(nSizeX-1, nSizeY-1);
|
||||
|
||||
// Check if the mouse cursor is clicking on the popup arrow box.
|
||||
ScDPFieldButton aBtn(this, &GetSettings().GetStyleSettings(), &GetMapMode().GetScaleY());
|
||||
ScDPFieldButton aBtn(GetOutDev(), &GetSettings().GetStyleSettings(), &GetMapMode().GetScaleY());
|
||||
aBtn.setBoundingBox(aScrPos, aScrSize, bLayoutRTL);
|
||||
aBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now
|
||||
Point aPopupPos;
|
||||
|
||||
@@ -281,7 +281,7 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
|
||||
rDoc.GetTableArea( nTab, nEndCol, nEndRow );
|
||||
if (nEndCol<20) nEndCol = 20;
|
||||
if (nEndRow<20) nEndRow = 1000;
|
||||
ScDrawUtil::CalcScale( rDoc, nTab, 0,0, nEndCol,nEndRow, this,
|
||||
ScDrawUtil::CalcScale( rDoc, nTab, 0,0, nEndCol,nEndRow, GetOutDev(),
|
||||
mrViewData.GetZoomX(),mrViewData.GetZoomY(),
|
||||
mrViewData.GetPPTX(),mrViewData.GetPPTY(),
|
||||
aScaleX,aScaleY );
|
||||
|
||||
@@ -551,7 +551,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
|
||||
|
||||
Fraction aZoomX = mrViewData.GetZoomX();
|
||||
Fraction aZoomY = mrViewData.GetZoomY();
|
||||
ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
|
||||
ScOutputData aOutputData( GetOutDev(), OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
|
||||
nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY,
|
||||
&aZoomX, &aZoomY );
|
||||
|
||||
@@ -581,7 +581,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
|
||||
bLogicText = true; // use logic MapMode
|
||||
}
|
||||
|
||||
DrawContent(*this, aTabInfo, aOutputData, bLogicText);
|
||||
DrawContent(*GetOutDev(), aTabInfo, aOutputData, bLogicText);
|
||||
|
||||
// If something was inverted during the Paint (selection changed from Basic Macro)
|
||||
// then this is now mixed up and has to be repainted
|
||||
@@ -1230,7 +1230,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
|
||||
|
||||
aBGAbs.AdjustLeft(1);
|
||||
aBGAbs.AdjustTop(1);
|
||||
aCursorRect = OutputDevice::PixelToLogic(aBGAbs, aMM);
|
||||
aCursorRect = GetOutDev()->PixelToLogic(aBGAbs, aMM);
|
||||
aCursorRect.setWidth(0);
|
||||
aCursorRect.Move(aCursPos.getX(), 0);
|
||||
// Sends view cursor position to views of all matching zooms if needed (avoids duplicates).
|
||||
@@ -1978,7 +1978,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo
|
||||
}
|
||||
|
||||
pQueryParam.reset();
|
||||
aComboButton.SetOutputDevice( this );
|
||||
aComboButton.SetOutputDevice( GetOutDev() );
|
||||
}
|
||||
|
||||
tools::Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
|
||||
@@ -1988,7 +1988,7 @@ tools::Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos
|
||||
bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
|
||||
tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
|
||||
|
||||
ScDDComboBoxButton aButton( this ); // for optimal size
|
||||
ScDDComboBoxButton aButton( GetOutDev() ); // for optimal size
|
||||
Size aBtnSize = aButton.GetSizePixel();
|
||||
|
||||
SCCOL nCol = rButtonPos.Col();
|
||||
|
||||
@@ -259,7 +259,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
|
||||
{
|
||||
Point aLogicPos = PixelToLogic( aPosPixel );
|
||||
IMapObject* pIMapObj = SvxIMapInfo::GetHitIMapObject(
|
||||
aVEvt.pObj, aLogicPos, this );
|
||||
aVEvt.pObj, aLogicPos, GetOutDev() );
|
||||
|
||||
if ( pIMapObj )
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ void ScGridWindow::dumpColumnInformationHmm()
|
||||
for (SCCOL nCol = 0; nCol <= 20; ++nCol)
|
||||
{
|
||||
sal_uInt16 nWidth = rDoc.GetColWidth(nCol, nTab);
|
||||
tools::Long nPixel = LogicToLogic(Point(nWidth, 0), MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)).getX();
|
||||
tools::Long nPixel = OutputDevice::LogicToLogic(Point(nWidth, 0), MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)).getX();
|
||||
std::cout << "Column: " << nCol << ", Width: " << nPixel << "hmm" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,26 +319,26 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
// background is different for entry area and behind the entries
|
||||
|
||||
tools::Rectangle aFillRect;
|
||||
SetLineColor();
|
||||
GetOutDev()->SetLineColor();
|
||||
|
||||
if ( nLineEnd * nLayoutSign >= nInitScrPos * nLayoutSign )
|
||||
{
|
||||
SetFillColor( rStyleSettings.GetFaceColor() );
|
||||
GetOutDev()->SetFillColor( rStyleSettings.GetFaceColor() );
|
||||
if ( bVertical )
|
||||
aFillRect = tools::Rectangle( 0, nInitScrPos, nBarSize-1, nLineEnd );
|
||||
else
|
||||
aFillRect = tools::Rectangle( nInitScrPos, 0, nLineEnd, nBarSize-1 );
|
||||
DrawRect( aFillRect );
|
||||
GetOutDev()->DrawRect( aFillRect );
|
||||
}
|
||||
|
||||
if ( nLineEnd * nLayoutSign < nPEnd * nLayoutSign )
|
||||
{
|
||||
SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::APPBACKGROUND).nColor );
|
||||
GetOutDev()->SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::APPBACKGROUND).nColor );
|
||||
if ( bVertical )
|
||||
aFillRect = tools::Rectangle( 0, nLineEnd+nLayoutSign, nBarSize-1, nPEnd );
|
||||
else
|
||||
aFillRect = tools::Rectangle( nLineEnd+nLayoutSign, 0, nPEnd, nBarSize-1 );
|
||||
DrawRect( aFillRect );
|
||||
GetOutDev()->DrawRect( aFillRect );
|
||||
}
|
||||
|
||||
if ( nLineEnd * nLayoutSign >= nPStart * nLayoutSign )
|
||||
@@ -355,40 +355,40 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
if ( bDark )
|
||||
{
|
||||
// solid grey background for dark face color is drawn before lines
|
||||
SetLineColor();
|
||||
SetFillColor( COL_LIGHTGRAY );
|
||||
DrawRect( aFillRect );
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor( COL_LIGHTGRAY );
|
||||
GetOutDev()->DrawRect( aFillRect );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// background for selection
|
||||
SetLineColor();
|
||||
SetFillColor( rStyleSettings.GetHighlightColor() );
|
||||
DrawRect( aFillRect );
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor( rStyleSettings.GetHighlightColor() );
|
||||
GetOutDev()->DrawRect( aFillRect );
|
||||
}
|
||||
}
|
||||
|
||||
SetLineColor( rStyleSettings.GetDarkShadowColor() );
|
||||
GetOutDev()->SetLineColor( rStyleSettings.GetDarkShadowColor() );
|
||||
if (bVertical)
|
||||
{
|
||||
tools::Long nDarkPos = bMirrored ? 0 : nBarSize-1;
|
||||
DrawLine( Point( nDarkPos, nPStart ), Point( nDarkPos, nLineEnd ) );
|
||||
GetOutDev()->DrawLine( Point( nDarkPos, nPStart ), Point( nDarkPos, nLineEnd ) );
|
||||
}
|
||||
else
|
||||
DrawLine( Point( nPStart, nBarSize-1 ), Point( nLineEnd, nBarSize-1 ) );
|
||||
GetOutDev()->DrawLine( Point( nPStart, nBarSize-1 ), Point( nLineEnd, nBarSize-1 ) );
|
||||
|
||||
// line in different color for selection
|
||||
if ( nTransEnd * nLayoutSign >= nTransStart * nLayoutSign && !bHighContrast )
|
||||
{
|
||||
SetLineColor( aSelLineColor );
|
||||
GetOutDev()->SetLineColor( aSelLineColor );
|
||||
if (bVertical)
|
||||
{
|
||||
tools::Long nDarkPos = bMirrored ? 0 : nBarSize-1;
|
||||
DrawLine( Point( nDarkPos, nTransStart ), Point( nDarkPos, nTransEnd ) );
|
||||
GetOutDev()->DrawLine( Point( nDarkPos, nTransStart ), Point( nDarkPos, nTransEnd ) );
|
||||
}
|
||||
else
|
||||
DrawLine( Point( nTransStart, nBarSize-1 ), Point( nTransEnd, nBarSize-1 ) );
|
||||
GetOutDev()->DrawLine( Point( nTransStart, nBarSize-1 ), Point( nTransEnd, nBarSize-1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
// loop through entries several times to avoid changing the line color too often
|
||||
// and to allow merging of lines
|
||||
|
||||
ScGridMerger aGrid( this, 1, 1 );
|
||||
ScGridMerger aGrid( GetOutDev(), 1, 1 );
|
||||
|
||||
// start at SC_HDRPAINT_BOTTOM instead of 0 - selection doesn't get different
|
||||
// borders, light border at top isn't used anymore
|
||||
@@ -459,10 +459,10 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
{
|
||||
case SC_HDRPAINT_SEL_BOTTOM:
|
||||
// same as non-selected for high contrast
|
||||
SetLineColor( bHighContrast ? rStyleSettings.GetDarkShadowColor() : aSelLineColor );
|
||||
GetOutDev()->SetLineColor( bHighContrast ? rStyleSettings.GetDarkShadowColor() : aSelLineColor );
|
||||
break;
|
||||
case SC_HDRPAINT_BOTTOM:
|
||||
SetLineColor( rStyleSettings.GetDarkShadowColor() );
|
||||
GetOutDev()->SetLineColor( rStyleSettings.GetDarkShadowColor() );
|
||||
break;
|
||||
case SC_HDRPAINT_TEXT:
|
||||
// DrawSelectionBackground is used only for high contrast on light background
|
||||
@@ -538,10 +538,10 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
if ( GetEntrySize(nEntryNo+1)==0 )
|
||||
{
|
||||
if (bVertical)
|
||||
DrawLine( Point(aScrPos.X(),aEndPos.Y()-nLayoutSign),
|
||||
GetOutDev()->DrawLine( Point(aScrPos.X(),aEndPos.Y()-nLayoutSign),
|
||||
Point(aEndPos.X(),aEndPos.Y()-nLayoutSign) );
|
||||
else
|
||||
DrawLine( Point(aEndPos.X()-nLayoutSign,aScrPos.Y()),
|
||||
GetOutDev()->DrawLine( Point(aEndPos.X()-nLayoutSign,aScrPos.Y()),
|
||||
Point(aEndPos.X()-nLayoutSign,aEndPos.Y()) );
|
||||
}
|
||||
}
|
||||
@@ -603,7 +603,7 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
aTxtPos.AdjustX((nSizePix*nLayoutSign-aTextSize.Width()+1)/2 );
|
||||
aTxtPos.AdjustY((nBarSize-aTextSize.Height())/2 );
|
||||
}
|
||||
DrawText( aTxtPos, aString );
|
||||
GetOutDev()->DrawText( aTxtPos, aString );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -149,19 +149,19 @@ void ScNoteMarker::Draw()
|
||||
if ( !(m_xObject && m_bVisible) )
|
||||
return;
|
||||
|
||||
lcl_DrawWin( m_xObject.get(), m_pWindow, m_aMapMode );
|
||||
lcl_DrawWin( m_xObject.get(), m_pWindow->GetOutDev(), m_aMapMode );
|
||||
|
||||
if ( m_pRightWin || m_pBottomWin )
|
||||
{
|
||||
Size aWinSize = m_pWindow->PixelToLogic( m_pWindow->GetOutputSizePixel(), m_aMapMode );
|
||||
if ( m_pRightWin )
|
||||
lcl_DrawWin( m_xObject.get(), m_pRightWin,
|
||||
lcl_DrawWin( m_xObject.get(), m_pRightWin->GetOutDev(),
|
||||
lcl_MoveMapMode( m_aMapMode, Size( aWinSize.Width(), 0 ) ) );
|
||||
if ( m_pBottomWin )
|
||||
lcl_DrawWin( m_xObject.get(), m_pBottomWin,
|
||||
lcl_DrawWin( m_xObject.get(), m_pBottomWin->GetOutDev(),
|
||||
lcl_MoveMapMode( m_aMapMode, Size( 0, aWinSize.Height() ) ) );
|
||||
if ( m_pDiagWin )
|
||||
lcl_DrawWin( m_xObject.get(), m_pDiagWin, lcl_MoveMapMode( m_aMapMode, aWinSize ) );
|
||||
lcl_DrawWin( m_xObject.get(), m_pDiagWin->GetOutDev(), lcl_MoveMapMode( m_aMapMode, aWinSize ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@ void ScOutlineWindow::DataChanged( const DataChangedEvent& rDCEvt )
|
||||
|
||||
void ScOutlineWindow::SetEntryAreaClipRegion()
|
||||
{
|
||||
SetClipRegion( vcl::Region(tools::Rectangle(
|
||||
GetOutDev()->SetClipRegion( vcl::Region(tools::Rectangle(
|
||||
GetPoint( 0, mnMainFirstPos ),
|
||||
GetPoint( GetOutputSizeLevel() - 1, mnMainLastPos ))));
|
||||
}
|
||||
@@ -521,13 +521,13 @@ void ScOutlineWindow::SetEntryAreaClipRegion()
|
||||
void ScOutlineWindow::DrawLineRel(
|
||||
tools::Long nLevelStart, tools::Long nEntryStart, tools::Long nLevelEnd, tools::Long nEntryEnd )
|
||||
{
|
||||
DrawLine( GetPoint( nLevelStart, nEntryStart ), GetPoint( nLevelEnd, nEntryEnd ) );
|
||||
GetOutDev()->DrawLine( GetPoint( nLevelStart, nEntryStart ), GetPoint( nLevelEnd, nEntryEnd ) );
|
||||
}
|
||||
|
||||
void ScOutlineWindow::DrawRectRel(
|
||||
tools::Long nLevelStart, tools::Long nEntryStart, tools::Long nLevelEnd, tools::Long nEntryEnd )
|
||||
{
|
||||
DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) );
|
||||
GetOutDev()->DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) );
|
||||
}
|
||||
|
||||
namespace
|
||||
@@ -541,11 +541,11 @@ namespace
|
||||
void ScOutlineWindow::DrawImageRel(tools::Long nLevelPos, tools::Long nEntryPos, const OUString& rId)
|
||||
{
|
||||
const Image& rImage = GetImage(rId);
|
||||
SetLineColor();
|
||||
SetFillColor( GetBackground().GetColor() );
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor( GetBackground().GetColor() );
|
||||
Point aPos( GetPoint( nLevelPos, nEntryPos ) );
|
||||
DrawRect( tools::Rectangle( aPos, rImage.GetSizePixel() ) );
|
||||
DrawImage( aPos, rImage );
|
||||
GetOutDev()->DrawRect( tools::Rectangle( aPos, rImage.GetSizePixel() ) );
|
||||
GetOutDev()->DrawImage( aPos, rImage );
|
||||
}
|
||||
|
||||
void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed )
|
||||
@@ -557,9 +557,9 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed
|
||||
bool bClip = (nEntry != SC_OL_HEADERENTRY);
|
||||
if ( bClip )
|
||||
SetEntryAreaClipRegion();
|
||||
DrawImage(aPos, GetImage(sId));
|
||||
GetOutDev()->DrawImage(aPos, GetImage(sId));
|
||||
if ( bClip )
|
||||
SetClipRegion();
|
||||
GetOutDev()->SetClipRegion();
|
||||
}
|
||||
mbMTPressed = bPressed;
|
||||
}
|
||||
@@ -585,7 +585,7 @@ void ScOutlineWindow::ShowFocus()
|
||||
SetEntryAreaClipRegion();
|
||||
InvertTracking( maFocusRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
|
||||
if ( bClip )
|
||||
SetClipRegion();
|
||||
GetOutDev()->SetClipRegion();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ void ScOutlineWindow::HideFocus()
|
||||
SetEntryAreaClipRegion();
|
||||
InvertTracking( maFocusRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
|
||||
if ( bClip )
|
||||
SetClipRegion();
|
||||
GetOutDev()->SetClipRegion();
|
||||
maFocusRect.SetEmpty();
|
||||
}
|
||||
}
|
||||
@@ -624,7 +624,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
tools::Long nLevelEnd = (mbHoriz ? aSize.Height() : aSize.Width()) - 1;
|
||||
tools::Long nEntryEnd = (mbHoriz ? aSize.Width() : aSize.Height()) - 1;
|
||||
|
||||
SetLineColor( maLineColor );
|
||||
GetOutDev()->SetLineColor( maLineColor );
|
||||
tools::Long nBorderPos = mbMirrorLevels ? 0 : nLevelEnd;
|
||||
DrawLineRel( nBorderPos, 0, nBorderPos, nEntryEnd );
|
||||
|
||||
@@ -641,7 +641,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
|
||||
DrawImageRel(GetLevelPos(nLevel), nEntryPos, OUString(aLevelBmps[nLevel]));
|
||||
|
||||
SetLineColor( maLineColor );
|
||||
GetOutDev()->SetLineColor( maLineColor );
|
||||
tools::Long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
|
||||
DrawLineRel( 0, nLinePos, nLevelEnd, nLinePos );
|
||||
}
|
||||
@@ -662,8 +662,8 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
size_t nEntry;
|
||||
|
||||
// first draw all lines in the current level
|
||||
SetLineColor();
|
||||
SetFillColor( maLineColor );
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor( maLineColor );
|
||||
for ( nEntry = 0; nEntry < nEntryCount; ++nEntry )
|
||||
{
|
||||
const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
|
||||
@@ -717,7 +717,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
|
||||
}
|
||||
}
|
||||
|
||||
SetClipRegion();
|
||||
GetOutDev()->SetClipRegion();
|
||||
|
||||
if ( !mbDontDrawFocus )
|
||||
ShowFocus();
|
||||
|
||||
@@ -124,12 +124,12 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
|
||||
nHeaderHeight ( 0 ),
|
||||
nFooterHeight ( 0 )
|
||||
{
|
||||
SetOutDevViewType( OutDevViewType::PrintPreview );
|
||||
GetOutDev()->SetOutDevViewType( OutDevViewType::PrintPreview );
|
||||
SetBackground();
|
||||
|
||||
SetHelpId( HID_SC_WIN_PREVIEW );
|
||||
|
||||
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
|
||||
GetOutDev()->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
|
||||
}
|
||||
|
||||
ScPreview::~ScPreview()
|
||||
@@ -160,7 +160,7 @@ void ScPreview::UpdateDrawView() // nTab must be right
|
||||
|
||||
if ( !pDrawView ) // New Drawing?
|
||||
{
|
||||
pDrawView.reset( new FmFormView( *pModel, this) );
|
||||
pDrawView.reset( new FmFormView( *pModel, GetOutDev()) );
|
||||
|
||||
// The DrawView takes over the Design-Mode from the Model
|
||||
// (Settings "In opening Draftmode"), therefore to restore here
|
||||
@@ -259,7 +259,7 @@ void ScPreview::CalcPages()
|
||||
tools::Long nAttrPage = i > 0 ? nFirstAttr[i-1] : 1;
|
||||
|
||||
tools::Long nThisStart = nTotalPages;
|
||||
ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, nullptr, &aOptions );
|
||||
ScPrintFunc aPrintFunc( GetOutDev(), pDocShell, i, nAttrPage, 0, nullptr, &aOptions );
|
||||
tools::Long nThisTab = aPrintFunc.GetTotalPages();
|
||||
if (!aPrintFunc.HasPrintRange())
|
||||
mbHasEmptyRangeTable = true;
|
||||
@@ -357,14 +357,14 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
if ( bDoPrint && ( aOffset.X() < 0 || aOffset.Y() < 0 ) && bValidPage )
|
||||
{
|
||||
SetMapMode( aMMMode );
|
||||
SetLineColor();
|
||||
SetFillColor(aBackColor);
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor(aBackColor);
|
||||
|
||||
Size aWinSize = GetOutputSize();
|
||||
Size aWinSize = GetOutDev()->GetOutputSize();
|
||||
if ( aOffset.X() < 0 )
|
||||
DrawRect(tools::Rectangle( 0, 0, -aOffset.X(), aWinSize.Height() ));
|
||||
GetOutDev()->DrawRect(tools::Rectangle( 0, 0, -aOffset.X(), aWinSize.Height() ));
|
||||
if ( aOffset.Y() < 0 )
|
||||
DrawRect(tools::Rectangle( 0, 0, aWinSize.Width(), -aOffset.Y() ));
|
||||
GetOutDev()->DrawRect(tools::Rectangle( 0, 0, aWinSize.Width(), -aOffset.Y() ));
|
||||
}
|
||||
|
||||
tools::Long nLeftMargin = 0;
|
||||
@@ -384,9 +384,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
|
||||
std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
|
||||
if (bStateValid)
|
||||
pPrintFunc.reset(new ScPrintFunc(this, pDocShell, aState, &aOptions));
|
||||
pPrintFunc.reset(new ScPrintFunc(GetOutDev(), pDocShell, aState, &aOptions));
|
||||
else
|
||||
pPrintFunc.reset(new ScPrintFunc(this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions));
|
||||
pPrintFunc.reset(new ScPrintFunc(GetOutDev(), pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions));
|
||||
|
||||
pPrintFunc->SetOffset(aOffset);
|
||||
pPrintFunc->SetManualZoom(nZoom);
|
||||
@@ -484,7 +484,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
if ( !bValidPage )
|
||||
nPageEndX = nPageEndY = 0;
|
||||
|
||||
Size aWinSize = GetOutputSize();
|
||||
Size aWinSize = GetOutDev()->GetOutputSize();
|
||||
Point aWinEnd( aWinSize.Width(), aWinSize.Height() );
|
||||
bool bRight = nPageEndX <= aWinEnd.X();
|
||||
bool bBottom = nPageEndY <= aWinEnd.Y();
|
||||
@@ -497,9 +497,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
SetMapMode(aMMMode);
|
||||
|
||||
// Draw background first.
|
||||
SetLineColor();
|
||||
SetFillColor(aBackColor);
|
||||
DrawRect(tools::Rectangle(0, 0, aWinEnd.X(), aWinEnd.Y()));
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor(aBackColor);
|
||||
GetOutDev()->DrawRect(tools::Rectangle(0, 0, aWinEnd.X(), aWinEnd.Y()));
|
||||
|
||||
const ScPatternAttr& rDefPattern =
|
||||
rDoc.GetPool()->GetDefaultItem(ATTR_PATTERN);
|
||||
@@ -530,7 +530,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
(aWinEnd.X() - pEditEng->CalcTextWidth())/2,
|
||||
(aWinEnd.Y() - pEditEng->GetTextHeight())/2);
|
||||
|
||||
pEditEng->Draw(this, aCenter);
|
||||
pEditEng->Draw(GetOutDev(), aCenter);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -538,7 +538,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
if( bPageMargin && bValidPage )
|
||||
{
|
||||
SetMapMode(aMMMode);
|
||||
SetLineColor( COL_BLACK );
|
||||
GetOutDev()->SetLineColor( COL_BLACK );
|
||||
DrawInvert( static_cast<tools::Long>( nTopMargin - aOffset.Y() ), PointerStyle::VSizeBar );
|
||||
DrawInvert( static_cast<tools::Long>(nPageEndY - nBottomMargin ), PointerStyle::VSizeBar );
|
||||
DrawInvert( static_cast<tools::Long>( nLeftMargin - aOffset.X() ), PointerStyle::HSizeBar );
|
||||
@@ -556,10 +556,10 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
for( int i= aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
|
||||
{
|
||||
Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) ,aMMMode );
|
||||
SetLineColor( COL_BLACK );
|
||||
SetFillColor( COL_BLACK );
|
||||
DrawRect( tools::Rectangle( Point( mvRight[i] - 2, aColumnTop.Y() ),Point( mvRight[i] + 2 , 4 + aColumnTop.Y()) ));
|
||||
DrawLine( Point( mvRight[i], aColumnTop.Y() ), Point( mvRight[i], 10 + aColumnTop.Y()) );
|
||||
GetOutDev()->SetLineColor( COL_BLACK );
|
||||
GetOutDev()->SetFillColor( COL_BLACK );
|
||||
GetOutDev()->DrawRect( tools::Rectangle( Point( mvRight[i] - 2, aColumnTop.Y() ),Point( mvRight[i] + 2 , 4 + aColumnTop.Y()) ));
|
||||
GetOutDev()->DrawLine( Point( mvRight[i], aColumnTop.Y() ), Point( mvRight[i], 10 + aColumnTop.Y()) );
|
||||
}
|
||||
SetMapMode( aMMMode );
|
||||
}
|
||||
@@ -567,16 +567,16 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
if (bRight || bBottom)
|
||||
{
|
||||
SetMapMode(aMMMode);
|
||||
SetLineColor();
|
||||
SetFillColor(aBackColor);
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor(aBackColor);
|
||||
if (bRight)
|
||||
DrawRect(tools::Rectangle(nPageEndX,0, aWinEnd.X(),aWinEnd.Y()));
|
||||
GetOutDev()->DrawRect(tools::Rectangle(nPageEndX,0, aWinEnd.X(),aWinEnd.Y()));
|
||||
if (bBottom)
|
||||
{
|
||||
if (bRight)
|
||||
DrawRect(tools::Rectangle(0,nPageEndY, nPageEndX,aWinEnd.Y())); // Corner not duplicated
|
||||
GetOutDev()->DrawRect(tools::Rectangle(0,nPageEndY, nPageEndX,aWinEnd.Y())); // Corner not duplicated
|
||||
else
|
||||
DrawRect(tools::Rectangle(0,nPageEndY, aWinEnd.X(),aWinEnd.Y()));
|
||||
GetOutDev()->DrawRect(tools::Rectangle(0,nPageEndY, aWinEnd.X(),aWinEnd.Y()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,19 +589,19 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
|
||||
if ( aOffset.X() <= 0 || aOffset.Y() <= 0 || bRight || bBottom )
|
||||
{
|
||||
SetLineColor( aBorderColor );
|
||||
SetFillColor();
|
||||
GetOutDev()->SetLineColor( aBorderColor );
|
||||
GetOutDev()->SetFillColor();
|
||||
|
||||
tools::Rectangle aPixel( LogicToPixel( tools::Rectangle( -aOffset.X(), -aOffset.Y(), nPageEndX, nPageEndY ) ) );
|
||||
aPixel.AdjustRight( -1 );
|
||||
aPixel.AdjustBottom( -1 );
|
||||
DrawRect( PixelToLogic( aPixel ) );
|
||||
GetOutDev()->DrawRect( PixelToLogic( aPixel ) );
|
||||
}
|
||||
|
||||
// draw shadow
|
||||
|
||||
SetLineColor();
|
||||
SetFillColor( aBorderColor );
|
||||
GetOutDev()->SetLineColor();
|
||||
GetOutDev()->SetFillColor( aBorderColor );
|
||||
|
||||
tools::Rectangle aPixel;
|
||||
|
||||
@@ -609,13 +609,13 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
|
||||
aPixel.AdjustTop(SC_PREVIEW_SHADOWSIZE );
|
||||
aPixel.AdjustRight(SC_PREVIEW_SHADOWSIZE - 1 );
|
||||
aPixel.AdjustBottom(SC_PREVIEW_SHADOWSIZE - 1 );
|
||||
DrawRect( PixelToLogic( aPixel ) );
|
||||
GetOutDev()->DrawRect( PixelToLogic( aPixel ) );
|
||||
|
||||
aPixel = LogicToPixel( tools::Rectangle( -aOffset.X(), nPageEndY, nPageEndX, nPageEndY ) );
|
||||
aPixel.AdjustLeft(SC_PREVIEW_SHADOWSIZE );
|
||||
aPixel.AdjustRight(SC_PREVIEW_SHADOWSIZE - 1 );
|
||||
aPixel.AdjustBottom(SC_PREVIEW_SHADOWSIZE - 1 );
|
||||
DrawRect( PixelToLogic( aPixel ) );
|
||||
GetOutDev()->DrawRect( PixelToLogic( aPixel ) );
|
||||
}
|
||||
|
||||
void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /* rRect */ )
|
||||
@@ -678,7 +678,7 @@ const ScPreviewLocationData& ScPreview::GetLocationData()
|
||||
{
|
||||
if ( !pLocationData )
|
||||
{
|
||||
pLocationData.reset( new ScPreviewLocationData( &pDocShell->GetDocument(), this ) );
|
||||
pLocationData.reset( new ScPreviewLocationData( &pDocShell->GetDocument(), GetOutDev() ) );
|
||||
bLocationValid = false;
|
||||
}
|
||||
if ( !bLocationValid )
|
||||
@@ -1117,7 +1117,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
|
||||
if ( ValidTab( nTab ) )
|
||||
{
|
||||
ScPrintFunc aPrintFunc( this, pDocShell, nTab );
|
||||
ScPrintFunc aPrintFunc( GetOutDev(), pDocShell, nTab );
|
||||
aPrintFunc.UpdatePages();
|
||||
}
|
||||
|
||||
@@ -1219,7 +1219,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
|
||||
if ( ValidTab( nTab ) )
|
||||
{
|
||||
ScPrintFunc aPrintFunc( this, pDocShell, nTab );
|
||||
ScPrintFunc aPrintFunc( GetOutDev(), pDocShell, nTab );
|
||||
aPrintFunc.UpdatePages();
|
||||
}
|
||||
|
||||
@@ -1279,7 +1279,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
}
|
||||
if ( ValidTab( nTab ) )
|
||||
{
|
||||
ScPrintFunc aPrintFunc( this, pDocShell, nTab );
|
||||
ScPrintFunc aPrintFunc( GetOutDev(), pDocShell, nTab );
|
||||
aPrintFunc.UpdatePages();
|
||||
}
|
||||
tools::Rectangle aRect(0, 0, 10000, 10000);
|
||||
@@ -1311,9 +1311,9 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
|
||||
|
||||
std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
|
||||
if (bStateValid)
|
||||
pPrintFunc.reset(new ScPrintFunc( this, pDocShell, aState, &aOptions ));
|
||||
pPrintFunc.reset(new ScPrintFunc( GetOutDev(), pDocShell, aState, &aOptions ));
|
||||
else
|
||||
pPrintFunc.reset(new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions ));
|
||||
pPrintFunc.reset(new ScPrintFunc( GetOutDev(), pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions ));
|
||||
|
||||
nLeftMargin = o3tl::convert(pPrintFunc->GetLeftMargin(), o3tl::Length::twip, o3tl::Length::mm100) - aOffset.X();
|
||||
nRightMargin = o3tl::convert(pPrintFunc->GetRightMargin(), o3tl::Length::twip, o3tl::Length::mm100);
|
||||
@@ -1562,12 +1562,12 @@ void ScPreview::DrawInvert( tools::Long nDragPos, PointerStyle nFlags )
|
||||
if( nFlags == PointerStyle::HSizeBar || nFlags == PointerStyle::HSplit )
|
||||
{
|
||||
tools::Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1, o3tl::convert(nHeight, o3tl::Length::twip, o3tl::Length::mm100) - aOffset.Y());
|
||||
Invert( aRect, InvertFlags::N50 );
|
||||
GetOutDev()->Invert( aRect, InvertFlags::N50 );
|
||||
}
|
||||
else if( nFlags == PointerStyle::VSizeBar )
|
||||
{
|
||||
tools::Rectangle aRect( -aOffset.X(), nDragPos, o3tl::convert(nWidth, o3tl::Length::twip, o3tl::Length::mm100) - aOffset.X(), nDragPos + 1 );
|
||||
Invert( aRect, InvertFlags::N50 );
|
||||
GetOutDev()->Invert( aRect, InvertFlags::N50 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ void ScPreviewShell::UpdateNeededScrollBars( bool bFromZoom )
|
||||
// for centering, page size without the shadow is used
|
||||
bool bVert = pVerScroll->IsVisible();
|
||||
bool bHori = pHorScroll->IsVisible();
|
||||
Size aWindowSize = pPreview->GetOutputSize();
|
||||
Size aWindowSize = pPreview->GetOutDev()->GetOutputSize();
|
||||
Point aPos = pPreview->GetPosPixel();
|
||||
Size aWindowPixelSize = pPreview->GetOutputSizePixel();
|
||||
|
||||
@@ -349,7 +349,7 @@ void ScPreviewShell::UpdateScrollBars()
|
||||
|
||||
// for centering, page size without the shadow is used
|
||||
|
||||
Size aWindowSize = pPreview->GetOutputSize();
|
||||
Size aWindowSize = pPreview->GetOutDev()->GetOutputSize();
|
||||
|
||||
Point aOfs = pPreview->GetOffset();
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ void ScSpellDialogChildWindow::Init()
|
||||
|
||||
mxEngine.reset( new ScSpellingEngine(
|
||||
mpDoc->GetEnginePool(), *mpViewData, mxUndoDoc.get(), mxRedoDoc.get(), LinguMgr::GetSpellChecker() ) );
|
||||
mxEngine->SetRefDevice( mpViewData->GetActiveWin() );
|
||||
mxEngine->SetRefDevice( mpViewData->GetActiveWin()->GetOutDev() );
|
||||
|
||||
mpViewShell->MakeEditView( mxEngine.get(), nCol, nRow );
|
||||
EditView* pEditView = mpViewData->GetEditView( mpViewData->GetActivePart() );
|
||||
|
||||
@@ -106,7 +106,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rect
|
||||
const tools::Long w4 = rRect.GetWidth() / 4;
|
||||
// First yc fraction is truncated, second one is rounded. This will draw a centered line
|
||||
// in handlers with odd height and a centered rectangle in those with even height.
|
||||
DrawRect(tools::Rectangle(Point(rRect.Left() + w4, yc / 2),
|
||||
GetOutDev()->DrawRect(tools::Rectangle(Point(rRect.Left() + w4, yc / 2),
|
||||
Point(rRect.Right() - w4, (yc + 1) / 2)));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ ScTabView::~ScTabView()
|
||||
for (i=0; i<4; i++)
|
||||
if (pGridWin[i])
|
||||
{
|
||||
pDrawView->DeleteWindowFromPaintView(pGridWin[i]);
|
||||
pDrawView->DeleteWindowFromPaintView(pGridWin[i]->GetOutDev());
|
||||
}
|
||||
|
||||
pDrawView->HideSdrPage();
|
||||
@@ -235,12 +235,12 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
|
||||
OSL_ENSURE(pLayer, "Where is the Draw Layer ??");
|
||||
|
||||
sal_uInt16 i;
|
||||
pDrawView.reset( new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT], &aViewData ) );
|
||||
pDrawView.reset( new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT]->GetOutDev(), &aViewData ) );
|
||||
for (i=0; i<4; i++)
|
||||
if (pGridWin[i])
|
||||
{
|
||||
if ( SC_SPLIT_BOTTOMLEFT != static_cast<ScSplitPos>(i) )
|
||||
pDrawView->AddWindowToPaintView(pGridWin[i], nullptr);
|
||||
pDrawView->AddWindowToPaintView(pGridWin[i]->GetOutDev(), nullptr);
|
||||
}
|
||||
pDrawView->RecalcScale();
|
||||
for (i=0; i<4; i++)
|
||||
@@ -273,7 +273,7 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
|
||||
{
|
||||
if (pDrawView)
|
||||
{
|
||||
pDrawView->AddWindowToPaintView(pWin, nullptr);
|
||||
pDrawView->AddWindowToPaintView(pWin->GetOutDev(), nullptr);
|
||||
pWin->DrawLayerCreated();
|
||||
}
|
||||
pWin->SetAutoSpellContext(mpSpellCheckCxt);
|
||||
@@ -535,7 +535,7 @@ void ScTabView::DigitLanguageChanged()
|
||||
LanguageType eNewLang = SC_MOD()->GetOptDigitLanguage();
|
||||
for (VclPtr<ScGridWindow> & pWin : pGridWin)
|
||||
if ( pWin )
|
||||
pWin->SetDigitLanguage( eNewLang );
|
||||
pWin->GetOutDev()->SetDigitLanguage( eNewLang );
|
||||
}
|
||||
|
||||
void ScTabView::ScrollToObject( const SdrObject* pDrawObj )
|
||||
|
||||
@@ -57,7 +57,7 @@ void ScTabViewShell::WindowChanged()
|
||||
|
||||
ScDrawView* pDrView = GetScDrawView();
|
||||
if (pDrView)
|
||||
pDrView->SetActualWin(pWin);
|
||||
pDrView->SetActualWin(pWin->GetOutDev());
|
||||
|
||||
FuPoor* pFunc = GetDrawFuncPtr();
|
||||
if (pFunc)
|
||||
|
||||
@@ -1453,7 +1453,7 @@ tools::Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW
|
||||
Point aCellTopLeft = bInPrintTwips ?
|
||||
GetPrintTwipsPos(nPosX, nPosY) : GetScrPos(nPosX, nPosY, eWhich, true);
|
||||
return ScEditUtil(&mrDoc, nPosX, nPosY, nTabNo, aCellTopLeft,
|
||||
pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY(), bInPrintTwips ).
|
||||
pWin->GetOutDev(), nPPTX, nPPTY, GetZoomX(), GetZoomY(), bInPrintTwips ).
|
||||
GetEditArea( pPattern, bForceToTop );
|
||||
}
|
||||
|
||||
@@ -1537,14 +1537,14 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
|
||||
bool bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler
|
||||
|
||||
tools::Rectangle aPixRect = ScEditUtil(&mrDoc, nNewX, nNewY, nTabNo, GetScrPos(nNewX, nNewY, eWhich),
|
||||
pWin, nPPTX,nPPTY,GetZoomX(),GetZoomY() ).
|
||||
pWin->GetOutDev(), nPPTX,nPPTY,GetZoomX(),GetZoomY() ).
|
||||
GetEditArea( pPattern, true );
|
||||
|
||||
tools::Rectangle aPTwipsRect;
|
||||
if (bLOKPrintTwips)
|
||||
{
|
||||
aPTwipsRect = ScEditUtil(&mrDoc, nNewX, nNewY, nTabNo, GetPrintTwipsPos(nNewX, nNewY),
|
||||
pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY(), true /* bInPrintTwips */).
|
||||
pWin->GetOutDev(), nPPTX, nPPTY, GetZoomX(), GetZoomY(), true /* bInPrintTwips */).
|
||||
GetEditArea(pPattern, true);
|
||||
}
|
||||
|
||||
@@ -1672,7 +1672,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
|
||||
// (and same line breaks) as for output.
|
||||
|
||||
Fraction aFract(1,1);
|
||||
tools::Rectangle aUtilRect = ScEditUtil(&mrDoc, nNewX, nNewY, nTabNo, Point(0, 0), pWin,
|
||||
tools::Rectangle aUtilRect = ScEditUtil(&mrDoc, nNewX, nNewY, nTabNo, Point(0, 0), pWin->GetOutDev(),
|
||||
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
|
||||
aPaperSize.setWidth( aUtilRect.GetWidth() );
|
||||
if (bLOKPrintTwips)
|
||||
|
||||
@@ -359,7 +359,7 @@ void ScViewFunc::DoThesaurus()
|
||||
|
||||
pThesaurusEngine.reset(new ScEditEngineDefaulter(rDoc.GetEnginePool()));
|
||||
pThesaurusEngine->SetEditTextObjectPool( rDoc.GetEditPool() );
|
||||
pThesaurusEngine->SetRefDevice(GetViewData().GetActiveWin());
|
||||
pThesaurusEngine->SetRefDevice(GetViewData().GetActiveWin()->GetOutDev());
|
||||
pThesaurusEngine->SetSpeller(xSpeller);
|
||||
MakeEditView(pThesaurusEngine.get(), nCol, nRow );
|
||||
std::unique_ptr<SfxItemSet> pEditDefaults(
|
||||
@@ -522,7 +522,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam )
|
||||
}
|
||||
|
||||
MakeEditView( pEngine.get(), nCol, nRow );
|
||||
pEngine->SetRefDevice( rViewData.GetActiveWin() );
|
||||
pEngine->SetRefDevice( rViewData.GetActiveWin()->GetOutDev() );
|
||||
// simulate dummy cell:
|
||||
pEditView = rViewData.GetEditView( rViewData.GetActivePart() );
|
||||
rViewData.SetSpellingView( pEditView );
|
||||
|
||||
@@ -69,7 +69,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
|
||||
mxController (rxController),
|
||||
maViewForwarder (
|
||||
static_cast<SdrPaintView*>(pViewShell->GetView()),
|
||||
*pSdWindow)
|
||||
*pSdWindow->GetOutDev())
|
||||
{
|
||||
if (mxController.is())
|
||||
mxModel = mxController->getModel();
|
||||
|
||||
@@ -79,8 +79,7 @@ Point AccessibleViewForwarder::LogicToPixel(const Point& rPoint) const
|
||||
{
|
||||
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(static_cast<sal_uInt32>(mnWindowId));
|
||||
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
|
||||
::tools::Rectangle aBBox(
|
||||
static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr));
|
||||
::tools::Rectangle aBBox(rOutDev.GetOwnerWindow()->GetWindowExtentsRelative(nullptr));
|
||||
return rOutDev.LogicToPixel(rPoint) + aBBox.TopLeft();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -445,7 +445,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
|
||||
}
|
||||
else if( rMEvt.IsLeft() )
|
||||
{
|
||||
OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow();
|
||||
OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow()->GetOutDev();
|
||||
Point aMDPos( pOut->PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
|
||||
if( !mrView.IsFrameDragSingles() && mrView.IsInsObjPointMode() && (rHdl.GetObjHdlNum() == SMART_TAG_HDL_NUM) )
|
||||
@@ -686,7 +686,7 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt )
|
||||
|
||||
if(rKEvt.GetKeyCode().IsMod2())
|
||||
{
|
||||
OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow();
|
||||
OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow()->GetOutDev();
|
||||
Size aLogicSizeOnePixel = pOut ? pOut->PixelToLogic(Size(1,1)) : Size(100, 100);
|
||||
nX *= aLogicSizeOnePixel.Width();
|
||||
nY *= aLogicSizeOnePixel.Height();
|
||||
|
||||
@@ -414,7 +414,7 @@ bool AnnotationTag::OnMove( const KeyEvent& rKEvt )
|
||||
|
||||
if(rKEvt.GetKeyCode().IsMod2())
|
||||
{
|
||||
OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow();
|
||||
OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow()->GetOutDev();
|
||||
Size aLogicSizeOnePixel = pOut ? pOut->PixelToLogic(Size(1,1)) : Size(100, 100);
|
||||
nX *= aLogicSizeOnePixel.Width();
|
||||
nY *= aLogicSizeOnePixel.Height();
|
||||
@@ -574,7 +574,8 @@ void AnnotationTag::OpenPopup( bool bEdit )
|
||||
|
||||
if( !mpAnnotationWindow )
|
||||
{
|
||||
vcl::Window* pWindow = dynamic_cast< vcl::Window* >( getView().GetFirstOutputDevice() );
|
||||
OutputDevice* pOut = getView().GetFirstOutputDevice();
|
||||
vcl::Window* pWindow = pOut ? pOut->GetOwnerWindow() : nullptr;
|
||||
if( pWindow )
|
||||
{
|
||||
RealPoint2D aPosition( mxAnnotation->getPosition() );
|
||||
|
||||
@@ -864,7 +864,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
|
||||
|
||||
void AnimationWindow::CreateAnimObj (::sd::View& rView )
|
||||
{
|
||||
vcl::Window* pOutWin = static_cast< vcl::Window*>(rView.GetFirstOutputDevice()); // GetWin( 0 );
|
||||
vcl::Window* pOutWin = rView.GetFirstOutputDevice()->GetOwnerWindow(); // GetWin( 0 );
|
||||
DBG_ASSERT( pOutWin, "Window does not exist!" );
|
||||
|
||||
// find window center
|
||||
|
||||
@@ -172,7 +172,7 @@ bool FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
}
|
||||
else
|
||||
{
|
||||
mpView->MouseButtonDown(rMEvt, mpWindow);
|
||||
mpView->MouseButtonDown(rMEvt, mpWindow->GetOutDev());
|
||||
|
||||
SdrObject* pObj = mpView->GetCreateObj();
|
||||
|
||||
@@ -204,7 +204,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
|
||||
}
|
||||
else
|
||||
{
|
||||
mpView->MouseButtonUp(rMEvt, mpWindow);
|
||||
mpView->MouseButtonUp(rMEvt, mpWindow->GetOutDev());
|
||||
}
|
||||
|
||||
if (aVEvt.eEvent == SdrEventKind::EndCreate)
|
||||
|
||||
@@ -193,7 +193,7 @@ bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
// look only for HelpLines when they are visible (!)
|
||||
bool bHelpLine(false);
|
||||
if(mpView->IsHlplVisible())
|
||||
bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow, nHelpLine, pPV);
|
||||
bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow->GetOutDev(), nHelpLine, pPV);
|
||||
bool bHitHdl = (mpView->PickHandle(aMDPos) != nullptr);
|
||||
|
||||
if ( bHelpLine
|
||||
@@ -257,7 +257,7 @@ bool FuDraw::MouseMove(const MouseEvent& rMEvt)
|
||||
mpView->MovDragHelpLine(aPos);
|
||||
}
|
||||
|
||||
bool bReturn = mpView->MouseMove(rMEvt, mpWindow);
|
||||
bool bReturn = mpView->MouseMove(rMEvt, mpWindow->GetOutDev());
|
||||
|
||||
if (mpView->IsAction())
|
||||
{
|
||||
@@ -571,7 +571,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
|
||||
if (bDefPointer)
|
||||
{
|
||||
mpWindow->SetPointer(mpView->GetPreferredPointer(
|
||||
aPnt, mpWindow, nModifier, bLeftDown));
|
||||
aPnt, mpWindow->GetOutDev(), nModifier, bLeftDown));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ FuEditGluePoints::~FuEditGluePoints()
|
||||
|
||||
bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
{
|
||||
mpView->SetActualWin( mpWindow );
|
||||
mpView->SetActualWin( mpWindow->GetOutDev() );
|
||||
|
||||
bool bReturn = FuDraw::MouseButtonDown(rMEvt);
|
||||
|
||||
@@ -196,7 +196,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
|
||||
bool FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
|
||||
{
|
||||
mpView->SetActualWin( mpWindow );
|
||||
mpView->SetActualWin( mpWindow->GetOutDev() );
|
||||
|
||||
FuDraw::MouseMove(rMEvt);
|
||||
|
||||
@@ -215,7 +215,7 @@ bool FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
|
||||
|
||||
bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
{
|
||||
mpView->SetActualWin( mpWindow );
|
||||
mpView->SetActualWin( mpWindow->GetOutDev() );
|
||||
|
||||
bool bReturn = false;
|
||||
|
||||
@@ -255,7 +255,7 @@ bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
*/
|
||||
bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
|
||||
{
|
||||
mpView->SetActualWin( mpWindow );
|
||||
mpView->SetActualWin( mpWindow->GetOutDev() );
|
||||
|
||||
//Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
|
||||
//and SHIFT+ENTER key to decide the position and draw the new insert point
|
||||
@@ -362,7 +362,7 @@ void FuEditGluePoints::ForcePointer(const MouseEvent* pMEvt)
|
||||
|
||||
bool FuEditGluePoints::Command(const CommandEvent& rCEvt)
|
||||
{
|
||||
mpView->SetActualWin( mpWindow );
|
||||
mpView->SetActualWin( mpWindow->GetOutDev() );
|
||||
return FuPoor::Command( rCEvt );
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
|
||||
{
|
||||
aLinePos = mpWindow->PixelToLogic(aLinePos);
|
||||
sal_uInt16 nHitLog = static_cast<sal_uInt16>(mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
|
||||
bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow, nHelpLine, pPV);
|
||||
bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow->GetOutDev(), nHelpLine, pPV);
|
||||
if ( bLineExist )
|
||||
aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
|
||||
else
|
||||
|
||||
@@ -278,7 +278,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
|
||||
if (eHit == SdrHitKind::TextEdit)
|
||||
{
|
||||
// hit text -> SdrView handles event
|
||||
if (mpView->MouseButtonDown(rMEvt, mpWindow))
|
||||
if (mpView->MouseButtonDown(rMEvt, mpWindow->GetOutDev()))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -626,7 +626,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
|
||||
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
|
||||
if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 )
|
||||
if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow->GetOutDev())) || rMEvt.GetClicks() == 2 )
|
||||
return true; // handle event from SdrView
|
||||
|
||||
bool bEmptyTextObj = false;
|
||||
|
||||
@@ -56,7 +56,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, vc
|
||||
, mnFirstMouseMove(0)
|
||||
, mxController( xController )
|
||||
{
|
||||
SetOutDevViewType( OutDevViewType::SlideShow );
|
||||
GetOutDev()->SetOutDevViewType( OutDevViewType::SlideShow );
|
||||
|
||||
// Do never mirror the preview window. This explicitly includes right
|
||||
// to left writing environments.
|
||||
@@ -271,7 +271,7 @@ void ShowWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Re
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawWallpaper( rRect, maShowBackground );
|
||||
GetOutDev()->DrawWallpaper( rRect, maShowBackground );
|
||||
|
||||
if( SHOWWINDOWMODE_END == meShowWindowMode )
|
||||
{
|
||||
@@ -385,7 +385,7 @@ void ShowWindow::TerminateShow()
|
||||
maLogo.Clear();
|
||||
maPauseTimer.Stop();
|
||||
maMouseTimer.Stop();
|
||||
Erase();
|
||||
GetOutDev()->Erase();
|
||||
maShowBackground = Wallpaper( COL_BLACK );
|
||||
meShowWindowMode = SHOWWINDOWMODE_NORMAL;
|
||||
mnPauseTimeout = SLIDE_NO_TIMEOUT;
|
||||
@@ -417,7 +417,7 @@ void ShowWindow::RestartShow( sal_Int32 nPageIndexToRestart )
|
||||
|
||||
maLogo.Clear();
|
||||
maPauseTimer.Stop();
|
||||
Erase();
|
||||
GetOutDev()->Erase();
|
||||
maShowBackground = Wallpaper( COL_BLACK );
|
||||
meShowWindowMode = SHOWWINDOWMODE_NORMAL;
|
||||
mnPauseTimeout = SLIDE_NO_TIMEOUT;
|
||||
@@ -457,9 +457,9 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
|
||||
{
|
||||
const MapMode& rMap = GetMapMode();
|
||||
const Point aOutOrg( PixelToLogic( Point() ) );
|
||||
const Size aOutSize( GetOutputSize() );
|
||||
const Size aTextSize(LogicToLogic(Size(0, 14), MapMode(MapUnit::MapPoint), rMap));
|
||||
const Size aOffset(LogicToLogic(Size(1000, 1000), MapMode(MapUnit::Map100thMM), rMap));
|
||||
const Size aOutSize( GetOutDev()->GetOutputSize() );
|
||||
const Size aTextSize(OutputDevice::LogicToLogic(Size(0, 14), MapMode(MapUnit::MapPoint), rMap));
|
||||
const Size aOffset(OutputDevice::LogicToLogic(Size(1000, 1000), MapMode(MapUnit::Map100thMM), rMap));
|
||||
OUString aText( SdResId( STR_PRES_PAUSE ) );
|
||||
bool bDrawn = false;
|
||||
|
||||
@@ -478,21 +478,21 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
|
||||
if (maLogo.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel)
|
||||
aGrfSize = PixelToLogic( maLogo.GetPrefSize() );
|
||||
else
|
||||
aGrfSize = LogicToLogic( maLogo.GetPrefSize(), maLogo.GetPrefMapMode(), rMap );
|
||||
aGrfSize = OutputDevice::LogicToLogic( maLogo.GetPrefSize(), maLogo.GetPrefMapMode(), rMap );
|
||||
|
||||
const Point aGrfPos( std::max( aOutOrg.X() + aOutSize.Width() - aGrfSize.Width() - aOffset.Width(), aOutOrg.X() ),
|
||||
std::max( aOutOrg.Y() + aOutSize.Height() - aGrfSize.Height() - aOffset.Height(), aOutOrg.Y() ) );
|
||||
|
||||
if( maLogo.IsAnimated() )
|
||||
maLogo.StartAnimation( this, aGrfPos, aGrfSize, reinterpret_cast<sal_IntPtr>(this) );
|
||||
maLogo.StartAnimation( GetOutDev(), aGrfPos, aGrfSize, reinterpret_cast<sal_IntPtr>(this) );
|
||||
else
|
||||
maLogo.Draw( this, aGrfPos, aGrfSize );
|
||||
maLogo.Draw( GetOutDev(), aGrfPos, aGrfSize );
|
||||
}
|
||||
|
||||
if( SLIDE_NO_TIMEOUT != mnPauseTimeout )
|
||||
{
|
||||
MapMode aVMap( rMap );
|
||||
ScopedVclPtrInstance< VirtualDevice > pVDev( *this );
|
||||
ScopedVclPtrInstance< VirtualDevice > pVDev( *GetOutDev() );
|
||||
|
||||
aVMap.SetOrigin( Point() );
|
||||
pVDev->SetMapMode( aVMap );
|
||||
@@ -511,7 +511,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
|
||||
|
||||
aText += " ( " + aLocaleData.getDuration( ::tools::Time( 0, 0, mnPauseTimeout ) ) + " )";
|
||||
pVDev->DrawText( Point( aOffset.Width(), 0 ), aText );
|
||||
DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, *pVDev );
|
||||
GetOutDev()->DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, *pVDev );
|
||||
bDrawn = true;
|
||||
}
|
||||
}
|
||||
@@ -519,7 +519,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
|
||||
if( !bDrawn )
|
||||
{
|
||||
SetFont( aFont );
|
||||
DrawText( Point( aOutOrg.X() + aOffset.Width(), aOutOrg.Y() + aOffset.Height() ), aText );
|
||||
GetOutDev()->DrawText( Point( aOutOrg.X() + aOffset.Width(), aOutOrg.Y() + aOffset.Height() ), aText );
|
||||
SetFont( aOldFont );
|
||||
}
|
||||
}
|
||||
@@ -530,7 +530,7 @@ void ShowWindow::DrawEndScene()
|
||||
vcl::Font aFont( GetSettings().GetStyleSettings().GetMenuFont() );
|
||||
|
||||
const Point aOutOrg( PixelToLogic( Point() ) );
|
||||
const Size aTextSize(LogicToLogic(Size(0, 14), MapMode(MapUnit::MapPoint), GetMapMode()));
|
||||
const Size aTextSize(OutputDevice::LogicToLogic(Size(0, 14), MapMode(MapUnit::MapPoint), GetMapMode()));
|
||||
const OUString aText( SdResId( STR_PRES_SOFTEND ) );
|
||||
|
||||
aFont.SetFontSize( aTextSize );
|
||||
@@ -538,7 +538,7 @@ void ShowWindow::DrawEndScene()
|
||||
aFont.SetCharSet( aOldFont.GetCharSet() );
|
||||
aFont.SetLanguage( aOldFont.GetLanguage() );
|
||||
SetFont( aFont );
|
||||
DrawText( Point( aOutOrg.X() + aTextSize.Height(), aOutOrg.Y() + aTextSize.Height() ), aText );
|
||||
GetOutDev()->DrawText( Point( aOutOrg.X() + aTextSize.Height(), aOutOrg.Y() + aTextSize.Height() ), aText );
|
||||
SetFont( aOldFont );
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ IMPL_LINK( ShowWindow, EventHdl, VclWindowEvent&, rEvent, void )
|
||||
void ShowWindow::DeleteWindowFromPaintView()
|
||||
{
|
||||
if( mpViewShell->GetView() )
|
||||
mpViewShell->GetView()->DeleteWindowFromPaintView( this );
|
||||
mpViewShell->GetView()->DeleteWindowFromPaintView( GetOutDev() );
|
||||
|
||||
sal_uInt16 nChild = GetChildCount();
|
||||
while( nChild-- )
|
||||
@@ -594,7 +594,7 @@ void ShowWindow::DeleteWindowFromPaintView()
|
||||
void ShowWindow::AddWindowToPaintView()
|
||||
{
|
||||
if( mpViewShell->GetView() )
|
||||
mpViewShell->GetView()->AddWindowToPaintView( this, nullptr );
|
||||
mpViewShell->GetView()->AddWindowToPaintView( GetOutDev(), nullptr );
|
||||
|
||||
sal_uInt16 nChild = GetChildCount();
|
||||
while( nChild-- )
|
||||
|
||||
@@ -929,7 +929,7 @@ void SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
|
||||
|
||||
OutputDevice* SlideShow::getShowWindow()
|
||||
{
|
||||
return mxController.is() ? mxController->mpShowWindow.get() : nullptr;
|
||||
return mxController.is() ? mxController->mpShowWindow->GetOutDev() : nullptr;
|
||||
}
|
||||
|
||||
int SlideShow::getAnimationMode() const
|
||||
|
||||
@@ -631,7 +631,7 @@ void SAL_CALL SlideshowImpl::disposing()
|
||||
|
||||
// take DrawView from presentation window, but give the old window back
|
||||
if( mpShowWindow && mpView )
|
||||
mpView->DeleteWindowFromPaintView( mpShowWindow );
|
||||
mpView->DeleteWindowFromPaintView( mpShowWindow->GetOutDev() );
|
||||
|
||||
if( mpView )
|
||||
mpView->SetAnimationPause( false );
|
||||
@@ -702,7 +702,7 @@ void SAL_CALL SlideshowImpl::disposing()
|
||||
::tools::Rectangle aVisAreaWin = pActWin->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) );
|
||||
mpViewShell->VisAreaChanged(aVisAreaWin);
|
||||
if (mpView)
|
||||
mpView->VisAreaChanged(pActWin);
|
||||
mpView->VisAreaChanged(pActWin->GetOutDev());
|
||||
pActWin->GrabFocus();
|
||||
}
|
||||
}
|
||||
@@ -784,7 +784,7 @@ bool SlideshowImpl::startPreview(
|
||||
|
||||
if( mpView )
|
||||
{
|
||||
mpView->AddWindowToPaintView( mpShowWindow, nullptr );
|
||||
mpView->AddWindowToPaintView( mpShowWindow->GetOutDev(), nullptr );
|
||||
mpView->SetAnimationPause( true );
|
||||
}
|
||||
|
||||
@@ -969,7 +969,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings )
|
||||
|
||||
if( mpView )
|
||||
{
|
||||
mpView->AddWindowToPaintView( mpShowWindow, nullptr );
|
||||
mpView->AddWindowToPaintView( mpShowWindow->GetOutDev(), nullptr );
|
||||
mpView->SetAnimationPause( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ void SlideSorterController::Paint (
|
||||
|
||||
try
|
||||
{
|
||||
mrView.CompleteRedraw(pWindow, vcl::Region(rBBox));
|
||||
mrView.CompleteRedraw(pWindow->GetOutDev(), vcl::Region(rBBox));
|
||||
}
|
||||
catch (const Exception&)
|
||||
{
|
||||
@@ -552,7 +552,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent&, rEvent, vo
|
||||
if (mrSlideSorter.GetViewShell() != nullptr)
|
||||
mrSlideSorter.GetViewShell()->GetFrameView()->SetDrawMode(nDrawMode);
|
||||
if (pActiveWindow != nullptr)
|
||||
pActiveWindow->SetDrawMode(nDrawMode);
|
||||
pActiveWindow->GetOutDev()->SetDrawMode(nDrawMode);
|
||||
mrView.HandleDrawModeChange();
|
||||
|
||||
// When the system font has changed a layout has to be done.
|
||||
@@ -596,7 +596,7 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet)
|
||||
{
|
||||
if (mrSlideSorter.GetContentWindow())
|
||||
{
|
||||
DrawModeFlags nMode = mrSlideSorter.GetContentWindow()->GetDrawMode();
|
||||
DrawModeFlags nMode = mrSlideSorter.GetContentWindow()->GetOutDev()->GetDrawMode();
|
||||
sal_uInt16 nQuality = 0;
|
||||
|
||||
if (nMode == sd::OUTPUT_DRAWMODE_COLOR) {
|
||||
|
||||
@@ -540,8 +540,8 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
|
||||
mpSlideSorter->GetController().Rearrange(true);
|
||||
|
||||
// DrawMode for 'main' window
|
||||
if (GetActiveWindow()->GetDrawMode() != pFrameView->GetDrawMode() )
|
||||
GetActiveWindow()->SetDrawMode( pFrameView->GetDrawMode() );
|
||||
if (GetActiveWindow()->GetOutDev()->GetDrawMode() != pFrameView->GetDrawMode() )
|
||||
GetActiveWindow()->GetOutDev()->SetDrawMode( pFrameView->GetDrawMode() );
|
||||
}
|
||||
|
||||
// When this slide sorter is not displayed in the main window then we do
|
||||
@@ -566,8 +566,8 @@ void SlideSorterViewShell::WriteFrameViewData()
|
||||
mpFrameView->SetSlidesPerRow(static_cast<sal_uInt16>(rView.GetLayouter().GetColumnCount()));
|
||||
|
||||
// DrawMode for 'main' window
|
||||
if( mpFrameView->GetDrawMode() != GetActiveWindow()->GetDrawMode() )
|
||||
mpFrameView->SetDrawMode( GetActiveWindow()->GetDrawMode() );
|
||||
if( mpFrameView->GetDrawMode() != GetActiveWindow()->GetOutDev()->GetDrawMode() )
|
||||
mpFrameView->SetDrawMode( GetActiveWindow()->GetOutDev()->GetDrawMode() );
|
||||
|
||||
SdPage* pActualPage = GetActualPage();
|
||||
if (pActualPage != nullptr)
|
||||
|
||||
@@ -114,7 +114,7 @@ private:
|
||||
SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
|
||||
: ::sd::View (
|
||||
*rSlideSorter.GetModel().GetDocument(),
|
||||
rSlideSorter.GetContentWindow(),
|
||||
rSlideSorter.GetContentWindow()->GetOutDev(),
|
||||
rSlideSorter.GetViewShell()),
|
||||
mrSlideSorter(rSlideSorter),
|
||||
mrModel(rSlideSorter.GetModel()),
|
||||
@@ -576,7 +576,7 @@ void SlideSorterView::CompleteRedraw (
|
||||
if (comphelper::LibreOfficeKit::isActive())
|
||||
return;
|
||||
|
||||
if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow())
|
||||
if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow()->GetOutDev())
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_TIMING
|
||||
|
||||
@@ -424,7 +424,7 @@ void PageObjectRun::operator () (const double nGlobalTime)
|
||||
// a) animations a bit more smooth and
|
||||
// b) on Mac without the Flush a Reset of the page locations is not properly
|
||||
// visualized when the mouse leaves the window during drag-and-drop.
|
||||
mrAnimatorAccess.GetContentWindow()->Flush();
|
||||
mrAnimatorAccess.GetContentWindow()->GetOutDev()->Flush();
|
||||
}
|
||||
|
||||
} // end of namespace ::sd::slidesorter::view
|
||||
|
||||
@@ -130,7 +130,7 @@ void InsertionIndicatorOverlay::Create (
|
||||
// Create virtual devices for bitmap and mask whose bitmaps later be
|
||||
// combined to form the BitmapEx of the icon.
|
||||
ScopedVclPtrInstance<VirtualDevice> pContent(
|
||||
*mrSlideSorter.GetContentWindow(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
|
||||
*mrSlideSorter.GetContentWindow()->GetOutDev(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
|
||||
pContent->SetOutputSizePixel(aIconSize);
|
||||
|
||||
pContent->SetFillColor();
|
||||
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
LayeredDevice::LayeredDevice (const VclPtr<sd::Window>& pTargetWindow)
|
||||
: mpTargetWindow(pTargetWindow),
|
||||
mpLayers(new LayerContainer()),
|
||||
mpBackBuffer(VclPtr<VirtualDevice>::Create(*mpTargetWindow)),
|
||||
mpBackBuffer(VclPtr<VirtualDevice>::Create(*mpTargetWindow->GetOutDev())),
|
||||
maSavedMapMode(pTargetWindow->GetMapMode())
|
||||
{
|
||||
mpBackBuffer->SetOutputSizePixel(mpTargetWindow->GetSizePixel());
|
||||
@@ -273,7 +273,7 @@ void LayeredDevice::RepaintRectangle (const ::tools::Rectangle& rRepaintRectangl
|
||||
else if (mpLayers->size() == 1)
|
||||
{
|
||||
// Just copy the main layer into the target device.
|
||||
(*mpLayers)[0]->Repaint(*mpTargetWindow, rRepaintRectangle);
|
||||
(*mpLayers)[0]->Repaint(*mpTargetWindow->GetOutDev(), rRepaintRectangle);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -285,7 +285,7 @@ void LayeredDevice::RepaintRectangle (const ::tools::Rectangle& rRepaintRectangl
|
||||
{
|
||||
it->Repaint(*mpBackBuffer, rRepaintRectangle);
|
||||
}
|
||||
DeviceCopy(*mpTargetWindow, *mpBackBuffer, rRepaintRectangle);
|
||||
DeviceCopy(*mpTargetWindow->GetOutDev(), *mpBackBuffer, rRepaintRectangle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ void Layer::Initialize (sd::Window *pTargetWindow)
|
||||
#else
|
||||
if ( ! mpLayerDevice)
|
||||
{
|
||||
mpLayerDevice.disposeAndReset(VclPtr<VirtualDevice>::Create(*pTargetWindow));
|
||||
mpLayerDevice.disposeAndReset(VclPtr<VirtualDevice>::Create(*pTargetWindow->GetOutDev()));
|
||||
mpLayerDevice->SetOutputSizePixel(pTargetWindow->GetSizePixel());
|
||||
}
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user