/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "PresenterSprite.hxx" #include #include #include #include using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::UNO_QUERY; namespace sdext::presenter { PresenterSprite::PresenterSprite() : maSize(0,0), maLocation(0,0), mbIsVisible(false) { } PresenterSprite::~PresenterSprite() { if (mxSprite.is()) { mxSprite->hide(); Reference xComponent (mxSprite, UNO_QUERY); if (xComponent.is()) xComponent->dispose(); mxSprite = nullptr; } } void PresenterSprite::SetFactory ( const css::uno::Reference& rxSpriteFactory) { if (mxSpriteFactory != rxSpriteFactory) { DisposeSprite(); mxSpriteFactory = rxSpriteFactory; if (mbIsVisible) ProvideSprite(); } } css::uno::Reference PresenterSprite::GetCanvas() { ProvideSprite(); if (mxSprite.is()) return mxSprite->getContentCanvas(); else return nullptr; } void PresenterSprite::Show() { mbIsVisible = true; if (mxSprite.is()) mxSprite->show(); else ProvideSprite(); } void PresenterSprite::Hide() { mbIsVisible = false; if (mxSprite.is()) mxSprite->hide(); } void PresenterSprite::Resize (const css::geometry::RealSize2D& rSize) { maSize = rSize; if (mxSprite.is()) DisposeSprite(); if (mbIsVisible) ProvideSprite(); } void PresenterSprite::MoveTo (const css::geometry::RealPoint2D& rLocation) { maLocation = rLocation; if (mxSprite.is()) mxSprite->move( maLocation, rendering::ViewState( geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr), rendering::RenderState( geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr, uno::Sequence(4), rendering::CompositeOperation::SOURCE) ); } void PresenterSprite::Update() { if (mxSpriteFactory.is()) mxSpriteFactory->updateScreen(false); } void PresenterSprite::ProvideSprite() { if ( !(! mxSprite.is() && mxSpriteFactory.is() && maSize.Width>0 && maSize.Height>0)) return; mxSprite = mxSpriteFactory->createCustomSprite(maSize); if (!mxSprite.is()) return; mxSprite->move(maLocation, rendering::ViewState( geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr), rendering::RenderState( geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr, uno::Sequence(4), rendering::CompositeOperation::SOURCE) ); mxSprite->setAlpha(1.0); mxSprite->setPriority(0); if (mbIsVisible) mxSprite->show(); } void PresenterSprite::DisposeSprite() { if (mxSprite.is()) { mxSprite->hide(); Reference xComponent (mxSprite, UNO_QUERY); if (xComponent.is()) xComponent->dispose(); mxSprite = nullptr; } } } //end of namespace sdext::presenter /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ption> LibreOffice 界面翻译代码仓库文档基金会
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2024-09-02 12:32:11 +0200
committerAndras Timar <andras.timar@collabora.com>2024-09-11 21:36:56 +0200
commit55f9dfe05f68146caecdd3d26391de995f3f6111 (patch)
tree1ebd639565928d5938d6dc2f08919fc95154a364
parent9787c15eddfe140c2ac231375d2a09178ce5ae46 (diff)
update translations for 24.2.6 rc2 cp-24.04.8-2cp-24.04.8-1cp-24.04.7-3cp-24.04.7-2
and force-fix errors using pocheck Change-Id: I8ca2526b3066f2b5d79618e9a000d10c6cb7244f
-rw-r--r--source/ast/helpcontent2/source/text/scalc/01.po4
-rw-r--r--source/ast/helpcontent2/source/text/sdatabase.po12
-rw-r--r--source/bg/helpcontent2/source/text/sbasic/shared/03.po414
-rw-r--r--source/bg/helpcontent2/source/text/scalc/01.po4
-rw-r--r--source/bg/helpcontent2/source/text/shared/02.po4
-rw-r--r--source/bg/helpcontent2/source/text/swriter/guide.po4
-rw-r--r--source/ca/helpcontent2/source/text/scalc/01.po6
-rw-r--r--source/ca/helpcontent2/source/text/sdatabase.po6
-rw-r--r--source/da/cui/messages.po6
-rw-r--r--source/da/helpcontent2/source/text/shared/00.po6
-rw-r--r--source/da/officecfg/registry/data/org/openoffice/Office/UI.po10
-rw-r--r--source/dsb/helpcontent2/source/text/swriter/guide.po150
-rw-r--r--source/es/helpcontent2/source/text/shared/optionen.po6
-rw-r--r--source/es/sc/messages.po4
-rw-r--r--source/eu/helpcontent2/source/text/sbasic/python.po8
-rw-r--r--source/eu/helpcontent2/source/text/shared/optionen.po8
-rw-r--r--source/fr/sc/messages.po10
-rw-r--r--source/fr/sw/messages.po4
-rw-r--r--source/gug/helpcontent2/source/text/shared/optionen.po6
-rw-r--r--source/hsb/helpcontent2/source/text/shared/guide.po206
-rw-r--r--source/hsb/helpcontent2/source/text/swriter/guide.po10
-rw-r--r--source/sv/helpcontent2/source/text/shared/menu.po100
-rw-r--r--source/zh-CN/cui/messages.po14
23 files changed, 501 insertions, 501 deletions
diff --git a/source/ast/helpcontent2/source/text/scalc/01.po b/source/ast/helpcontent2/source/text/scalc/01.po
index c898bbf9355..cdfa0a8b7bf 100644
--- a/source/ast/helpcontent2/source/text/scalc/01.po
+++ b/source/ast/helpcontent2/source/text/scalc/01.po