/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * 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 Color OutputDevice::GetBackgroundColor() const { return GetBackground().GetColor(); } void OutputDevice::SetBackground() { maBackground = Wallpaper(); mbBackground = false; if( mpAlphaVDev ) mpAlphaVDev->SetBackground(); } void OutputDevice::SetBackground( const Wallpaper& rBackground ) { maBackground = rBackground; if( rBackground.GetStyle() == WallpaperStyle::NONE ) mbBackground = false; else mbBackground = true; if( !mpAlphaVDev ) return; // Some of these are probably wrong (e.g. if the gradient has transparency), // but hopefully nobody uses that. If you do, feel free to implement it properly. if( rBackground.GetStyle() == WallpaperStyle::NONE ) { mpAlphaVDev->SetBackground( rBackground ); } else if( rBackground.IsBitmap()) { BitmapEx bitmap = rBackground.GetBitmap(); if( bitmap.IsAlpha()) mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( bitmap.GetAlphaMask().GetBitmap() ) ) ); else mpAlphaVDev->SetBackground( Wallpaper( COL_ALPHA_OPAQUE )); } else if( rBackground.IsGradient()) { mpAlphaVDev->SetBackground( Wallpaper( COL_ALPHA_OPAQUE )); } else { // Color background. int alpha = rBackground.GetColor().GetAlpha(); mpAlphaVDev->SetBackground( Wallpaper( Color( alpha, alpha, alpha ))); } } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ .05 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/schema
AgeCommit message (Expand)Author
2024-01-11tdf#105844 add test for ODF wholesome encryption with macro signatureMichael Stahl
2023-11-28sw floattable, per-frame wrap-on-all-pages mode: add ODT filterMiklos Vajna
2023-11-14sw floattable: link ODF proposalMiklos Vajna
2023-11-01tdf#156449 Preserve '0' or '?' in exponentLaurent Balland
2023-11-01tdf#153993 Extend ODF: lowercase for exponent charLaurent Balland
2023-10-30Enable STYLEREF flag export/import with ODFSkyler Grey
2023-10-29tdf#157663 SW: Tracked change improve moveAttila Szűcs
2023-10-20tdf#86790: Add support for a word-style stylerefSkyler Grey
2023-10-01tdf#154449 Add support for hidden named rangesRafael Lima
2023-09-12Added parent / child relationship to comments.Gökay Şatır
2023-08-25tdf#152724 Extend ODF for blank width "_x"Laurent Balland
2023-08-25xmloff: support stroke/line complex color import/export + testTomaž Vajngerl
2023-08-02sc: theme color support for sparklines + ODF & OOXML import/exportTomaž Vajngerl
2023-08-01sc: Add import/export ODF support for border complex colorsTomaž Vajngerl
2023-07-18sc: ODF import/export of background cell complex colorTomaž Vajngerl
2023-07-11tdf#150408: Implement "Legal" numbering (all levels using Arabic numbers)Mike Kaganski
2023-07-06xmloff: ODF export: stop producing decorative on draw:frame etc.Michael Stahl
2023-06-27related tdf#153993 Embedded text in scientific numbersLaurent Balland
2023-05-27xmloff: add color-type attribute to complex colorTomaž Vajngerl
2023-05-25xmloff: rename theme color names and color-table to theme-colorsTomaž Vajngerl
2023-05-25xmloff: rename *-color-theme-reference to *-complex-colorTomaž Vajngerl
2023-05-22tdf#155271 add drawooo:display to libreoffice-schemaRegina Henschel
2023-05-11tdf#155238: Reimplement how ListAutoFormat is stored to ODFMike Kaganski
2023-05-11tdf#150673 sw xmloff: import/export tracked table columnLászló Németh
2023-05-05Reworked bibliography mark link target to have user-selectable typeVojtěch Doležal
2023-05-04WIP ODF import and export for MCGRRegina Henschel
2023-04-27sc: pivot table compact layoutDennis Francis