summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unottabl.cxx
blob: 6233bccb9a0bf527da4f7508b144c78575aa8ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* -*- 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 <com/sun/star/awt/Gradient.hpp>
#include <svx/xflftrit.hxx>

#include <svx/svdmodel.hxx>
#include <svx/unofill.hxx>
#include <svx/unomid.hxx>
#include "UnoNameItemTable.hxx"

using namespace ::com::sun::star;
using namespace ::cppu;

namespace
{
class SvxUnoTransGradientTable : public SvxUnoNameItemTable
{
public:
    explicit SvxUnoTransGradientTable(SdrModel* pModel) noexcept;

    virtual NameOrIndex* createItem() const override;

    // XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;

    // XElementAccess
    virtual uno::Type SAL_CALL getElementType() override;
};
}

SvxUnoTransGradientTable::SvxUnoTransGradientTable(SdrModel* pModel) noexcept
    : SvxUnoNameItemTable(pModel, XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT)
{
}

OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName()
{
    return "SvxUnoTransGradientTable";
}

uno::Sequence<OUString> SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames()
{
    return { "com.sun.star.drawing.TransparencyGradientTable" };
}

NameOrIndex* SvxUnoTransGradientTable::createItem() const
{
    XFillFloatTransparenceItem* pNewItem = new XFillFloatTransparenceItem();
    pNewItem->SetEnabled(true);
    return pNewItem;
}

// XElementAccess
uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType()
{
    return cppu::UnoType<awt::Gradient>::get();
}

/**
 * Create a hatchtable
 */
uno::Reference<uno::XInterface> SvxUnoTransGradientTable_createInstance(SdrModel* pModel)
{
    return *new SvxUnoTransGradientTable(pModel);
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ledLibreOffice?h=cp-5.3-56&id=eb6bf90a87b50c60efb3df0f0659e7de3e250ba0'>Mmap in the ICU data file and pass it to udata_setCommonData()Tor Lillqvist Now done in TiledLibreOffice's lo_initialize(), but should probably be done in common LO code instead. Change-Id: I398a703943d13c6d715e4c88ead2a629955fb7c9 2014-04-07Add somewhat ridiculous debug hacks for CoreGrahics drawing debugging on iOSTor Lillqvist When the environment variable DRAW_INCREMENTALLY_FROM is set to a number, we want TiledLibreOffice to loop, initially performing only that number of drawing operations in AquaSalGraphics, then wait for some seconds, and redraw. Next time perform one operation more. Repeat. Implemented in vcl by surrounding the entry and exit(s) of the drawing functions in AquaSalGraphics with macros. All this is active only for iOS and in a dbgutil build. 2014-04-04Use tile coordinates for the DRAW_ONLY_TILE functionalityTor Lillqvist CATiledLayer does not guarantee that tiles are drawn in the same order each time so using a "tile number" for DRAW_ONLY_TILE was not perfect. Use tile coordinates instead when wanting to restrict to showing just one tile. Change-Id: I23f4a3ecaf47cd3392d2d950bd279260b3a7b9f4 2014-03-31Bin a few since long commented-out linesTor Lillqvist Change-Id: I4087f8f51dd6e8066818a98797c1e575ecca3442 2014-03-31Add possibility to show tile numbers and render just one tileTor Lillqvist Useful for debugging. Also, make the tile border drawing optional. These three debugging features are governed by environment variales (set in Xcode before running with Alt+Product>Run...) DRAW_ONLY_TILE, DRAW_TILE_BORDERS and DRAW_TILE_NUMBERS. Change-Id: I81f952284676eafe5d204c819658e0225aabdb1c 2014-03-18Add simple document selector to TiledLibreOfficeTor Lillqvist Make it easier to handle several test docs. Until now you had to change the hardcoded document in the Xcode project and in the lo.mm source file and re-build. Now it is enough to upload a new test doc to the device using iTunes. If no test docs are present, use the good old bundled test1.odt. Change-Id: I3cbb9f74c17332ffc6ac90dd1e226fac005c3387 2014-03-18Enable one more level of zooming in, just for funTor Lillqvist Change-Id: I7181199363f93dd7da851674c7f593f509082475 2014-01-01Use native-code.py generated code also for iOS.Matúš Kukan This allows us to get rid of component-declarations.h and simplify component-mapping.h. For new, converted, implementation_getFactories, adding one line into native-code.py should be enough to make them available in application. Change-Id: I042320e5b7f8a9aa9f02b77d2bdd07cf9a690ee6 2013-12-20Don't need Base, Calc, Draw and Math functionality here for nowTor Lillqvist Change-Id: I20b9325f9c7eed1e49ea815c284f8fe1a6ed428d 2013-12-20Improve the tiles per second calculationTor Lillqvist Avoid an implicit upper limit on the value calculated (and displayed) by keeping a counter, too, for each slot in the array. Also edit a comment, as I now have a better understanding of how the tiling works. Change-Id: I5df4076917a244f73f27b66f4983f17ce95b9df7 2013-12-20Add tiles per second counter (averaged over last five seconds)Tor Lillqvist Change-Id: I11e282c1a72dbc6b41a5a89229065983b41eb65b 2013-12-19Further minor tweaks to TiledLibreOfficeTor Lillqvist Change-Id: If1c1bbaadf8866605bf1026c4a71da0a397391a4 2013-12-19Deduplicate more components.Matúš Kukan No one says this is the only good classification. Quite possibly it's not even a good one, but at least something. Change-Id: I81178314222f9f63708a83b262ff8ef73a1d9467 2013-12-19fix typoMatúš Kukan Change-Id: I52bbae367d1b4a76aa5507daa38582f7c97d794d 2013-12-19Deduplicate calc components.Matúš Kukan Hopefully it makes sense, I don't know. Inspired by Debian packages. Change-Id: I8caf2d4aa75b8f6de3cc7da9eb293955a4ed58d8 2013-12-19Deduplicate writer component factories.Matúš Kukan Change-Id: I0b82e8a284f871829b7c22a654d61534b5c5a3cc 2013-12-19Deduplicate a lot of common components.Matúš Kukan Change-Id: Ic3eb95119eed7a691c9cd0c677f28c87395b9415 2013-12-19Add .component <implementation constructor="..." featureStephan Bergmann ...to directly call constructor functions of ComponentContext-based C++ implementations of (non-single-instance) UNO services. The case where these calls would need to be bridged across different environments (e.g., from gcc3 to gcc3:affine) is not yet implemented. bootstrap.component and expwrap.component are adapted accordingly as a proof-of- concept (which had previously been adapted to use the prefix="direct" feature, which may become unnecessary again in the end, depending on how to handle single-instance services/singletons). More to follow. Change-Id: I18682d75bcd29d3d427e31331b4ce8161dbb846d 2013-12-19Adapt TiledLibreOffice to the new library name to component mapping APITor Lillqvist Change-Id: I96e2931763c277d72ff1bb7ebdf5b71c0d6e091b 2013-12-18Add a view-only iOS test app using tiled renderingTor Lillqvist I had to add some horrible hacks to make sure the test doc has been loaded into a Writer shell before retrieving its size and being able to render it. Obviously some better solution is needed. But this is just a testbed to get some profiling data. The app is built using an Xcode project, and in gbuild through a custom target based on the MobileLibreOffice one. Setting up the various files used (or not used...) at run-time should really be factored out from the CustomTarget files. Change-Id: I1711b0cae9d28a09b73476b2d37d98b1820c9943