summaryrefslogtreecommitdiff
path: root/xmloff/source/style/opaquhdl.cxx
blob: c710d67c674e49215ecaf1c43376b8c6b57f0310 (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
/* -*- 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 "opaquhdl.hxx"
#include <com/sun/star/uno/Any.hxx>

#include <xmloff/xmltoken.hxx>
#include <xmloff/xmluconv.hxx>

using namespace ::com::sun::star::uno;
using namespace ::xmloff::token;


XMLOpaquePropHdl::~XMLOpaquePropHdl()
{
    // nothing to do
}

bool XMLOpaquePropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
{
    bool bValue = IsXMLToken( rStrImpValue, XML_FOREGROUND );
    rValue <<= bValue;

    return true;
}

bool XMLOpaquePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
{
    bool bRet = false;
    bool bValue;

    if (rValue >>= bValue)
    {
        if( bValue )
            rStrExpValue = GetXMLToken( XML_FOREGROUND );
        else
            rStrExpValue = GetXMLToken( XML_BACKGROUND );

        bRet = true;
    }

    return bRet;
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
472388fda8afc28d7b9f61056f45a741abfb732e'>loplugin:unusedfields in basctlNoel Grandin Change-Id: I565bd86167c93ece1d65ce8a3b148144f5a7107a 2015-11-20loplugin:unusedfields in basctlNoel Grandin and improve the plugin to search for only WARN_UNUSED and fundamental types Change-Id: Ic06207758e28d44d64d76d8119fd76b5b098bb05 2015-09-29Renamed wrongly prefixed boolean variablesStefan Heinemann Fixed tdf#94269 Change-Id: I63109cc4e095bad680d7637a065080ea368860ae Reviewed-on: https://gerrit.libreoffice.org/18851 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> 2015-09-14boost->stdCaolán McNamara Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2015-08-14loplugin: defaultparamsNoel Grandin Change-Id: I89796134a0cce33279ba7f02492857a656e8aee3 2015-05-15tdf#62475: partial handmade fixesAndrea Gelmini Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4 Reviewed-on: https://gerrit.libreoffice.org/15712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> 2015-04-16make CreateItemWindow return a VclPtr<>.Michael Meeks Change-Id: Id15ff8900376aaee4343d7ee08ae062e1c462ce4 2015-04-10vclwidget: only call dispose() onceNoel Grandin by using a new utility method in vcl::Window This means that we don't have to make all our dispose methods safe to call more than once. Change-Id: I2110c7de4a86c70fdc97dd8fd318c86b56865374 2015-04-09vcl: VclPtr conversion in basctlNoel Grandin Change-Id: Ieea1ab9426ed025d7d0f8baba8a6d10cb454e93e 2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann Change-Id: I0db5c02e9fbc09fe7d85e46f1434c86b5b5b4853 2015-02-16add GetSelectEntryData to ListBox and ComboBoxNoel Grandin to reduce code clutter like pLbSelect->GetEntryData(pLbSelect->GetSelectEntryPos()) since this is a fairly frequent operation. Change-Id: I41daf30fdeda2442ad1ac829e12f553233bae184 Reviewed-on: https://gerrit.libreoffice.org/14472 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> 2014-12-05Removed useless includes in basctl/source/basicide/ treeAndrea Gelmini It compiles on Windows and Linux, here, with flags: --with-help --with-java --with-lang="it" Made with the ignorant brute force of removing each include one by one. The tree with each commit (used to bisect) it's here: https://github.com/Gelma/core/commits/gr_push_brute_force_slot_2 Conflicts: basctl/source/basicide/bastype2.cxx Change-Id: If88eebb6ecba6ae7ab1e98713b66b10f1ad57dca Reviewed-on: https://gerrit.libreoffice.org/12963 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2014-12-01fdo#84938: replace EVENT_ constants with enumTobias Madl Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f Reviewed-on: https://gerrit.libreoffice.org/13134 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2014-10-23loplugin: cstylecastNoel Grandin Change-Id: I9134aff4f2e6bff43ebb78c605e0ff521eac6ffc 2014-10-11convert SFX_CALLMODE constants to SfxCallMode enum classNoel Grandin and fix a couple of bugs in SC and SW where the call mode was being passed to the hints parameter by accident Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58 Reviewed-on: https://gerrit.libreoffice.org/11916 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> 2014-09-23fdo#82577: Handle WindowNoel Grandin Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a 2014-09-12Turn SfxItemState into a C++11 scoped enumerationStephan Bergmann ...to gain further confidence in the claim "that none of the existing code tries to uses combinations of these enum values" (d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState") Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13 Reviewed-on: https://gerrit.libreoffice.org/11384 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> 2014-09-10Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULTStephan Bergmann Change-Id: I88eeac06413fc3935cbbdb357ff8bf9acaa383a8 2014-04-17no temporary instance of SvtLanguageTable necessary hereEike Rathke Change-Id: Iabb3aadf35eb6b3575d916f2400f606264572537