summaryrefslogtreecommitdiff
path: root/include/svx/unobrushitemhelper.hxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-06-02 15:00:50 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-01 13:30:09 +0200
commit7d9bb549d498d6beed2c4050c402d09643febdfa (patch)
tree2caf67e36c9ccd058268b003cf2bc39b9b102b53 /include/svx/unobrushitemhelper.hxx
parenta5e137eb1d37361c60175e8fba780fc46b377a23 (diff)
Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including Header and Footer) for direct attributes and style attributes (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b) Conflicts: cui/source/factory/dlgfact.cxx cui/source/factory/dlgfact.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cuires.hrc cui/source/tabpages/bbdlg.cxx cui/source/tabpages/bbdlg.src cui/source/tabpages/page.cxx cui/source/tabpages/tparea.cxx include/svx/pagectrl.hxx include/svx/svxdlg.hxx include/svx/svxids.hrc include/xmloff/PageMasterStyleMap.hxx include/xmloff/prstylei.hxx include/xmloff/txtprmap.hxx svx/Package_inc.mk svx/inc/svx/hdft.hxx svx/source/dialog/hdft.cxx svx/source/dialog/pagectrl.cxx svx/source/tbxctrls/tbxcolorupdate.cxx svx/source/unodraw/unobrushitemhelper.cxx sw/Library_sw.mk sw/inc/fillattributes.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/ndtxt.hxx sw/inc/node.hxx sw/inc/swunohelper.hxx sw/inc/unobrushitemhelper.hxx sw/inc/unoprnms.hxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/visiturl.cxx sw/source/core/docnode/node.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/rolbck.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/fillattributes.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/rolbck.cxx sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/chrdlg/paradlg.src sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/uibase/app/docst.cxx sw/source/uibase/app/docstyle.cxx sw/source/uibase/frmdlg/colex.cxx sw/source/uibase/shells/basesh.cxx sw/source/uibase/shells/textsh1.cxx sw/source/uibase/uiview/viewstat.cxx sw/source/uibase/utlui/uitool.cxx xmloff/inc/PageMasterImportContext.hxx xmloff/inc/xmloff/XMLShapeStyleContext.hxx xmloff/source/draw/XMLShapeStyleContext.cxx xmloff/source/draw/sdpropls.hxx xmloff/source/style/PageMasterExportPropMapper.cxx xmloff/source/style/PageMasterImportContext.cxx xmloff/source/style/PageMasterPropHdlFactory.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/style/prstylei.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx xmloff/source/text/txtstyli.cxx Conflicts: svx/source/dialog/hdft.cxx sw/source/core/doc/visiturl.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/unocore/unostyle.cxx Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a
Diffstat (limited to 'include/svx/unobrushitemhelper.hxx')
-rw-r--r--include/svx/unobrushitemhelper.hxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/svx/unobrushitemhelper.hxx b/include/svx/unobrushitemhelper.hxx
new file mode 100644
index 000000000000..eea95b60e6d6
--- /dev/null
+++ b/include/svx/unobrushitemhelper.hxx
@@ -0,0 +1,53 @@
+/* -*- 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 _UNOBRUSHITEMHELPER_HXX
+#define _UNOBRUSHITEMHELPER_HXX
+
+#include "svx/svxdllapi.h"
+#include <editeng/brushitem.hxx>
+
+//UUUU Helper function definintions for UNO API fallbacks to replace SvxBrushItem. The
+// idea is to have fallbacks to create a SvxBrushItem if needed for backwards compatibility
+// if needed from the SfxItemSet and vice versa. This is used in cases where e.g. UNO API
+// accesses to slots in the SvxBrushItem are used (see cases in SvxBrushItem::QueryValue
+// and SvxBrushItem::PutValue as MID_BACK_COLOR and similar).
+// To make this work, a cycle of creating a SvxBrushItem from a SfxItemSet, changing a value
+// using PutValue, putting back to the SfxItemSet should create the *same* SvxBrushItem
+// the next time this will be created using getSvxBrushItemFromSourceSet. For more details,
+// see comments at the implementations of that two methods.
+
+// Set the equivalent in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST] in the given
+// SfxItemSet to create the same FillStyle as is expressed by the given SvxBrushItem.
+// This method will reset all items in the XATTR_FILL_* range first.
+SVX_DLLPUBLIC void setSvxBrushItemAsFillAttributesToTargetSet(
+ const SvxBrushItem& rBrush,
+ SfxItemSet& rToSet);
+
+// Create a SvxBrushItem as close as possible to the settings in the DrawingLayer
+// items in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. Since this is not 100%
+// representable this may lead to reduced data. With nBackgroundID a Which-ID for the
+// to-be-created SvxBrushItem has to be given (default should be 99 as in RES_BACKGROUND).
+SVX_DLLPUBLIC SvxBrushItem getSvxBrushItemFromSourceSet(
+ const SfxItemSet& rSourceSet,
+ sal_uInt16 nBackgroundID,
+ bool bSearchInParents = true);
+
+#endif // _UNOBRUSHITEMHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */