summaryrefslogtreecommitdiff
path: root/xmloff/inc/XMLReplacementImageContext.hxx
blob: 1885d46a7fe00400b8345647ef8ab5cce62a34f7 (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
/* -*- 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 .
 */

#ifndef INCLUDED_XMLOFF_INC_XMLREPLACEMENTIMAGECONTEXT_HXX
#define INCLUDED_XMLOFF_INC_XMLREPLACEMENTIMAGECONTEXT_HXX

#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <xmloff/xmlictxt.hxx>


namespace com { namespace sun { namespace star {
    namespace beans { class XPropertySet; }
    namespace io { class XOutputStream; } } } }

class XMLReplacementImageContext : public SvXMLImportContext
{
    css::uno::Reference < css::io::XOutputStream > m_xBase64Stream;
    css::uno::Reference < css::beans::XPropertySet > m_xPropSet;

    OUString m_sHRef;

public:


    XMLReplacementImageContext( SvXMLImport& rImport,
            sal_uInt16 nPrfx,
            const OUString& rLName,
            const css::uno::Reference< css::xml::sax::XAttributeList > & rAttrList,
            const css::uno::Reference< css::beans::XPropertySet >& rPropSet );
    virtual ~XMLReplacementImageContext() override;

    virtual void EndElement() override;

    SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
                const OUString& rLocalName,
                const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;

};

#endif // INCLUDED_XMLOFF_INC_XMLREPLACEMENTIMAGECONTEXT_HXX

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/sc/source/core/data/dputil.cxx?id=c67b9a4ce5ac3a09437730d8440c84159b581622'>rather return ref from GetCalendarNoel Grandin since we never return a nullptr Change-Id: I4cb4af99752818e323472a372330d1bc2a3df4f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-09-17rather return ref from getLocaleDataPtrNoel Grandin since we never return a nullptr, and rename to reflect that Change-Id: I694b5198f663842d1362504d60e7191e450a08ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-08-13split SvNumberFormatter into it's own headerNoel Grandin so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-07-01Purge out rtl::math::setInfBaiXiaochun Change-Id: I71af8273c672a4cbcbfefafffd0003ab266dcce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118132 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2021-04-29loplugin:stringadd simplify some *StringBuffer operationsNoel Grandin pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-04-19use more string_view in comphelper::stringNoel Grandin Change-Id: I5d27824694e38de540e5f1fcd8704f8777f65140 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-01-29loplugin:stringviewparam extend to new..Noel O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-10-20use tools::Long in scNoel Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-09-03Make ImpSvNumberformatScan::GetColor constMike Kaganski Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins 2020-02-22ScGlobal - change direct access to a static ptr for a getterTomaž Vajngerl pLocalData and pCharClass static veriables on ScGlobal are always set from SvtSysLocale on init, probably for "faster" access. This can just be made simpler with access through a getter, so this introduces a getter for ScGlobal::getCharClassPtr and ScGlobal::getLocaleDataPtr, where the access is made directly to SvtSysLocale instance. In addition all the usages needed to be fixed, which is all over the calc module. Change-Id: Ie047b158094e25bbaa2aba15074d7998d9541787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89249 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): scStephan Bergmann Change-Id: I1bfd2bb623aac5ac457a0b719da64ab393ccd0ba Reviewed-on: https://gerrit.libreoffice.org/76654 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-11-08tdf#42949 Fix IWYU warnings in sc/source/core/data/*cxxGabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I3e3bf3160fe3627cd105d8b69ff165c0577d8c9b Reviewed-on: https://gerrit.libreoffice.org/62807 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2018-08-28Use tools::Time::GetClock() to obtain hour,minute,secondEike Rathke ... instead of rtl::math::approxFloor(fValue*DATE_TIME_FACTOR+0.5) seconds that most times works but sometimes not. Change-Id: Iaca69630461f2067622898fab35cda61d20172a9 Reviewed-on: https://gerrit.libreoffice.org/59719 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins 2018-05-11Replace ScGlobal::GetRscString with simple ScResId callsGabor Kelemen After the gettext migration there is no point to have two APIs for reading the same .mo file. This patch is for sc/source/core/data for easier review. Change-Id: Id26cf9c38c8ed76448f615b775423a3f5dbc5ef4 Reviewed-on: https://gerrit.libreoffice.org/54100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2018-01-12More loplugin:cstylecast: scStephan Bergmann auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I987ac3a6d062600a5e21c3462c70595dfaa51796 2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> 2017-12-15-Werror,-Wsign-compare (clang-cl)Stephan Bergmann Change-Id: Ia9cd493df71c520259c96a71f11237ee97937b32 Reviewed-on: https://gerrit.libreoffice.org/46515 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2017-12-07loplugin:constparamsNoel Grandin Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b Reviewed-on: https://gerrit.libreoffice.org/45959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-11-24consistently use sal_uInt32 for number formats in scNoel Grandin instead of a mix of short/sal_uLong/sal_uInt32 Change-Id: Ie5bd26e1a6f716c0c4e174a6d560827084b3f421 Reviewed-on: https://gerrit.libreoffice.org/45159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-10-23loplugin:includeform: scStephan Bergmann Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd 2017-07-21Eliminate Date::operator+=() and -=() and replace with Date::AddDays()Eike Rathke Clarifies code and gets rid of explicitly casting the operand to sal_Int32. Also in preparation of removing DateTime::operator+=(sal_Int32) that is confusingly similar to DateTime::operator+=(double) and just depends on type. Change-Id: I83422e2940fbb017978db9b5734b4966228af3de Reviewed-on: https://gerrit.libreoffice.org/40248 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> 2017-07-21migrate to boost::gettextCaolán McNamara * all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a 2017-07-19Change the most obvious Date+=(long)... to Date+=static_cast<sal_Int32>(...)Eike Rathke Simple search git grep -l 'Date.*[+-].*[(<] *long *[>)]' Since commit f5b0cc2a3690ba963b3f150886e1d5ddddee9530 Date: Sat Jul 1 16:01:15 2017 +0200 Date operators +,-,+=,-= have sal_Int32 operands instead of long. Change-Id: I2387cbceadcb056831225e4111353980d50a94d4 Reviewed-on: https://gerrit.libreoffice.org/40163 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> 2017-07-18Eliminate some unnecessary temporary Date instancesEike Rathke Change-Id: Idede71608458acf4d23504b3a6a1cba557f370d1 2017-07-18Change nonsense non-const Date* GetNullDate() to const Date&Eike Rathke * first, a non-const Date* may leave the impression that one could change the NullDate through the pointer, which is only partly successful; luckily no one did that * second, there is always a NullDate so checking for nullptr is superfluous * third, the pointer was dereferenced (maybe after a check) everywhere to obtain the NullDate, luckily.. Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95 2017-03-15introduce ScGeneralFunction scoped enumNoel Grandin to abstract over css::sheet::GeneralFunction and css::sheet::GeneralFunction2 Change-Id: I4d4df35a249bf66e12240a3b94948918f1f3ef8a Reviewed-on: https://gerrit.libreoffice.org/35168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-11-23[API Change]: Create new GeneralFunction2 for adding medianTamás Zolnai New functionality added to pivot table became fully broken with Eike's revertion: 50244309501d738e7314fa79785db139c826f8d7 This commit fixes this problem. Change-Id: I67cfc63305bb9b2edeed2abd26d729fbf650579f Reviewed-on: https://gerrit.libreoffice.org/31096 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> 2016-11-22[API Change] revert incompatible change of enum css::sheet::GeneralFunctionEike Rathke Quick solution before 5-3 branch off without reverting everything related. This will need a new constant value type for API instead of the enum and an internal mapping from/to the enum. Kept the GeneralFunction_MEDIAN at all places in uing code so it can be easily grep'ed for. Change-Id: I95256649f16ded08e467003d2924be0ff5efb87f 2016-11-20PivotMedian: Implement median as a new pivot table functionTamás Zolnai Change-Id: Ife90c8f1c36980254de3cec6e395a6ba94d99fea 2015-12-27sal_uLong/sal_uIntPtr for ScNumFormatAbbrevMatteo Casalin Change-Id: I45f2a43fe4295e44691ab00c93af3fca41b1dcfa 2015-10-28com::sun::star->css in scNoel Grandin Change-Id: I7774890f46f9343e944e34db27af8bce3b1d0915 2015-08-31loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann Change-Id: I4e350a0c6045d07677edae4f9921db0a42b4e0f5 2015-02-25remove NUMBERFORMAT_ constantsNoel Grandin .. in favour of just using the underlying constants from css::util::NumberFormat Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99 2015-01-14fdo#39468 Translate German Comments - replace '//!' with '//TODO:'Christian M. Heller It seems that most comments starting with '//!' were intended as FIXMEs. This replaces gerrit 12241. Conflicts: sc/source/core/tool/token.cxx sc/source/filter/excel/xlpivot.cxx Change-Id: I6ed06b32c70cc854a896dbbc386565e6fbfa9b28 Reviewed-on: https://gerrit.libreoffice.org/12361 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05