summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-03 16:10:40 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-04 16:45:02 +0000
commitdc17dad5fd7509f191718df8690e5847ab87669a (patch)
tree427c7467fe367ae48a126ae7677e33db09b9accc
parent3372b1e0b36f3f7e89e88bb7495efad78fdd3417 (diff)
fdo#78908 Revert "Merge back branch alg_writerframes to trunk"
This reverts commit 6e61ecd09679a66060f932835622821d39e92f01. Better not to have this on libreoffice-4-3 without 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: #i124638# Second step of DrawingLayer FillAttributes..., 2014-06-02). Conflicts: cui/source/inc/backgrnd.hxx cui/source/inc/cuitabarea.hxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/tparea.cxx include/basegfx/numeric/ftools.hxx include/svx/svxids.hrc include/svx/unoshprp.hxx sc/source/ui/drawfunc/drawsh.cxx sd/source/ui/func/fuarea.cxx sfx2/source/dialog/tabdlg.cxx sw/inc/fillattributes.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/swatrset.hxx sw/inc/unobrushitemhelper.hxx sw/qa/extras/rtfexport/rtfexport.cxx sw/source/core/attr/format.cxx sw/source/core/attr/swatrset.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/layout/fillattributes.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/uibase/shells/frmsh.cxx sw/source/core/unocore/unobrushitemhelper.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unostyle.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprhdl.cxx Also: Revert "cppcheck: Prefer prefix ++/-- operators for non-primitive types" This reverts commit 80ec4885e97b3fcb34b93e71ced52a4aab43ce93. Revert "WaE: implicit conversion of literal of type 'sal_Bool' to 'bool'" This reverts commit d5d10b03b1f3e4bf784ad35254cb55d719a8c1b3. Revert "i#124638 support for DrawingLayre FillStyle for GraphicFrames and ..." This reverts commit 4a0b5e569d070c286daefb0fdfe45c0dd15d241c. Revert "svx: fix SID_OFFER_IMPORT and SID_ATTR_CHAR_GRABBAG having the same SID" This reverts commit b66d87086804460c1986df1b832fd6b2ea075a90. Revert "SwXStyle::getPropertyValue: don't try to read a float into a sal_Int32" This reverts commit 1e3c7b854baac2502bed72ff8e3e1b21b507735b. Revert "SwXTextFrame: also restore semi-lost BackColorTransparency property" This reverts commit 102bb87ca1a5dee3a09442bf503a54bb703c79ea. Revert "SwXTextFrame: restore semi-lost BackColor property" This reverts commit 5ce92b73ce06c805c66e53c48aa2c70c722aaf60. Revert "DocxAttributeOutput: port to FillAttributes" This reverts commit ec221b7339f8fe5520926ef85b450daa94392780. Revert "MSWordExportBase::OutputItemSet: handle fill attributes as frame ones" This reverts commit 84c40768f8acb0342dcfa223133497f57620fc14. Revert "sw: put getSvx* and setSvx* to a namespace, now that these are public" This reverts commit ebf960960a69c1edb5da1994c330ddddbecac44d. Revert "sw: fix DOC/DOCX/RTF export of TextFrame background color" This reverts commit c7837b8caad61b8c0dfd3704a133cdeaffd69b06. Revert "sw: still use SvxBrushItem for page style background" This reverts commit e826950e9d7736a6e3f9042755ba1b528f58a505. Revert "cui: unused code in SvxAreaTabPage::ClickBitmapHdl_Impl" This reverts commit 2032e9f5d7683e49b8753d7c7362899c690005b6. Revert "cui: unused code in SvxAreaTabPage::ClickGradientHdl_Impl" This reverts commit f4fa202b31277276dc4f05046c82152c0830ef21. Revert "cui: unused code in SvxAreaTabPage::ClickColorHdl_Impl" This reverts commit 1478e89e08a54f02a137c74c0cde6ae75e80d9f3. Revert "cui: unused code in SvxAreaTabPage::ClickHatchingHdl_Impl()" This reverts commit e9c9f3f793a91525ac4fb74f8791ba74222515e4. Revert "svx: fix Writer's insert -> frame crash" This reverts commit 831b8751fc9f423fd4e459623e54801c0a020eb3. Revert "sw: adapt frame/templatedialog4.ui to FillAttributes" This reverts commit 55916fc50a5b2d6273bca8c9ef6253011cf4fdbc. Revert "-Werror,-Wunused-variable" This reverts commit d0542fe7251d9c6538331b22a4b5e2e294a92e97. Revert "loplugin:implicitboolconversion,literaltoboolconversion" This reverts commit 47862e75de51a4ac7476acff773b504fdc0d6e76. Revert "loplugin:saloverride" This reverts commit be89e8b8ac19c0feca8850ccaddd90205c63dbe5. Revert "loplugin:literaltoboolconversion" This reverts commit 355b31fe347479f63906e41300042ec5cb38837c. Revert "-Werror,-Wunused-private-field" This reverts commit df9d13dd2e754184a4c6e321b8910ee1bc0cafa1. Revert "-Werror,-Wunused-const-variable" This reverts commit d757a98001a65baf4066c2eda037a08ab1beda46. Revert "unused XFillStyleItem ctor" This reverts commit b735fe1d67e6ad7ad448e448f237dcabef1a1c38. Revert "unused XGradient::VclGradient" This reverts commit 5bbc90be755aae4b87125f9d748828d74efe645d. Revert "fix "transparency" of floating tables in docx import (fdo#77723)" This reverts commit 313b59d787357ef3da34e2833fefcf1143b09b5e. Change-Id: If855b090f94288d384f8733f88ef1172e68c50a6 Reviewed-on: https://gerrit.libreoffice.org/10077 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--basegfx/Library_basegfx.mk1
-rw-r--r--basegfx/source/numeric/ftools.cxx49
-rw-r--r--chart2/source/controller/main/ShapeController.cxx3
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx2
-rw-r--r--cui/source/inc/backgrnd.hxx16
-rw-r--r--cui/source/inc/cuires.hrc1
-rw-r--r--cui/source/inc/cuitabarea.hxx29
-rw-r--r--cui/source/tabpages/backgrnd.cxx177
-rw-r--r--cui/source/tabpages/strings.src4
-rw-r--r--cui/source/tabpages/tabarea.cxx13
-rw-r--r--cui/source/tabpages/tparea.cxx250
-rw-r--r--cui/uiconfig/ui/areatabpage.ui13
-rw-r--r--drawinglayer/source/attribute/sdrfillgraphicattribute.cxx17
-rw-r--r--drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx117
-rw-r--r--drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx48
-rw-r--r--drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx118
-rw-r--r--drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx21
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx65
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx2
-rw-r--r--drawinglayer/source/processor3d/defaultprocessor3d.cxx63
-rw-r--r--drawinglayer/source/texture/texture.cxx230
-rw-r--r--drawinglayer/source/texture/texture3d.cxx18
-rw-r--r--editeng/source/items/frmitems.cxx18
-rw-r--r--include/basegfx/numeric/ftools.hxx10
-rw-r--r--include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx25
-rw-r--r--include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx20
-rw-r--r--include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx33
-rw-r--r--include/drawinglayer/texture/texture.hxx52
-rw-r--r--include/editeng/brushitem.hxx5
-rw-r--r--include/editeng/unoprnms.hxx7
-rw-r--r--include/svx/sdr/primitive2d/sdrattributecreator.hxx4
-rw-r--r--include/svx/sdr/primitive2d/sdrdecompositiontools.hxx21
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--include/svx/svxids.hrc68
-rw-r--r--include/svx/unoshprp.hxx26
-rw-r--r--include/svx/xfillit0.hxx1
-rw-r--r--include/svx/xgrad.hxx1
-rw-r--r--include/xmloff/XMLShapeStyleContext.hxx2
-rw-r--r--include/xmloff/txtprmap.hxx8
-rw-r--r--include/xmloff/xmltypes.hxx10
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu4
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx2
-rw-r--r--sd/source/ui/func/fuarea.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx16
-rw-r--r--svl/source/undo/undo.cxx4
-rw-r--r--svx/source/dialog/dlgctrl.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx1
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpage.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx17
-rw-r--r--svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx1
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx63
-rw-r--r--svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx24
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx13
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx8
-rw-r--r--svx/source/sdr/primitive2d/sdrole2primitive2d.cxx14
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx12
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx12
-rw-r--r--svx/source/svdraw/svddrgmt.cxx1
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx6
-rw-r--r--svx/source/xoutdev/xattr.cxx21
-rw-r--r--sw/Library_sw.mk2
-rw-r--r--sw/inc/doc.hxx7
-rw-r--r--sw/inc/fillattributes.hxx70
-rw-r--r--sw/inc/format.hxx38
-rw-r--r--sw/inc/frmatr.hxx8
-rw-r--r--sw/inc/frmfmt.hxx32
-rw-r--r--sw/inc/hintids.hxx18
-rw-r--r--sw/inc/swatrset.hxx8
-rw-r--r--sw/inc/unobrushitemhelper.hxx36
-rw-r--r--sw/inc/unoframe.hxx5
-rw-r--r--sw/inc/unomap.hxx8
-rw-r--r--sw/inc/unoprnms.hxx31
-rw-r--r--sw/sdi/_frmsh.sdi95
-rw-r--r--sw/source/core/access/accpara.cxx8
-rw-r--r--sw/source/core/attr/format.cxx193
-rw-r--r--sw/source/core/attr/swatrset.cxx87
-rw-r--r--sw/source/core/bastyp/init.cxx12
-rw-r--r--sw/source/core/doc/docdraw.cxx74
-rw-r--r--sw/source/core/doc/docfly.cxx71
-rw-r--r--sw/source/core/doc/notxtfrm.cxx21
-rw-r--r--sw/source/core/doc/poolfmt.cxx4
-rw-r--r--sw/source/core/draw/dflyobj.cxx1
-rw-r--r--sw/source/core/inc/dflyobj.hxx1
-rw-r--r--sw/source/core/inc/frame.hxx14
-rw-r--r--sw/source/core/inc/frmtool.hxx15
-rw-r--r--sw/source/core/layout/atrfrm.cxx127
-rw-r--r--sw/source/core/layout/fillattributes.cxx141
-rw-r--r--sw/source/core/layout/paintfrm.cxx632
-rw-r--r--sw/source/core/layout/wsfrm.cxx8
-rw-r--r--sw/source/core/text/inftxt.cxx20
-rw-r--r--sw/source/core/text/porfld.cxx4
-rw-r--r--sw/source/core/text/txtfly.cxx14
-rw-r--r--sw/source/core/txtnode/fntcache.cxx7
-rw-r--r--sw/source/core/uibase/app/docst.cxx27
-rw-r--r--sw/source/core/uibase/app/docstyle.cxx70
-rw-r--r--sw/source/core/uibase/frmdlg/frmmgr.cxx5
-rw-r--r--sw/source/core/uibase/inc/frmdlg.hxx4
-rw-r--r--sw/source/core/uibase/inc/frmsh.hxx8
-rw-r--r--sw/source/core/uibase/inc/tmpdlg.hxx2
-rw-r--r--sw/source/core/uibase/shells/basesh.cxx89
-rw-r--r--sw/source/core/uibase/shells/drawdlg.cxx2
-rw-r--r--sw/source/core/uibase/shells/frmsh.cxx209
-rw-r--r--sw/source/core/uibase/shells/grfsh.cxx57
-rw-r--r--sw/source/core/unocore/unobrushitemhelper.cxx327
-rw-r--r--sw/source/core/unocore/unoframe.cxx848
-rw-r--r--sw/source/core/unocore/unomap.cxx94
-rw-r--r--sw/source/core/unocore/unostyle.cxx395
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx32
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx40
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx67
-rw-r--r--sw/uiconfig/swriter/ui/framedialog.ui22
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog4.ui24
-rw-r--r--vcl/source/gdi/impgraph.cxx22
-rw-r--r--writerfilter/source/dmapper/TablePositionHandler.cxx4
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx81
-rw-r--r--xmloff/source/draw/sdpropls.cxx6
-rw-r--r--xmloff/source/text/txtexppr.cxx38
-rw-r--r--xmloff/source/text/txtprhdl.cxx49
-rw-r--r--xmloff/source/text/txtprmap.cxx29
125 files changed, 1327 insertions, 4849 deletions
diff --git a/basegfx/Library_basegfx.mk b/basegfx/Library_basegfx.mk
index ac5878a9715a..134001b26931 100644
--- a/basegfx/Library_basegfx.mk
+++ b/basegfx/Library_basegfx.mk
@@ -39,7 +39,6 @@ $(eval $(call gb_Library_add_exception_objects,basegfx,\
basegfx/source/matrix/b2dhommatrix \
basegfx/source/matrix/b2dhommatrixtools \
basegfx/source/matrix/b3dhommatrix \
- basegfx/source/numeric/ftools \
basegfx/source/pixel/bpixel \
basegfx/source/point/b2dpoint \
basegfx/source/point/b2ipoint \
diff --git a/basegfx/source/numeric/ftools.cxx b/basegfx/source/numeric/ftools.cxx
deleted file mode 100644
index a67bc56bd74e..000000000000
--- a/basegfx/source/numeric/ftools.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- 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 <basegfx/numeric/ftools.hxx>
-#include <algorithm>
-
-namespace basegfx
-{
- double snapToNearestMultiple(double v, const double fStep)
- {
- if(fTools::equalZero(fStep))
- {
- // with a zero step, all snaps to 0.0
- return 0.0;
- }
- else
- {
- const double fHalfStep(fStep * 0.5);
- const double fChange(fHalfStep - fmod(v + fHalfStep, fStep));
-
- if(basegfx::fTools::equal(fabs(v), fabs(fChange)))
- {
- return 0.0;
- }
- else
- {
- return v + fChange;
- }
- }
- }
-} // end of namespace basegfx
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index dea277159f20..fe70d66612fd 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -307,7 +307,8 @@ void ShapeController::executeDispatch_FormatArea()
if ( pFact )
{
::boost::scoped_ptr< AbstractSvxAreaTabDialog > pDlg(
- pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(), true ) );
+ pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
+ pDrawViewWrapper ) );
if ( pDlg.get() )
{
SfxItemPool& rItemPool = pDrawViewWrapper->GetModel()->GetItemPool();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 01490ba0fc82..2c34cb8e2e04 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1515,9 +1515,9 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMos
AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( Window* pParent,
const SfxItemSet* pAttr,
SdrModel* pModel,
- bool bShadow)
+ const SdrView* pSdrView )
{
- SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( pParent, pAttr, pModel, bShadow );
+ SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( pParent, pAttr, pModel,pSdrView );
return new AbstractSvxAreaTabDialog_Impl( pDlg );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1cf6b4c43f95..feaad78c1625 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -660,7 +660,7 @@ public:
virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( Window* pParent,
const SfxItemSet* pAttr,
SdrModel* pModel,
- bool bShadow ) SAL_OVERRIDE;
+ const SdrView* pSdrView = NULL ) SAL_OVERRIDE;
virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr,
SdrModel* pModel,
const SdrObject* pObj = NULL,
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 709e4ea3ebd6..be1183f056eb 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -32,6 +32,8 @@ struct SvxBackgroundTable_Impl;
struct SvxBackgroundPara_Impl;
struct SvxBackgroundPage_Impl;
class SvxBrushItem;
+class XFillStyleItem;
+class XFillGradientItem;
/** class SvxBackgroundTabPage --------------------------------------------
@@ -85,6 +87,17 @@ private:
MetricField* m_pColTransMF;
CheckBox* m_pBtnPreview;
+ // Gradient controls
+ VclFrame* m_pBackGroundGradientFrame;
+ GradientLB* m_pLbGradients;
+ SvxXRectPreview* m_pCtlPreview;
+
+ // Gradient data
+ XGradientListRef m_pGradientList;
+ SfxItemPool* m_pXPool;
+ XFillAttrSetItem m_aXFillAttr;
+ SfxItemSet& m_rXFillSet;
+
// Background Bitmap ----------------------------------
VclContainer* m_pBitmapContainer;
VclContainer* m_pFileFrame;
@@ -128,6 +141,8 @@ private:
void HideColorUI_Impl();
void ShowBitmapUI_Impl();
void HideBitmapUI_Impl();
+ void ShowGradientUI_Impl();
+ void HideGradientUI_Impl();
bool LoadLinkedGraphic_Impl();
void RaiseLoadError_Impl();
void SetGraphicPosition_Impl( SvxGraphicPosition ePos );
@@ -145,6 +160,7 @@ private:
DECL_LINK(BackgroundColorHdl_Impl, void *);
DECL_LINK( TblDestinationHdl_Impl, ListBox* );
DECL_LINK( ParaDestinationHdl_Impl, ListBox* );
+ DECL_LINK(ModifyGradientHdl_Impl, void *);
};
#endif // INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index e741b43e8110..a427883142f8 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -42,7 +42,6 @@
// used in "tabpages"
#define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142)
#define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143)
-#define RID_SVXSTR_READ_DATA_ERROR (RID_SVX_START + 230)
#define RID_SVXSTR_TABLE_PRESET_NONE (RID_SVX_START + 969)
#define RID_SVXSTR_TABLE_PRESET_ONLYOUTER (RID_SVX_START + 970)
#define RID_SVXSTR_TABLE_PRESET_OUTERHORI (RID_SVX_START + 971)
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 4358fc457a21..526759f6f491 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -75,7 +75,10 @@ protected:
void SavePalettes();
public:
- SvxAreaTabDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow );
+ SvxAreaTabDialog( Window* pParent,
+ const SfxItemSet* pAttr,
+ SdrModel* pModel,
+ const SdrView* pSdrView = NULL );
virtual ~SvxAreaTabDialog();
void SetNewColorList( XColorListRef pColTab )
@@ -111,8 +114,8 @@ class SvxTransparenceTabPage : public SvxTabPage
const SfxItemSet& rOutAttrs;
RECT_POINT eRP;
- sal_uInt16 nPageType;
- sal_uInt16 nDlgType;
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
// main selection
RadioButton* m_pRbtTransOff;
@@ -235,13 +238,6 @@ private:
XHatchListRef pHatchingList;
XBitmapListRef pBitmapList;
- // Placeholders for pointer-based entries; these will be inited
- // to point to these so that the page is usable without that
- // SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd).
- // Without that the pages used in SvxAreaTabDialog are not usable
- ChangeType maFixed_ChangeType;
- bool maFixed_sal_Bool;
-
ChangeType* pnColorListState;
ChangeType* pnBitmapListState;
ChangeType* pnGradientListState;
@@ -260,13 +256,6 @@ private:
SfxMapUnit ePoolUnit;
FieldUnit eFUnit;
- //UUUU
- bool mbOfferImportButton;
- bool mbDirectGraphicSet;
- Graphic maDirectGraphic;
- OUString maDirectName;
- PushButton* m_pBtnImport;
-
DECL_LINK(SelectDialogTypeHdl_Impl, void *);
DECL_LINK( ModifyColorHdl_Impl, void * );
DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * );
@@ -275,10 +264,6 @@ private:
DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * );
DECL_LINK( ModifyBitmapHdl_Impl, void * );
DECL_LINK( ModifyStepCountHdl_Impl, void * );
-
- //UUUU
- DECL_LINK( ClickImportHdl_Impl, void * );
-
DECL_LINK( ModifyTileHdl_Impl, void * );
DECL_LINK( ClickScaleHdl_Impl, void * );
void ClickInvisibleHdl_Impl();
@@ -288,7 +273,7 @@ private:
void ClickBitmapHdl_Impl();
public:
- SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs );
+ SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs );
void Construct();
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 374f79dc19b2..4d58aef77db8 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -51,6 +51,8 @@
#include <sfx2/htmlmode.hxx>
#include <svtools/controldims.hrc>
#include <svx/flagsdef.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xflgrit.hxx>
#include <svl/intitem.hxx>
#include <sfx2/request.hxx>
#include <svtools/grfmgr.hxx>
@@ -350,6 +352,9 @@ void BackgroundPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt )
SvxBackgroundTabPage::SvxBackgroundTabPage(Window* pParent, const SfxItemSet& rCoreSet)
: SvxTabPage(pParent, "BackgroundPage", "cui/ui/backgroundpage.ui", rCoreSet)
+ , m_pXPool(rCoreSet.GetPool())
+ , m_aXFillAttr(m_pXPool)
+ , m_rXFillSet(m_aXFillAttr.GetItemSet())
, nHtmlMode(0)
, bAllowShowSelector(true)
, bIsGraphicValid(false)
@@ -376,6 +381,17 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(Window* pParent, const SfxItemSet& rC
get(m_pColTransMF, "transparencymf");
get(m_pBtnPreview, "showpreview");
+ // Initialize gradient controls
+ get(m_pBackGroundGradientFrame, "backgroundgradientframe");
+ get(m_pLbGradients, "gradientslb");
+ Size aSize = getDrawListBoxOptimalSize(this);
+ m_pLbGradients->set_width_request(aSize.Width());
+ m_pLbGradients->set_height_request(aSize.Height());
+ get(m_pCtlPreview, "previewctl");
+ aSize = getDrawPreviewOptimalSize(this);
+ m_pCtlPreview->set_width_request(aSize.Width());
+ m_pCtlPreview->set_height_request(aSize.Height());
+
get(m_pBitmapContainer, "graphicgrid");
get(m_pFileFrame, "fileframe");
get(m_pBtnBrowse, "browse");
@@ -774,6 +790,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld;
SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos();
const bool bIsBrush = ( XFILL_SOLID == lcl_getFillStyle(m_pLbSelect) );
+ const bool bIsGradient = ( XFILL_GRADIENT == lcl_getFillStyle(m_pLbSelect) );
// transparency has to be set if enabled, the color not already set to "No fill" and
if( bColTransparency &&
@@ -781,22 +798,37 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
aBgdColor.SetTransparency(lcl_PercentToTransparency(static_cast<long>(m_pColTransMF->GetValue())));
}
- if ( ( (GPOS_NONE == eOldPos) && bIsBrush )
- || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap changed?
+ if ( ( (GPOS_NONE == eOldPos) && (bIsBrush || bIsGradient) )
+ || ( (GPOS_NONE != eOldPos) && !(bIsBrush || bIsGradient) ) ) // Brush <-> Bitmap changed?
{
// background art hasn't been changed:
if ( (GPOS_NONE == eOldPos) || !m_pLbSelect->IsVisible() )
{
- // Brush-treatment:
- if ( rOldItem.GetColor() != aBgdColor ||
- (SFX_ITEM_AVAILABLE >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection()))
+ if (bIsBrush)
{
- bModified = true;
- rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
+ // Brush-treatment:
+ if ( rOldItem.GetColor() != aBgdColor ||
+ (SFX_ITEM_AVAILABLE >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection()))
+ {
+ bModified = true;
+ rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) )
+ rCoreSet.ClearItem( nWhich );
+ // Handle XFILL_GRADIENT -> XFILL_SOLID
+ XFillStyleItem aFillStyleItem(XFILL_SOLID, GetWhich(SID_SW_ATTR_FILL_STYLE));
+ rCoreSet.Put(aFillStyleItem);
+ }
+ else
+ {
+ XFillStyleItem aFillStyleItem(((const XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), GetWhich(SID_SW_ATTR_FILL_STYLE));
+ rCoreSet.Put(aFillStyleItem);
+
+ const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)m_rXFillSet.Get(XATTR_FILLGRADIENT);
+ XFillGradientItem aFillGradientItem(rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue(), GetWhich(SID_SW_ATTR_FILL_GRADIENT));
+ rCoreSet.Put(aFillGradientItem);
}
- else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) )
- rCoreSet.ClearItem( nWhich );
}
else
{
@@ -843,9 +875,19 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
}
else // Brush <-> Bitmap changed!
{
- if ( bIsBrush )
+ if (bIsBrush || bIsGradient)
{
rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
+ if (bIsGradient)
+ {
+ // Handle XFILL_BITMAP -> XFILL_GRADIENT
+ XFillStyleItem aFillStyleItem(((const XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), GetWhich(SID_SW_ATTR_FILL_STYLE));
+ rCoreSet.Put(aFillStyleItem);
+
+ const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)m_rXFillSet.Get(XATTR_FILLGRADIENT);
+ XFillGradientItem aFillGradientItem(rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue(), GetWhich(SID_SW_ATTR_FILL_GRADIENT));
+ rCoreSet.Put(aFillGradientItem);
+ }
}
else
{
@@ -874,7 +916,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
delete pTmpBrush;
}
}
- bModified = ( bIsBrush || m_pBtnLink->IsChecked() || bIsGraphicValid );
+ bModified = ( bIsBrush || bIsGradient || m_pBtnLink->IsChecked() || bIsGraphicValid );
}
}
else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) )
@@ -1090,6 +1132,7 @@ void SvxBackgroundTabPage::ShowSelector()
m_pBtnArea->SetClickHdl( HDL(RadioClickHdl_Impl) );
m_pBtnTile->SetClickHdl( HDL(RadioClickHdl_Impl) );
m_pBtnPosition->SetClickHdl( HDL(RadioClickHdl_Impl) );
+ m_pLbGradients->SetSelectHdl(HDL(ModifyGradientHdl_Impl));
// delayed loading via timer (because of UI-Update)
pPageImpl->pLoadTimer = new Timer;
@@ -1178,6 +1221,7 @@ void SvxBackgroundTabPage::ShowColorUI_Impl()
if (!m_pBackGroundColorFrame->IsVisible())
{
HideBitmapUI_Impl();
+ HideGradientUI_Impl();
m_pBackGroundColorFrame->Show();
if(bColTransparency)
@@ -1208,6 +1252,7 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl()
(m_pBackGroundColorFrame->IsVisible() || !m_pFileFrame->IsVisible()))
{
HideColorUI_Impl();
+ HideGradientUI_Impl();
m_pBitmapContainer->Show();
@@ -1236,6 +1281,36 @@ void SvxBackgroundTabPage::HideBitmapUI_Impl()
m_pGraphTransFrame->Hide();
}
+void SvxBackgroundTabPage::ShowGradientUI_Impl()
+{
+ if (!m_pBackGroundGradientFrame->IsVisible())
+ {
+ HideColorUI_Impl();
+ HideBitmapUI_Impl();
+
+ m_pBackGroundGradientFrame->Show();
+ if (!m_rXFillSet.HasItem(XATTR_FILLSTYLE) || ((const XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue() != XFILL_GRADIENT)
+ {
+ // Frame has no gradient? Then select the first one, just to be able to show something in the preview control.
+ m_pLbGradients->SelectEntryPos(0);
+ ModifyGradientHdl_Impl(this);
+ }
+ else
+ {
+ // It has one, try to select the matching entry in the gradient list box.
+ const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)m_rXFillSet.Get(XATTR_FILLGRADIENT);
+ m_pLbGradients->SelectEntryByList(m_pGradientList, rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue());
+ }
+ }
+}
+
+void SvxBackgroundTabPage::HideGradientUI_Impl()
+{
+ m_pBackGroundGradientFrame->Hide();
+}
+
+
+
void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos )
{
switch ( ePos )
@@ -1334,11 +1409,15 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl)
ShowColorUI_Impl();
m_pParaLBox->Enable(); // drawing background can't be a bitmap
}
- else
+ else if ( XFILL_BITMAP == lcl_getFillStyle(m_pLbSelect) )
{
ShowBitmapUI_Impl();
m_pParaLBox->Enable(false); // drawing background can't be a bitmap
}
+ else
+ {
+ ShowGradientUI_Impl();
+ }
return 0;
}
@@ -1411,6 +1490,23 @@ IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn )
return 0;
}
+IMPL_LINK_NOARG(SvxBackgroundTabPage, ModifyGradientHdl_Impl)
+{
+ sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
+
+ if (nPos != LISTBOX_ENTRY_NOTFOUND)
+ {
+ XGradientEntry* pEntry = m_pGradientList->GetGradient(nPos);
+ m_rXFillSet.Put( XFillStyleItem( XFILL_GRADIENT ) );
+ m_rXFillSet.Put( XFillGradientItem( pEntry->GetName(), pEntry->GetGradient() ) );
+ }
+ m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
+ m_pCtlPreview->Invalidate();
+ return 0;
+}
+
+
+
IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl)
/* [Description]
@@ -1714,25 +1810,36 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
if ( GPOS_NONE == ePos || !m_pLbSelect->IsVisible() )
{
- lcl_setFillStyle(m_pLbSelect, XFILL_SOLID);
- ShowColorUI_Impl();
- Color aTrColor( COL_TRANSPARENT );
- aBgdColor = rColor;
+ // We don't have a graphic, do we have gradient fill style?
+ if (!m_rXFillSet.HasItem(XATTR_FILLSTYLE) || ((const XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue() != XFILL_GRADIENT)
+ {
+ lcl_setFillStyle(m_pLbSelect, XFILL_SOLID);
+ ShowColorUI_Impl();
+ Color aTrColor( COL_TRANSPARENT );
+ aBgdColor = rColor;
- sal_uInt16 nCol = ( aTrColor != aBgdColor ) ?
- GetItemId_Impl(*m_pBackgroundColorSet, aBgdColor) : 0;
+ sal_uInt16 nCol = ( aTrColor != aBgdColor ) ?
+ GetItemId_Impl(*m_pBackgroundColorSet, aBgdColor) : 0;
- if( aTrColor != aBgdColor && nCol == 0)
- {
- m_pBackgroundColorSet->SetNoSelection();
+ if( aTrColor != aBgdColor && nCol == 0)
+ {
+ m_pBackgroundColorSet->SetNoSelection();
+ }
+ else
+ {
+ m_pBackgroundColorSet->SelectItem( nCol );
+ }
+
+ m_pPreviewWin1->NotifyChange( aBgdColor );
}
else
{
- m_pBackgroundColorSet->SelectItem( nCol );
+ // Gradient fill style, then initialize preview with data from Writer.
+ lcl_setFillStyle(m_pLbSelect, XFILL_GRADIENT);
+ ShowGradientUI_Impl();
+ m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
+ m_pCtlPreview->Invalidate();
}
-
- m_pPreviewWin1->NotifyChange( aBgdColor );
-
if ( m_pLbSelect->IsVisible() ) // initialize graphic part
{
aBgdGraphicFilter = "";
@@ -1835,6 +1942,7 @@ void SvxBackgroundTabPage::EnableTransparency(bool bColor, bool bGraphic)
void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet)
{
SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false);
+ SFX_ITEMSET_ARG (&aSet,pGradientListItem,SvxGradientListItem,SID_GRADIENT_LIST,false);
if (pFlagItem)
{
@@ -1848,6 +1956,25 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet)
if ( ( nFlags & SVX_ENABLE_TRANSPARENCY ) == SVX_ENABLE_TRANSPARENCY )
EnableTransparency(true, true);
}
+
+ if (pGradientListItem)
+ {
+ // If we get a gradient list, also read fill and gradient style.
+ m_pGradientList = pGradientListItem->GetGradientList();
+ m_pLbGradients->Fill(m_pGradientList);
+ const XFillStyleItem& rFillStyleItem = (const XFillStyleItem&)aSet.Get(SID_SW_ATTR_FILL_STYLE);
+ m_rXFillSet.Put(XFillStyleItem(rFillStyleItem.GetValue()));
+ const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)aSet.Get(SID_SW_ATTR_FILL_GRADIENT);
+ m_rXFillSet.Put(XFillGradientItem(rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue()));
+ }
+ else
+ // Otherwise hide the gradient UI.
+ for (int i = 0; i < m_pLbSelect->GetEntryCount(); ++i)
+ if ((XFillStyle)(sal_uLong)m_pLbSelect->GetEntryData(i) == XFILL_GRADIENT)
+ {
+ m_pLbSelect->RemoveEntry(i);
+ break;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index 9de66cc0183f..7eefbe56c943 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -191,9 +191,5 @@ String RID_SVXSTR_DIMENSION_LINE
{
Text [en-US ] = "Dimension line";
};
-String RID_SVXSTR_READ_DATA_ERROR
-{
- Text [ en-US ] = "The file could not be loaded!" ;
-};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 3fcdbce92327..a27d32177fd2 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -40,7 +40,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
Window* pParent,
const SfxItemSet* pAttr,
SdrModel* pModel,
- bool bShadow
+ const SdrView* /* pSdrView */
)
: SfxTabDialog( pParent,
"AreaDialog",
@@ -74,16 +74,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
mbAreaTP( false )
{
m_nAreaTabPage = AddTabPage( "RID_SVXPAGE_AREA", SvxAreaTabPage::Create, 0 );
-
- if(bShadow)
- {
- m_nShadowTabPage = AddTabPage( "RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, 0 );
- }
- else
- {
- RemoveTabPage( "RID_SVXPAGE_SHADOW" );
- }
-
+ m_nShadowTabPage = AddTabPage( "RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, 0 );
m_nTransparenceTabPage = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", SvxTransparenceTabPage::Create, 0);
m_nColorTabPage = AddTabPage( "RID_SVXPAGE_COLOR", SvxColorTabPage::Create, 0 );
m_nGradientTabPage = AddTabPage( "RID_SVXPAGE_GRADIENT", SvxGradientTabPage::Create, 0 );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index eb0add42eb74..35db8ef9a85a 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -41,10 +41,6 @@
#include <sfx2/request.hxx>
#include "paragrph.hrc"
-//UUUU
-#include "sfx2/opengrf.hxx"
-#include <vcl/msgbox.hxx>
-
// static ----------------------------------------------------------------
static const sal_uInt16 pAreaRanges[] =
@@ -591,34 +587,20 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
pHatchingList( NULL ),
pBitmapList( NULL ),
- // local fixed not o be changed values for local pointers
- maFixed_ChangeType(CT_NONE),
- maFixed_sal_Bool(false),
-
- // init with pointers to fixed ChangeType
- pnColorListState(&maFixed_ChangeType),
- pnBitmapListState(&maFixed_ChangeType),
- pnGradientListState(&maFixed_ChangeType),
- pnHatchingListState(&maFixed_ChangeType),
+ pnColorListState( 0 ),
+ pnBitmapListState( 0 ),
+ pnGradientListState( 0 ),
+ pnHatchingListState( 0 ),
- nPageType(0),
- nDlgType(0),
- nPos(0),
+ nPageType( 0 ),
+ nDlgType( 0 ),
+ nPos( LISTBOX_ENTRY_NOTFOUND ),
- // init with pointer to fixed bool
- pbAreaTP(&maFixed_sal_Bool),
+ pbAreaTP( 0 ),
pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
aXFillAttr ( pXPool ),
- rXFSet ( aXFillAttr.GetItemSet() ),
-
- ePoolUnit(SFX_MAPUNIT_100TH_MM),
- eFUnit(FUNIT_NONE),
-
- //UUUU
- mbOfferImportButton(false),
- mbDirectGraphicSet(false),
- maDirectGraphic()
+ rXFSet ( aXFillAttr.GetItemSet() )
{
get(m_pTypeLB,"LB_AREA_TYPE");
get(m_pFillLB,"boxLB_FILL");
@@ -659,7 +641,6 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
get(m_pFlOffset,"FL_OFFSET");
get(m_pRbtRow,"RBT_ROW");
get(m_pRbtColumn,"RBT_COLUMN");
- get(m_pBtnImport, "btnimport");
get(m_pMtrFldOffset,"MTR_FLD_OFFSET");
get(m_pCtlXRectPreview,"CTL_COLOR_PREVIEW");
@@ -723,8 +704,6 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
m_pLbColor->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyColorHdl_Impl ) );
m_pLbHatchBckgrdColor->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl ) );
m_pCbxHatchBckgrd->SetToggleHdl( LINK( this, SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl ) );
- //UUUU
- m_pBtnImport->SetClickHdl(LINK(this, SvxAreaTabPage, ClickImportHdl_Impl));
m_pLbGradient->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyGradientHdl_Impl ) );
m_pLbHatching->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyHatchingHdl_Impl ) );
@@ -1122,44 +1101,33 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
break;
case XFILL_BITMAP:
{
- //UUUU
- if(mbDirectGraphicSet && GRAPHIC_NONE != maDirectGraphic.GetType())
- {
- const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic);
- rAttrs.Put(XFillStyleItem(XFILL_BITMAP));
- rAttrs.Put(aXBmpItem);
- bModified = true;
- }
- else
+ nPos = m_pLbBitmap->GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != m_pLbBitmap->GetSavedValue() )
{
- nPos = m_pLbBitmap->GetSelectEntryPos();
- if( nPos != LISTBOX_ENTRY_NOTFOUND &&
- m_pLbBitmap->IsValueChangedFromSaved() )
+ const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
+ const OUString aString(m_pLbBitmap->GetSelectEntry());
+ const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject());
+ pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
+ if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) )
{
- const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
- const OUString aString(m_pLbBitmap->GetSelectEntry());
- const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject());
- pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
- if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) )
- {
- rAttrs.Put( aFillBitmapItem );
- bModified = true;
- }
+ rAttrs.Put( aFillBitmapItem );
+ bModified = true;
}
- // NEW
- if( (eSavedStyle != eStyle) &&
- ( bModified ||
- SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true ) ) )
+ }
+ // NEW
+ if( (eSavedStyle != eStyle) &&
+ ( bModified ||
+ SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true ) ) )
+ {
+ XFillStyleItem aStyleItem( XFILL_BITMAP );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
{
- XFillStyleItem aStyleItem( XFILL_BITMAP );
- pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
- if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
- {
- rAttrs.Put( aStyleItem );
- bModified = true;
- }
+ rAttrs.Put( aStyleItem );
+ bModified = true;
}
- }
+ }
}
break;
}
@@ -1825,6 +1793,21 @@ void SvxAreaTabPage::ClickColorHdl_Impl()
// Controls for Hatch-Background
m_pFlHatchBckgrd->Hide();
+ // set table text
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
+ INetURLObject aURL( pColorList->GetPath() );
+
+ aURL.Append( pColorList->GetName() );
+ DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+
+ if( aURL.getBase().getLength() > 18 )
+ {
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
+ }
+ else
+ aString += aURL.getBase();
+
ModifyColorHdl_Impl( this );
}
@@ -1880,6 +1863,21 @@ void SvxAreaTabPage::ClickGradientHdl_Impl()
// Controls for Hatch-Background
m_pFlHatchBckgrd->Hide();
+ // set table text
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
+ INetURLObject aURL( pGradientList->GetPath() );
+
+ aURL.Append( pGradientList->GetName() );
+ DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+
+ if( aURL.getBase().getLength() > 18 )
+ {
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
+ }
+ else
+ aString += aURL.getBase();
+
ModifyGradientHdl_Impl( this );
ModifyStepCountHdl_Impl( m_pTsbStepCount );
}
@@ -1935,6 +1933,21 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl()
m_pCbxHatchBckgrd->Enable();
m_pLbHatchBckgrdColor->Enable();
+ // set table text
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
+ INetURLObject aURL( pHatchingList->GetPath() );
+
+ aURL.Append( pHatchingList->GetName() );
+ DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+
+ if( aURL.getBase().getLength() > 18 )
+ {
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
+ }
+ else
+ aString += aURL.getBase();
+
ModifyHatchingHdl_Impl( this );
ModifyHatchBckgrdColorHdl_Impl( this );
ToggleHatchBckgrdColorHdl_Impl( this );
@@ -2026,19 +2039,6 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
m_pLbColor->Hide();
m_pLbGradient->Hide();
m_pLbHatching->Hide();
-
- //UUUU
- if(mbOfferImportButton)
- {
- m_pBtnImport->Show();
- m_pBtnImport->Enable();
- }
- else
- {
- m_pBtnImport->Hide();
- m_pBtnImport->Disable();
- }
-
m_pLbBitmap->Enable();
m_pLbBitmap->Show();
m_pCtlBitmapPreview->Enable();
@@ -2061,6 +2061,21 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
m_pBxBitmap->Show();
+ // set table text
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
+ INetURLObject aURL( pBitmapList->GetPath() );
+
+ aURL.Append( pBitmapList->GetName() );
+ DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+
+ if( aURL.getBase().getLength() > 18 )
+ {
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
+ }
+ else
+ aString += aURL.getBase();
+
ModifyBitmapHdl_Impl( this );
ModifyTileHdl_Impl( m_pTsbOriginal );
}
@@ -2069,11 +2084,6 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyBitmapHdl_Impl)
{
- //UUUU
- mbDirectGraphicSet = false;
- maDirectGraphic.Clear();
- maDirectName = "";
-
const SfxPoolItem* pPoolItem = NULL;
sal_Int32 _nPos = m_pLbBitmap->GetSelectEntryPos();
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -2129,99 +2139,41 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
return( 0L );
}
-IMPL_LINK_NOARG( SvxAreaTabPage, ClickImportHdl_Impl )
-{
- ResMgr& rMgr = CUI_MGR();
- SvxOpenGraphicDialog aDlg("Import");
- aDlg.EnableLink(false);
-
- if(!aDlg.Execute())
- {
- EnterWait();
- const int nError(aDlg.GetGraphic(maDirectGraphic));
- LeaveWait();
-
- if(!nError && GRAPHIC_NONE != maDirectGraphic.GetType())
- {
- // extract name from filename
- const INetURLObject aURL(aDlg.GetPath());
- maDirectName = aURL.GetName().getToken( 0, '.' );
-
- // use loaded graphic
- const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic);
- rXFSet.Put(XFillStyleItem(XFILL_BITMAP));
- rXFSet.Put(aXBmpItem);
- // trigger state flag for directly loaded graphic
- mbDirectGraphicSet = true;
-
- // preview
- m_pCtlBitmapPreview->SetAttributes(aXFillAttr.GetItemSet());
- m_pCtlBitmapPreview->Invalidate();
- }
- else
- {
- // graphic could not be loaded
- ErrorBox(this, WB_OK, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr))).Execute();
- }
- }
-
- return 0L;
-}
-
-//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
{
TriState eState = m_pTsbTile->GetState();
if( eState == TRISTATE_TRUE )
{
- // tiled
- // disable stretched for tiled graphic
m_pTsbStretch->Disable();
m_pFlOffset->Enable();
- // allow positioning
m_pCtlPosition->Invalidate();
- // allow 'Position" title
m_pFlPosition->Enable();
- // allow size definitions
m_pFlSize->Enable();
}
else if( eState == TRISTATE_FALSE )
{
- // non-tiled
- // enable stretch selection
m_pTsbStretch->Enable();
- // no need for offsets, only position is supported in non-tiled
m_pFlOffset->Disable();
+ m_pCtlPosition->Invalidate();
+ m_pFlPosition->Disable();
+
if( m_pTsbStretch->GetState() != TRISTATE_FALSE )
{
- // non-tiled, stretched
- // no need for positioning
- m_pCtlPosition->Invalidate();
- // no need for 'Position" title, all deactivated
- m_pFlPosition->Disable();
- // no need for size definitions
m_pFlSize->Disable();
}
else
{
- // non-tiled, non-stretched
- // allow positioning
- m_pCtlPosition->Enable();
- m_pCtlPosition->Invalidate();
- // allow 'Position" title, positioning is active
- m_pFlPosition->Enable();
m_pFlSize->Enable();
}
}
else
{
- // disable all when tiling is undefined
m_pTsbStretch->Disable();
m_pFlOffset->Disable();
@@ -2383,8 +2335,6 @@ void SvxAreaTabPage::PageCreated(const SfxAllItemSet& aSet)
SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,false);
SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,false);
SFX_ITEMSET_ARG (&aSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,false);
- //UUUU
- SFX_ITEMSET_ARG (&aSet, pOfferImportItem, SfxBoolItem, SID_OFFER_IMPORT, false);
if (pColorListItem)
SetColorList(pColorListItem->GetColorList());
@@ -2400,18 +2350,6 @@ void SvxAreaTabPage::PageCreated(const SfxAllItemSet& aSet)
SetDlgType(pDlgTypeItem->GetValue());
if (pPosItem)
SetPos(pPosItem->GetValue());
-
- //UUUU
- if(pOfferImportItem)
- {
- const bool bNew(pOfferImportItem->GetValue());
-
- if(mbOfferImportButton != bNew)
- {
- mbOfferImportButton = bNew;
- }
- }
-
Construct();
}
diff --git a/cui/uiconfig/ui/areatabpage.ui b/cui/uiconfig/ui/areatabpage.ui
index 689778ee88c0..96f291279926 100644
--- a/cui/uiconfig/ui/areatabpage.ui
+++ b/cui/uiconfig/ui/areatabpage.ui
@@ -821,19 +821,6 @@
<property name="position">3</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="btnimport">
- <property name="label" translatable="yes">Import Graphic...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
index 2e7f05ed1dc9..669ee49a4d40 100644
--- a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
+++ b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
@@ -209,11 +209,11 @@ namespace drawinglayer
// get logical size of bitmap (before expanding eventually)
Graphic aGraphic(getFillGraphic());
- // init values with defaults for stretched
+ // init values with defaults
basegfx::B2DPoint aBitmapSize(1.0, 1.0);
basegfx::B2DVector aBitmapTopLeft(0.0, 0.0);
- //UUUU are changes needed? When streched we are already done, all other values will have no influence
+ // are changes needed?
if(getTiling() || !getStretch())
{
// init values with range sizes
@@ -258,33 +258,34 @@ namespace drawinglayer
aBitmapSize.setY(getGraphicLogicSize().getY());
}
+ // get values, force to centered if necessary
+ const basegfx::B2DVector aRectPoint(getTiling() ? getRectPoint() : basegfx::B2DVector(0.0, 0.0));
+
// position changes X
- if(0.0 == getRectPoint().getX())
+ if(0.0 == aRectPoint.getX())
{
aBitmapTopLeft.setX((fRangeWidth - aBitmapSize.getX()) * 0.5);
}
- else if(1.0 == getRectPoint().getX())
+ else if(1.0 == aRectPoint.getX())
{
aBitmapTopLeft.setX(fRangeWidth - aBitmapSize.getX());
}
- // offset positions are only meaningful when tiled
if(getTiling() && 0.0 != getOffsetPosition().getX())
{
aBitmapTopLeft.setX(aBitmapTopLeft.getX() + (aBitmapSize.getX() * (getOffsetPosition().getX() * 0.01)));
}
// position changes Y
- if(0.0 == getRectPoint().getY())
+ if(0.0 == aRectPoint.getY())
{
aBitmapTopLeft.setY((fRangeHeight - aBitmapSize.getY()) * 0.5);
}
- else if(1.0 == getRectPoint().getY())
+ else if(1.0 == aRectPoint.getY())
{
aBitmapTopLeft.setY(fRangeHeight - aBitmapSize.getY());
}
- // offset positions are only meaningful when tiled
if(getTiling() && 0.0 != getOffsetPosition().getY())
{
aBitmapTopLeft.setY(aBitmapTopLeft.getY() + (aBitmapSize.getY() * (getOffsetPosition().getY() * 0.01)));
diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index f5be906e6a2a..575c6b329305 100644
--- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
@@ -37,7 +37,7 @@ namespace drawinglayer
{
void FillGradientPrimitive2D::generateMatricesAndColors(
std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) const
+ basegfx::BColor& rOutmostColor) const
{
rEntries.clear();
@@ -68,83 +68,38 @@ namespace drawinglayer
{
case attribute::GRADIENTSTYLE_LINEAR:
{
- texture::GeoTexSvxGradientLinear aGradient(
- getDefinitionRange(),
- getOutputRange(),
- aStart,
- aEnd,
- nSteps,
- getFillGradient().getBorder(),
- getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
+ texture::GeoTexSvxGradientLinear aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
break;
}
case attribute::GRADIENTSTYLE_AXIAL:
{
- texture::GeoTexSvxGradientAxial aGradient(
- getDefinitionRange(),
- getOutputRange(),
- aStart,
- aEnd,
- nSteps,
- getFillGradient().getBorder(),
- getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
+ texture::GeoTexSvxGradientAxial aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
break;
}
case attribute::GRADIENTSTYLE_RADIAL:
{
- texture::GeoTexSvxGradientRadial aGradient(
- getDefinitionRange(),
- aStart,
- aEnd,
- nSteps,
- getFillGradient().getBorder(),
- getFillGradient().getOffsetX(),
- getFillGradient().getOffsetY());
- aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
+ texture::GeoTexSvxGradientRadial aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY());
+ aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
break;
}
case attribute::GRADIENTSTYLE_ELLIPTICAL:
{
- texture::GeoTexSvxGradientElliptical aGradient(
- getDefinitionRange(),
- aStart,
- aEnd,
- nSteps,
- getFillGradient().getBorder(),
- getFillGradient().getOffsetX(),
- getFillGradient().getOffsetY(),
- getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
+ texture::GeoTexSvxGradientElliptical aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY(), getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
break;
}
case attribute::GRADIENTSTYLE_SQUARE:
{
- texture::GeoTexSvxGradientSquare aGradient(
- getDefinitionRange(),
- aStart,
- aEnd,
- nSteps,
- getFillGradient().getBorder(),
- getFillGradient().getOffsetX(),
- getFillGradient().getOffsetY(),
- getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
+ texture::GeoTexSvxGradientSquare aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY(), getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
break;
}
case attribute::GRADIENTSTYLE_RECT:
{
- texture::GeoTexSvxGradientRect aGradient(
- getDefinitionRange(),
- aStart,
- aEnd,
- nSteps,
- getFillGradient().getBorder(),
- getFillGradient().getOffsetX(),
- getFillGradient().getOffsetY(),
- getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
+ texture::GeoTexSvxGradientRect aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY(), getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
break;
}
}
@@ -152,7 +107,7 @@ namespace drawinglayer
Primitive2DSequence FillGradientPrimitive2D::createOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- const basegfx::BColor& rOuterColor,
+ const basegfx::BColor& rOutmostColor,
const basegfx::B2DPolygon& rUnitPolygon) const
{
// prepare return value
@@ -161,9 +116,8 @@ namespace drawinglayer
// create solid fill with outmost color
aRetval[0] = Primitive2DReference(
new PolyPolygonColorPrimitive2D(
- basegfx::B2DPolyPolygon(
- basegfx::tools::createPolygonFromRect(getOutputRange())),
- rOuterColor));
+ basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(getObjectRange())),
+ rOutmostColor));
// create solid fill steps
for(sal_uInt32 a(0); a < rEntries.size(); a++)
@@ -185,14 +139,14 @@ namespace drawinglayer
Primitive2DSequence FillGradientPrimitive2D::createNonOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- const basegfx::BColor& rOuterColor,
+ const basegfx::BColor& rOutmostColor,
const basegfx::B2DPolygon& rUnitPolygon) const
{
// prepare return value
Primitive2DSequence aRetval(rEntries.size() + 1);
- // get outmost viusible range from object
- basegfx::B2DRange aOutmostRange(getOutputRange());
+ // get outmost range from object
+ basegfx::B2DRange aOutmostRange(getObjectRange());
basegfx::B2DPolyPolygon aCombinedPolyPoly;
if(rEntries.size())
@@ -210,7 +164,7 @@ namespace drawinglayer
aRetval[0] = Primitive2DReference(
new PolyPolygonColorPrimitive2D(
aCombinedPolyPoly,
- rOuterColor));
+ rOutmostColor));
if(rEntries.size())
{
@@ -268,17 +222,17 @@ namespace drawinglayer
// get the transform matrices and colors (where colors
// will have one more entry that matrices)
std::vector< drawinglayer::texture::B2DHomMatrixAndBColor > aEntries;
- basegfx::BColor aOuterColor;
+ basegfx::BColor aOutmostColor;
- generateMatricesAndColors(aEntries, aOuterColor);
+ generateMatricesAndColors(aEntries, aOutmostColor);
if(bOverlapping)
{
- return createOverlappingFill(aEntries, aOuterColor, aUnitPolygon);
+ return createOverlappingFill(aEntries, aOutmostColor, aUnitPolygon);
}
else
{
- return createNonOverlappingFill(aEntries, aOuterColor, aUnitPolygon);
+ return createNonOverlappingFill(aEntries, aOutmostColor, aUnitPolygon);
}
}
@@ -304,22 +258,10 @@ namespace drawinglayer
}
FillGradientPrimitive2D::FillGradientPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rObjectRange,
const attribute::FillGradientAttribute& rFillGradient)
: BufferedDecompositionPrimitive2D(),
- maOutputRange(rOutputRange),
- maDefinitionRange(rOutputRange),
- maFillGradient(rFillGradient)
- {
- }
-
- FillGradientPrimitive2D::FillGradientPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const basegfx::B2DRange& rDefinitionRange,
- const attribute::FillGradientAttribute& rFillGradient)
- : BufferedDecompositionPrimitive2D(),
- maOutputRange(rOutputRange),
- maDefinitionRange(rDefinitionRange),
+ maObjectRange(rObjectRange),
maFillGradient(rFillGradient)
{
}
@@ -330,8 +272,7 @@ namespace drawinglayer
{
const FillGradientPrimitive2D& rCompare = (FillGradientPrimitive2D&)rPrimitive;
- return (getOutputRange() == rCompare.getOutputRange()
- && getDefinitionRange() == rCompare.getDefinitionRange()
+ return (getObjectRange() == rCompare.getObjectRange()
&& getFillGradient() == rCompare.getFillGradient());
}
@@ -340,8 +281,8 @@ namespace drawinglayer
basegfx::B2DRange FillGradientPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- // return the geometrically visible area
- return getOutputRange();
+ // return ObjectRange
+ return getObjectRange();
}
// provide unique ID
diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
index cbad4a13acef..1f941d0e6d11 100644
--- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
@@ -67,12 +67,7 @@ namespace drawinglayer
case attribute::HATCHSTYLE_TRIPLE:
{
// rotated 45 degrees
- texture::GeoTexSvxHatch aHatch(
- getDefinitionRange(),
- getOutputRange(),
- fDistance,
- fAngle - F_PI4);
-
+ texture::GeoTexSvxHatch aHatch(getObjectRange(), fDistance, fAngle - F_PI4);
aHatch.appendTransformations(aMatrices);
// fall-through by purpose
@@ -80,12 +75,7 @@ namespace drawinglayer
case attribute::HATCHSTYLE_DOUBLE:
{
// rotated 90 degrees
- texture::GeoTexSvxHatch aHatch(
- getDefinitionRange(),
- getOutputRange(),
- fDistance,
- fAngle - F_PI2);
-
+ texture::GeoTexSvxHatch aHatch(getObjectRange(), fDistance, fAngle - F_PI2);
aHatch.appendTransformations(aMatrices);
// fall-through by purpose
@@ -93,12 +83,7 @@ namespace drawinglayer
case attribute::HATCHSTYLE_SINGLE:
{
// angle as given
- texture::GeoTexSvxHatch aHatch(
- getDefinitionRange(),
- getOutputRange(),
- fDistance,
- fAngle);
-
+ texture::GeoTexSvxHatch aHatch(getObjectRange(), fDistance, fAngle);
aHatch.appendTransformations(aMatrices);
}
}
@@ -114,7 +99,7 @@ namespace drawinglayer
const Primitive2DReference xRef(
new PolyPolygonColorPrimitive2D(
basegfx::B2DPolyPolygon(
- basegfx::tools::createPolygonFromRect(getOutputRange())), getBColor()));
+ basegfx::tools::createPolygonFromRect(getObjectRange())), getBColor()));
aRetval[0] = xRef;
}
@@ -140,25 +125,11 @@ namespace drawinglayer
}
FillHatchPrimitive2D::FillHatchPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const basegfx::BColor& rBColor,
- const attribute::FillHatchAttribute& rFillHatch)
- : DiscreteMetricDependentPrimitive2D(),
- maOutputRange(rOutputRange),
- maDefinitionRange(rOutputRange),
- maFillHatch(rFillHatch),
- maBColor(rBColor)
- {
- }
-
- FillHatchPrimitive2D::FillHatchPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rObjectRange,
const basegfx::BColor& rBColor,
const attribute::FillHatchAttribute& rFillHatch)
: DiscreteMetricDependentPrimitive2D(),
- maOutputRange(rOutputRange),
- maDefinitionRange(rDefinitionRange),
+ maObjectRange(rObjectRange),
maFillHatch(rFillHatch),
maBColor(rBColor)
{
@@ -170,8 +141,7 @@ namespace drawinglayer
{
const FillHatchPrimitive2D& rCompare = (FillHatchPrimitive2D&)rPrimitive;
- return (getOutputRange() == rCompare.getOutputRange()
- && getDefinitionRange() == rCompare.getDefinitionRange()
+ return (getObjectRange() == rCompare.getObjectRange()
&& getFillHatch() == rCompare.getFillHatch()
&& getBColor() == rCompare.getBColor());
}
@@ -181,8 +151,8 @@ namespace drawinglayer
basegfx::B2DRange FillHatchPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- // return the geometrically visible area
- return getOutputRange();
+ // return ObjectRange
+ return getObjectRange();
}
Primitive2DSequence FillHatchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
index 1fe0a6f7eb8a..0f33f9c0d48f 100644
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
@@ -201,7 +201,7 @@ namespace drawinglayer
PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::LineAttribute& rLineAttribute,
+ const attribute::LineAttribute& rLineAttribute,
const attribute::StrokeAttribute& rStrokeAttribute)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
@@ -212,7 +212,7 @@ namespace drawinglayer
PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::LineAttribute& rLineAttribute)
+ const attribute::LineAttribute& rLineAttribute)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
maLineAttribute(rLineAttribute),
@@ -306,10 +306,7 @@ namespace drawinglayer
{
// create SubSequence with FillGradientPrimitive2D
const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
- FillGradientPrimitive2D* pNewGradient = new FillGradientPrimitive2D(
- aPolyPolygonRange,
- getDefinitionRange(),
- getFillGradient());
+ FillGradientPrimitive2D* pNewGradient = new FillGradientPrimitive2D(aPolyPolygonRange, getFillGradient());
const Primitive2DReference xSubRef(pNewGradient);
const Primitive2DSequence aSubSequence(&xSubRef, 1L);
@@ -330,18 +327,6 @@ namespace drawinglayer
const attribute::FillGradientAttribute& rFillGradient)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
- maDefinitionRange(rPolyPolygon.getB2DRange()),
- maFillGradient(rFillGradient)
- {
- }
-
- PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
- const attribute::FillGradientAttribute& rFillGradient)
- : BufferedDecompositionPrimitive2D(),
- maPolyPolygon(rPolyPolygon),
- maDefinitionRange(rDefinitionRange),
maFillGradient(rFillGradient)
{
}
@@ -352,9 +337,7 @@ namespace drawinglayer
{
const PolyPolygonGradientPrimitive2D& rCompare = (PolyPolygonGradientPrimitive2D&)rPrimitive;
- return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
- && getDefinitionRange() == rCompare.getDefinitionRange()
- && getFillGradient() == rCompare.getFillGradient());
+ return (getFillGradient() == rCompare.getFillGradient());
}
return false;
@@ -378,11 +361,7 @@ namespace drawinglayer
{
// create SubSequence with FillHatchPrimitive2D
const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
- FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(
- aPolyPolygonRange,
- getDefinitionRange(),
- getBackgroundColor(),
- getFillHatch());
+ FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(aPolyPolygonRange, getBackgroundColor(), getFillHatch());
const Primitive2DReference xSubRef(pNewHatch);
const Primitive2DSequence aSubSequence(&xSubRef, 1L);
@@ -404,20 +383,6 @@ namespace drawinglayer
const attribute::FillHatchAttribute& rFillHatch)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
- maDefinitionRange(rPolyPolygon.getB2DRange()),
- maBackgroundColor(rBackgroundColor),
- maFillHatch(rFillHatch)
- {
- }
-
- PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::BColor& rBackgroundColor,
- const attribute::FillHatchAttribute& rFillHatch)
- : BufferedDecompositionPrimitive2D(),
- maPolyPolygon(rPolyPolygon),
- maDefinitionRange(rDefinitionRange),
maBackgroundColor(rBackgroundColor),
maFillHatch(rFillHatch)
{
@@ -429,9 +394,7 @@ namespace drawinglayer
{
const PolyPolygonHatchPrimitive2D& rCompare = (PolyPolygonHatchPrimitive2D&)rPrimitive;
- return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
- && getDefinitionRange() == rCompare.getDefinitionRange()
- && getBackgroundColor() == rCompare.getBackgroundColor()
+ return (getBackgroundColor() == rCompare.getBackgroundColor()
&& getFillHatch() == rCompare.getFillHatch());
}
@@ -466,56 +429,15 @@ namespace drawinglayer
if(aPrefSize.Width() && aPrefSize.Height())
{
// create SubSequence with FillGraphicPrimitive2D based on polygon range
- const basegfx::B2DRange aOutRange(getB2DPolyPolygon().getB2DRange());
+ const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
const basegfx::B2DHomMatrix aNewObjectTransform(
basegfx::tools::createScaleTranslateB2DHomMatrix(
- aOutRange.getRange(),
- aOutRange.getMinimum()));
- Primitive2DReference xSubRef;
-
- if(aOutRange != getDefinitionRange())
- {
- // we want to paint (tiled) content which is defined relative to DefinitionRange
- // with the same tiling and offset(s) in the traget range of the geometry (the
- // polygon). The range given in the local FillGraphicAttribute defines the position
- // of the graphic in unit coordinates relative to the DefinitionRange. Transform
- // this using DefinitionRange to get to the global definition and then with the
- // inverse transformation from the target range to go to unit coordinates relative
- // to that traget coordinate system.
- basegfx::B2DRange aAdaptedRange(getFillGraphic().getGraphicRange());
-
- const basegfx::B2DHomMatrix aFromDefinitionRangeToGlobal(
- basegfx::tools::createScaleTranslateB2DHomMatrix(
- getDefinitionRange().getRange(),
- getDefinitionRange().getMinimum()));
-
- aAdaptedRange.transform(aFromDefinitionRangeToGlobal);
-
- basegfx::B2DHomMatrix aFromGlobalToOutRange(
- basegfx::tools::createScaleTranslateB2DHomMatrix(
- aOutRange.getRange(),
- aOutRange.getMinimum()));
- aFromGlobalToOutRange.invert();
-
- aAdaptedRange.transform(aFromGlobalToOutRange);
-
- const drawinglayer::attribute::FillGraphicAttribute aAdaptedFillGraphicAttribute(
- getFillGraphic().getGraphic(),
- aAdaptedRange,
- getFillGraphic().getTiling(),
- getFillGraphic().getOffsetX(),
- getFillGraphic().getOffsetY());
-
- xSubRef = new FillGraphicPrimitive2D(
- aNewObjectTransform,
- aAdaptedFillGraphicAttribute);
- }
- else
- {
- xSubRef = new FillGraphicPrimitive2D(
+ aPolyPolygonRange.getRange(),
+ aPolyPolygonRange.getMinimum()));
+ const Primitive2DReference xSubRef(
+ new FillGraphicPrimitive2D(
aNewObjectTransform,
- getFillGraphic());
- }
+ getFillGraphic()));
// embed to mask primitive
const Primitive2DReference xRef(
@@ -536,18 +458,6 @@ namespace drawinglayer
const attribute::FillGraphicAttribute& rFillGraphic)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
- maDefinitionRange(rPolyPolygon.getB2DRange()),
- maFillGraphic(rFillGraphic)
- {
- }
-
- PolyPolygonGraphicPrimitive2D::PolyPolygonGraphicPrimitive2D(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
- const attribute::FillGraphicAttribute& rFillGraphic)
- : BufferedDecompositionPrimitive2D(),
- maPolyPolygon(rPolyPolygon),
- maDefinitionRange(rDefinitionRange),
maFillGraphic(rFillGraphic)
{
}
@@ -558,9 +468,7 @@ namespace drawinglayer
{
const PolyPolygonGraphicPrimitive2D& rCompare = (PolyPolygonGraphicPrimitive2D&)rPrimitive;
- return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
- && getDefinitionRange() == rCompare.getDefinitionRange()
- && getFillGraphic() == rCompare.getFillGraphic());
+ return (getFillGraphic() == rCompare.getFillGraphic());
}
return false;
diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
index 24162d698d43..20169cbdf065 100644
--- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
@@ -145,34 +145,19 @@ namespace drawinglayer
case attribute::HATCHSTYLE_TRIPLE:
{
// rotated 45 degrees
- texture::GeoTexSvxHatch aHatch(
- aOutlineRange,
- aOutlineRange,
- getHatch().getDistance(),
- fAngle - F_PI4);
-
+ texture::GeoTexSvxHatch aHatch(aOutlineRange, getHatch().getDistance(), fAngle - F_PI4);
aHatch.appendTransformations(aMatrices);
}
case attribute::HATCHSTYLE_DOUBLE:
{
// rotated 90 degrees
- texture::GeoTexSvxHatch aHatch(
- aOutlineRange,
- aOutlineRange,
- getHatch().getDistance(),
- fAngle - F_PI2);
-
+ texture::GeoTexSvxHatch aHatch(aOutlineRange, getHatch().getDistance(), fAngle - F_PI2);
aHatch.appendTransformations(aMatrices);
}
case attribute::HATCHSTYLE_SINGLE:
{
// angle as given
- texture::GeoTexSvxHatch aHatch(
- aOutlineRange,
- aOutlineRange,
- getHatch().getDistance(),
- fAngle);
-
+ texture::GeoTexSvxHatch aHatch(aOutlineRange, getHatch().getDistance(), fAngle);
aHatch.appendTransformations(aMatrices);
}
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index d17d0ec250cc..17506ef19fc7 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1452,15 +1452,6 @@ namespace drawinglayer
const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
- if(aLocalPolyPolygon.getB2DRange() != rHatchCandidate.getDefinitionRange())
- {
- // the range which defines the hatch is different from the range of the
- // geometry (used for writer frames). This cannot be done calling vcl, thus use
- // decomposition here
- process(rCandidate.get2DDecomposition(getViewInformation2D()));
- break;
- }
-
// #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
// per polygon. Split polygon until there are less than that
while(fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon))
@@ -1583,20 +1574,11 @@ namespace drawinglayer
// BTW: One more example how useful the principles of primitives are; the decomposition
// is by definition a simpler, maybe more expensive representation of the same content.
process(rCandidate.get2DDecomposition(getViewInformation2D()));
- break;
}
-
- const primitive2d::PolyPolygonGradientPrimitive2D& rGradientCandidate = static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate);
- basegfx::B2DPolyPolygon aLocalPolyPolygon(rGradientCandidate.getB2DPolyPolygon());
-
- if(aLocalPolyPolygon.getB2DRange() != rGradientCandidate.getDefinitionRange())
+ else
{
- // the range which defines the gradient is different from the range of the
- // geometry (used for writer frames). This cannot be done calling vcl, thus use
- // decomposition here
- process(rCandidate.get2DDecomposition(getViewInformation2D()));
- break;
- }
+ const primitive2d::PolyPolygonGradientPrimitive2D& rGradientCandidate = static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate);
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(rGradientCandidate.getB2DPolyPolygon());
// #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
// per polygon. Split polygon until there are less than that
@@ -1644,27 +1626,28 @@ namespace drawinglayer
break;
}
- pSvtGraphicFill = new SvtGraphicFill(
- aToolsPolyPolygon,
- Color(),
- 0.0,
- SvtGraphicFill::fillEvenOdd,
- SvtGraphicFill::fillGradient,
- SvtGraphicFill::Transform(),
- false,
- SvtGraphicFill::hatchSingle,
- Color(),
- eGrad,
- aVCLGradient.GetStartColor(),
- aVCLGradient.GetEndColor(),
- aVCLGradient.GetSteps(),
- Graphic());
- }
+ pSvtGraphicFill = new SvtGraphicFill(
+ aToolsPolyPolygon,
+ Color(),
+ 0.0,
+ SvtGraphicFill::fillEvenOdd,
+ SvtGraphicFill::fillGradient,
+ SvtGraphicFill::Transform(),
+ false,
+ SvtGraphicFill::hatchSingle,
+ Color(),
+ eGrad,
+ aVCLGradient.GetStartColor(),
+ aVCLGradient.GetEndColor(),
+ aVCLGradient.GetSteps(),
+ Graphic());
+ }
- // call VCL directly; encapsulate with SvtGraphicFill
- impStartSvtGraphicFill(pSvtGraphicFill);
- mpOutputDevice->DrawGradient(aToolsPolyPolygon, aVCLGradient);
- impEndSvtGraphicFill(pSvtGraphicFill);
+ // call VCL directly; encapsulate with SvtGraphicFill
+ impStartSvtGraphicFill(pSvtGraphicFill);
+ mpOutputDevice->DrawGradient(aToolsPolyPolygon, aVCLGradient);
+ impEndSvtGraphicFill(pSvtGraphicFill);
+ }
break;
}
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 1a4db9512bd5..e21a83642202 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -1102,7 +1102,7 @@ namespace drawinglayer
const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch();
// create hatch polygon in range size and discrete coordinates
- basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getOutputRange());
+ basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getObjectRange());
aHatchRange.transform(maCurrentTransformation);
const basegfx::B2DPolygon aHatchPolygon(basegfx::tools::createPolygonFromRect(aHatchRange));
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 38028b27f71e..3808210f95de 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -91,83 +91,32 @@ namespace drawinglayer
{
case attribute::GRADIENTSTYLE_LINEAR:
{
- pNewTex.reset(
- new texture::GeoTexSvxGradientLinear(
- aOutlineRange,
- aOutlineRange,
- aStart,
- aEnd,
- nSteps,
- rFillGradient.getBorder(),
- rFillGradient.getAngle()));
+ pNewTex.reset(new texture::GeoTexSvxGradientLinear(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_AXIAL:
{
- pNewTex.reset(
- new texture::GeoTexSvxGradientAxial(
- aOutlineRange,
- aOutlineRange,
- aStart,
- aEnd,
- nSteps,
- rFillGradient.getBorder(),
- rFillGradient.getAngle()));
+ pNewTex.reset(new texture::GeoTexSvxGradientAxial(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_RADIAL:
{
- pNewTex.reset(
- new texture::GeoTexSvxGradientRadial(
- aOutlineRange,
- aStart,
- aEnd,
- nSteps,
- rFillGradient.getBorder(),
- rFillGradient.getOffsetX(),
- rFillGradient.getOffsetY()));
+ pNewTex.reset(new texture::GeoTexSvxGradientRadial(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY()));
break;
}
case attribute::GRADIENTSTYLE_ELLIPTICAL:
{
- pNewTex.reset(
- new texture::GeoTexSvxGradientElliptical(
- aOutlineRange,
- aStart,
- aEnd,
- nSteps,
- rFillGradient.getBorder(),
- rFillGradient.getOffsetX(),
- rFillGradient.getOffsetY(),
- rFillGradient.getAngle()));
+ pNewTex.reset(new texture::GeoTexSvxGradientElliptical(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_SQUARE:
{
- pNewTex.reset(
- new texture::GeoTexSvxGradientSquare(
- aOutlineRange,
- aStart,
- aEnd,
- nSteps,
- rFillGradient.getBorder(),
- rFillGradient.getOffsetX(),
- rFillGradient.getOffsetY(),
- rFillGradient.getAngle()));
+ pNewTex.reset(new texture::GeoTexSvxGradientSquare(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_RECT:
{
- pNewTex.reset(
- new texture::GeoTexSvxGradientRect(
- aOutlineRange,
- aStart,
- aEnd,
- nSteps,
- rFillGradient.getBorder(),
- rFillGradient.getOffsetX(),
- rFillGradient.getOffsetY(),
- rFillGradient.getAngle()));
+ pNewTex.reset(new texture::GeoTexSvxGradientRect(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), rFillGradient.getAngle()));
break;
}
}
diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx
index e1f8f92a3a5a..d468f708d400 100644
--- a/drawinglayer/source/texture/texture.cxx
+++ b/drawinglayer/source/texture/texture.cxx
@@ -67,14 +67,14 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradient::GeoTexSvxGradient(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 /* nSteps */,
double fBorder)
: GeoTexSvx(),
maGradientInfo(),
- maDefinitionRange(rDefinitionRange),
+ maTargetRange(rTargetRange),
maStart(rStart),
maEnd(rEnd),
mfBorder(fBorder)
@@ -91,7 +91,7 @@ namespace drawinglayer
return (pCompare
&& maGradientInfo == pCompare->maGradientInfo
- && maDefinitionRange == pCompare->maDefinitionRange
+ && maTargetRange == pCompare->maTargetRange
&& mfBorder == pCompare->mfBorder);
}
} // end of namespace texture
@@ -104,33 +104,19 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradientLinear::GeoTexSvxGradientLinear(
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
double fBorder,
double fAngle)
- : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, nSteps, fBorder),
- mfUnitMinX(0.0),
- mfUnitWidth(1.0),
- mfUnitMaxY(1.0)
+ : GeoTexSvxGradient(rTargetRange, rStart, rEnd, nSteps, fBorder)
{
maGradientInfo = basegfx::tools::createLinearODFGradientInfo(
- rDefinitionRange,
+ rTargetRange,
nSteps,
fBorder,
fAngle);
-
- if(rDefinitionRange != rOutputRange)
- {
- basegfx::B2DRange aInvOutputRange(rOutputRange);
-
- aInvOutputRange.transform(maGradientInfo.getBackTextureTransform());
- mfUnitMinX = aInvOutputRange.getMinX();
- mfUnitWidth = aInvOutputRange.getWidth();
- mfUnitMaxY = aInvOutputRange.getMaxY();
- }
}
GeoTexSvxGradientLinear::~GeoTexSvxGradientLinear()
@@ -139,46 +125,29 @@ namespace drawinglayer
void GeoTexSvxGradientLinear::appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor)
+ basegfx::BColor& rOutmostColor)
{
- rOuterColor = maStart;
+ rOutmostColor = maStart;
if(maGradientInfo.getSteps())
{
const double fStripeWidth(1.0 / maGradientInfo.getSteps());
B2DHomMatrixAndBColor aB2DHomMatrixAndBColor;
- basegfx::B2DHomMatrix aPattern;
-
- // bring from unit circle [-1, -1, 1, 1] to unit range [0, 0, 1, 1]
- aPattern.scale(0.5, 0.5);
- aPattern.translate(0.5, 0.5);
-
- // scale and translate in X
- aPattern.scale(mfUnitWidth, 1.0);
- aPattern.translate(mfUnitMinX, 0.0);
for(sal_uInt32 a(1); a < maGradientInfo.getSteps(); a++)
{
const double fPos(fStripeWidth * a);
- basegfx::B2DHomMatrix aNew(aPattern);
-
- // scale and translate in Y
- double fHeight(1.0 - fPos);
-
- if(a + 1 == maGradientInfo.getSteps() && mfUnitMaxY > 1.0)
- {
- fHeight += mfUnitMaxY - 1.0;
- }
-
- aNew.scale(1.0, fHeight);
- aNew.translate(0.0, fPos);
-
- // set at target
- aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * aNew;
-
- // interpolate and set color
+ // optimized below...
+
+ // basegfx::B2DHomMatrix aNew;
+ // aNew.scale(0.5, 0.5);
+ // aNew.translate(0.5, 0.5);
+ // aNew.scale(1.0, (1.0 - fPos));
+ // aNew.translate(0.0, fPos);
+ // aNew = maGradientInfo.getTextureTransform() * aNew;
+ aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() *
+ basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5 * (1.0 - fPos), 0.5, 0.5 * (1.0 + fPos));
aB2DHomMatrixAndBColor.maBColor = interpolate(maStart, maEnd, double(a) / double(maGradientInfo.getSteps() - 1));
-
rEntries.push_back(aB2DHomMatrixAndBColor);
}
}
@@ -200,31 +169,19 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradientAxial::GeoTexSvxGradientAxial(
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
double fBorder,
double fAngle)
- : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, nSteps, fBorder),
- mfUnitMinX(0.0),
- mfUnitWidth(1.0)
+ : GeoTexSvxGradient(rTargetRange, rStart, rEnd, nSteps, fBorder)
{
maGradientInfo = basegfx::tools::createAxialODFGradientInfo(
- rDefinitionRange,
+ rTargetRange,
nSteps,
fBorder,
fAngle);
-
- if(rDefinitionRange != rOutputRange)
- {
- basegfx::B2DRange aInvOutputRange(rOutputRange);
-
- aInvOutputRange.transform(maGradientInfo.getBackTextureTransform());
- mfUnitMinX = aInvOutputRange.getMinX();
- mfUnitWidth = aInvOutputRange.getWidth();
- }
}
GeoTexSvxGradientAxial::~GeoTexSvxGradientAxial()
@@ -233,9 +190,9 @@ namespace drawinglayer
void GeoTexSvxGradientAxial::appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor)
+ basegfx::BColor& rOutmostColor)
{
- rOuterColor = maEnd;
+ rOutmostColor = maEnd;
if(maGradientInfo.getSteps())
{
@@ -244,26 +201,16 @@ namespace drawinglayer
for(sal_uInt32 a(1); a < maGradientInfo.getSteps(); a++)
{
- const double fPos(fStripeWidth * a);
- basegfx::B2DHomMatrix aNew;
-
- // bring in X from unit circle [-1, -1, 1, 1] to unit range [0, 0, 1, 1]
- aNew.scale(0.5, 1.0);
- aNew.translate(0.5, 0.0);
-
- // scale/translate in X
- aNew.scale(mfUnitWidth, 1.0);
- aNew.translate(mfUnitMinX, 0.0);
-
- // already centerd in Y on X-Axis, just scale in Y
- aNew.scale(1.0, 1.0 - fPos);
-
- // set at target
- aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * aNew;
-
- // interpolate and set color
+ // const double fPos(fStripeWidth * a);
+ // optimized below...
+
+ // basegfx::B2DHomMatrix aNew;
+ // aNew.scale(0.50, (1.0 - fPos));
+ // aNew.translate(0.5, 0.0);
+ // aNew = maGradientInfo.getTextureTransform() * aNew;
+ aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() *
+ basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0 - (fStripeWidth * a), 0.5, 0.0);
aB2DHomMatrixAndBColor.maBColor = interpolate(maEnd, maStart, double(a) / double(maGradientInfo.getSteps() - 1));
-
rEntries.push_back(aB2DHomMatrixAndBColor);
}
}
@@ -285,17 +232,17 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradientRadial::GeoTexSvxGradientRadial(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
double fBorder,
double fOffsetX,
double fOffsetY)
- : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, nSteps, fBorder)
+ : GeoTexSvxGradient(rTargetRange, rStart, rEnd, nSteps, fBorder)
{
maGradientInfo = basegfx::tools::createRadialODFGradientInfo(
- rDefinitionRange,
+ rTargetRange,
basegfx::B2DVector(fOffsetX,fOffsetY),
nSteps,
fBorder);
@@ -307,9 +254,9 @@ namespace drawinglayer
void GeoTexSvxGradientRadial::appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor)
+ basegfx::BColor& rOutmostColor)
{
- rOuterColor = maStart;
+ rOutmostColor = maStart;
if(maGradientInfo.getSteps())
{
@@ -342,7 +289,7 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradientElliptical::GeoTexSvxGradientElliptical(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -350,10 +297,10 @@ namespace drawinglayer
double fOffsetX,
double fOffsetY,
double fAngle)
- : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, nSteps, fBorder)
+ : GeoTexSvxGradient(rTargetRange, rStart, rEnd, nSteps, fBorder)
{
maGradientInfo = basegfx::tools::createEllipticalODFGradientInfo(
- rDefinitionRange,
+ rTargetRange,
basegfx::B2DVector(fOffsetX,fOffsetY),
nSteps,
fBorder,
@@ -366,9 +313,9 @@ namespace drawinglayer
void GeoTexSvxGradientElliptical::appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor)
+ basegfx::BColor& rOutmostColor)
{
- rOuterColor = maStart;
+ rOutmostColor = maStart;
if(maGradientInfo.getSteps())
{
@@ -419,7 +366,7 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradientSquare::GeoTexSvxGradientSquare(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -427,10 +374,10 @@ namespace drawinglayer
double fOffsetX,
double fOffsetY,
double fAngle)
- : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, nSteps, fBorder)
+ : GeoTexSvxGradient(rTargetRange, rStart, rEnd, nSteps, fBorder)
{
maGradientInfo = basegfx::tools::createSquareODFGradientInfo(
- rDefinitionRange,
+ rTargetRange,
basegfx::B2DVector(fOffsetX,fOffsetY),
nSteps,
fBorder,
@@ -443,9 +390,9 @@ namespace drawinglayer
void GeoTexSvxGradientSquare::appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor)
+ basegfx::BColor& rOutmostColor)
{
- rOuterColor = maStart;
+ rOutmostColor = maStart;
if(maGradientInfo.getSteps())
{
@@ -478,7 +425,7 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradientRect::GeoTexSvxGradientRect(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -486,10 +433,10 @@ namespace drawinglayer
double fOffsetX,
double fOffsetY,
double fAngle)
- : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, nSteps, fBorder)
+ : GeoTexSvxGradient(rTargetRange, rStart, rEnd, nSteps, fBorder)
{
maGradientInfo = basegfx::tools::createRectangularODFGradientInfo(
- rDefinitionRange,
+ rTargetRange,
basegfx::B2DVector(fOffsetX,fOffsetY),
nSteps,
fBorder,
@@ -502,9 +449,9 @@ namespace drawinglayer
void GeoTexSvxGradientRect::appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor)
+ basegfx::BColor& rOutmostColor)
{
- rOuterColor = maStart;
+ rOutmostColor = maStart;
if(maGradientInfo.getSteps())
{
@@ -555,22 +502,17 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxHatch::GeoTexSvxHatch(
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rTargetRange,
double fDistance,
double fAngle)
- : maOutputRange(rOutputRange),
- maTextureTransform(),
- maBackTextureTransform(),
- mfDistance(0.1),
+ : mfDistance(0.1),
mfAngle(fAngle),
- mnSteps(10),
- mbDefinitionRangeEqualsOutputRange(rDefinitionRange == rOutputRange)
+ mnSteps(10L)
{
- double fTargetSizeX(rDefinitionRange.getWidth());
- double fTargetSizeY(rDefinitionRange.getHeight());
- double fTargetOffsetX(rDefinitionRange.getMinX());
- double fTargetOffsetY(rDefinitionRange.getMinY());
+ double fTargetSizeX(rTargetRange.getWidth());
+ double fTargetSizeY(rTargetRange.getHeight());
+ double fTargetOffsetX(rTargetRange.getMinX());
+ double fTargetOffsetY(rTargetRange.getMinY());
fAngle = -fAngle;
@@ -617,7 +559,6 @@ namespace drawinglayer
{
const GeoTexSvxHatch* pCompare = dynamic_cast< const GeoTexSvxHatch* >(&rGeoTexSvx);
return (pCompare
- && maOutputRange == pCompare->maOutputRange
&& maTextureTransform == pCompare->maTextureTransform
&& mfDistance == pCompare->mfDistance
&& mfAngle == pCompare->mfAngle
@@ -626,54 +567,13 @@ namespace drawinglayer
void GeoTexSvxHatch::appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices)
{
- if(mbDefinitionRangeEqualsOutputRange)
+ for(sal_uInt32 a(1L); a < mnSteps; a++)
{
- // simple hatch where the definition area equals the output area
- for(sal_uInt32 a(1); a < mnSteps; a++)
- {
- // create matrix
- const double fOffset(mfDistance * (double)a);
- basegfx::B2DHomMatrix aNew;
- aNew.set(1, 2, fOffset);
- rMatrices.push_back(maTextureTransform * aNew);
- }
- }
- else
- {
- // output area is different from definition area, back-transform to get
- // the output area in unit coordinates and fill this with hatch lines
- // using the settings derived from the definition area
- basegfx::B2DRange aBackUnitRange(maOutputRange);
-
- aBackUnitRange.transform(getBackTextureTransform());
-
- // calculate vertical start value and a security maximum integer value to avoid death loops
- double fStart(basegfx::snapToNearestMultiple(aBackUnitRange.getMinY(), mfDistance));
- const sal_uInt32 nNeededIntegerSteps(basegfx::fround((aBackUnitRange.getHeight() / mfDistance) + 0.5));
- sal_uInt32 nMaxIntegerSteps(::std::min(nNeededIntegerSteps, sal_uInt32(10000)));
-
- while(fStart < aBackUnitRange.getMaxY() && nMaxIntegerSteps)
- {
- // create new transform for
- basegfx::B2DHomMatrix aNew;
-
- // adapt x scale and position
- //aNew.scale(aBackUnitRange.getWidth(), 1.0);
- //aNew.translate(aBackUnitRange.getMinX(), 0.0);
- aNew.set(0, 0, aBackUnitRange.getWidth());
- aNew.set(0, 2, aBackUnitRange.getMinX());
-
- // adapt y position to current step
- aNew.set(1, 2, fStart);
- //aNew.translate(0.0, fStart);
-
- // add new transformation
- rMatrices.push_back(maTextureTransform * aNew);
-
- // next step
- fStart += mfDistance;
- nMaxIntegerSteps--;
- }
+ // create matrix
+ const double fOffset(mfDistance * (double)a);
+ basegfx::B2DHomMatrix aNew;
+ aNew.set(1, 2, fOffset);
+ rMatrices.push_back(maTextureTransform * aNew);
}
}
diff --git a/drawinglayer/source/texture/texture3d.cxx b/drawinglayer/source/texture/texture3d.cxx
index 5902188068c1..b08a024032d4 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -334,28 +334,16 @@ namespace drawinglayer
const double fAngleA(rHatch.getAngle());
maColor = rHatch.getColor();
mbFillBackground = rHatch.isFillBackground();
- mp0 = new GeoTexSvxHatch(
- aOutlineRange,
- aOutlineRange,
- rHatch.getDistance(),
- fAngleA);
+ mp0 = new GeoTexSvxHatch(aOutlineRange, rHatch.getDistance(), fAngleA);
if(attribute::HATCHSTYLE_DOUBLE == rHatch.getStyle() || attribute::HATCHSTYLE_TRIPLE == rHatch.getStyle())
{
- mp1 = new GeoTexSvxHatch(
- aOutlineRange,
- aOutlineRange,
- rHatch.getDistance(),
- fAngleA + F_PI2);
+ mp1 = new GeoTexSvxHatch(aOutlineRange, rHatch.getDistance(), fAngleA + F_PI2);
}
if(attribute::HATCHSTYLE_TRIPLE == rHatch.getStyle())
{
- mp2 = new GeoTexSvxHatch(
- aOutlineRange,
- aOutlineRange,
- rHatch.getDistance(),
- fAngleA + F_PI4);
+ mp2 = new GeoTexSvxHatch(aOutlineRange, rHatch.getDistance(), fAngleA + F_PI4);
}
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 6fca87b723d1..73cba25e27b8 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -4004,24 +4004,6 @@ const GraphicObject* SvxBrushItem::GetGraphicObject(OUString const & referer) co
return pImpl->pGraphicObject;
}
-//UUUU
-sal_Int8 SvxBrushItem::getGraphicTransparency() const
-{
- return pImpl->nGraphicTransparency;
-}
-
-// -----------------------------------------------------------------------
-//UUUU
-void SvxBrushItem::setGraphicTransparency(sal_Int8 nNew)
-{
- if(nNew != pImpl->nGraphicTransparency)
- {
- pImpl->nGraphicTransparency = nNew;
- ApplyGraphicTransparency_Impl();
- }
-}
-
-// -----------------------------------------------------------------------
const Graphic* SvxBrushItem::GetGraphic(OUString const & referer) const
diff --git a/include/basegfx/numeric/ftools.hxx b/include/basegfx/numeric/ftools.hxx
index b4ae0a484bd8..55ff7a559d62 100644
--- a/include/basegfx/numeric/ftools.hxx
+++ b/include/basegfx/numeric/ftools.hxx
@@ -147,6 +147,16 @@ namespace basegfx
snapToNearestMultiple(0.26, 0.5) = 0.5
*/
BASEGFX_DLLPUBLIC double snapToNearestMultiple(double v, const double fStep);
+ /** return fValue with the sign of fSignCarrier, thus evtl. changed
+ */
+ inline double copySign(double fValue, double fSignCarrier)
+ {
+#ifdef WNT
+ return _copysign(fValue, fSignCarrier);
+#else
+ return copysign(fValue, fSignCarrier);
+#endif
+ }
class BASEGFX_DLLPUBLIC fTools
{
diff --git a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
index 1bf2260327b0..515d1f60934d 100644
--- a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
@@ -55,12 +55,8 @@ namespace drawinglayer
class DRAWINGLAYER_DLLPUBLIC FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- /// the geometrically visible area
- basegfx::B2DRange maOutputRange;
-
- /// the area the gradient definition is based on
- /// in the simplest case identical to OutputRange
- basegfx::B2DRange maDefinitionRange;
+ /// the geometric definition
+ basegfx::B2DRange maObjectRange;
/// the gradient definition
attribute::FillGradientAttribute maFillGradient;
@@ -68,14 +64,14 @@ namespace drawinglayer
/// local helpers
void generateMatricesAndColors(
std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) const;
+ basegfx::BColor& rOutmostColor) const;
Primitive2DSequence createOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- const basegfx::BColor& rOuterColor,
+ const basegfx::BColor& rOutmostColor,
const basegfx::B2DPolygon& rUnitPolygon) const;
Primitive2DSequence createNonOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- const basegfx::BColor& rOuterColor,
+ const basegfx::BColor& rOutmostColor,
const basegfx::B2DPolygon& rUnitPolygon) const;
protected:
@@ -86,18 +82,13 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
public:
- /// constructors. The one without definition range will use output range as definition range
- FillGradientPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const attribute::FillGradientAttribute& rFillGradient);
+ /// constructor
FillGradientPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rObjectRange,
const attribute::FillGradientAttribute& rFillGradient);
/// data read access
- const basegfx::B2DRange& getOutputRange() const { return maOutputRange; }
- const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+ const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
/// compare operator
diff --git a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
index a7648a64f3e4..9234cec15857 100644
--- a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
@@ -51,12 +51,8 @@ namespace drawinglayer
class DRAWINGLAYER_DLLPUBLIC FillHatchPrimitive2D : public DiscreteMetricDependentPrimitive2D
{
private:
- /// the geometrically visible area
- basegfx::B2DRange maOutputRange;
-
- /// the area the gradient definition is based on
- /// in the simplest case identical to OutputRange
- basegfx::B2DRange maDefinitionRange;
+ /// the geometric definition
+ basegfx::B2DRange maObjectRange;
/// the hatch definition
attribute::FillHatchAttribute maFillHatch;
@@ -69,20 +65,14 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
public:
- /// constructors. The one without definition range will use output range as definition range
- FillHatchPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const basegfx::BColor& rBColor,
- const attribute::FillHatchAttribute& rFillHatch);
+ /// constructor
FillHatchPrimitive2D(
- const basegfx::B2DRange& rOutputRange,
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rObjectRange,
const basegfx::BColor& rBColor,
const attribute::FillHatchAttribute& rFillHatch);
/// data read access
- const basegfx::B2DRange& getOutputRange() const { return maOutputRange; }
- const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+ const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
const basegfx::BColor& getBColor() const { return maBColor; }
diff --git a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
index e65952250362..52effbdb0c94 100644
--- a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
@@ -44,7 +44,7 @@ namespace drawinglayer
This primitive defines a multi-PolygonHairlinePrimitive2D and is
just for convenience. The definition is not different from the single
- defined PolygonHairlinePrimitive2Ds.
+ defined PolygonHairlinePrimitive2Ds.
*/
class DRAWINGLAYER_DLLPUBLIC PolyPolygonHairlinePrimitive2D : public BufferedDecompositionPrimitive2D
{
@@ -255,9 +255,6 @@ namespace drawinglayer
/// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
- /// the definition range
- basegfx::B2DRange maDefinitionRange;
-
/// the gradient definition
attribute::FillGradientAttribute maFillGradient;
@@ -266,18 +263,13 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
public:
- /// constructors. The one without definition range will use output range as definition range
- PolyPolygonGradientPrimitive2D(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::FillGradientAttribute& rFillGradient);
+ /// constructor
PolyPolygonGradientPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
const attribute::FillGradientAttribute& rFillGradient);
/// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
- const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
/// compare operator
@@ -308,9 +300,6 @@ namespace drawinglayer
/// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
- /// the definition range
- basegfx::B2DRange maDefinitionRange;
-
/// the hatch background color (if used)
basegfx::BColor maBackgroundColor;
@@ -322,20 +311,14 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
public:
- /// constructors. The one without definition range will use output range as definition range
- PolyPolygonHatchPrimitive2D(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::BColor& rBackgroundColor,
- const attribute::FillHatchAttribute& rFillHatch);
+ /// constructor
PolyPolygonHatchPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rBackgroundColor,
const attribute::FillHatchAttribute& rFillHatch);
/// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
- const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; }
const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
@@ -367,9 +350,6 @@ namespace drawinglayer
/// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
- /// the definition range
- basegfx::B2DRange maDefinitionRange;
-
/// the bitmap fill definition (may include tiling)
attribute::FillGraphicAttribute maFillGraphic;
@@ -378,18 +358,13 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
public:
- /// constructors. The one without definition range will use output range as definition range
- PolyPolygonGraphicPrimitive2D(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::FillGraphicAttribute& rFillGraphic);
+ /// constructor
PolyPolygonGraphicPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
const attribute::FillGraphicAttribute& rFillGraphic);
/// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
- const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
/// compare operator
diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx
index daa0348103a3..0fa666d19411 100644
--- a/include/drawinglayer/texture/texture.hxx
+++ b/include/drawinglayer/texture/texture.hxx
@@ -76,14 +76,14 @@ namespace drawinglayer
{
protected:
basegfx::ODFGradientInfo maGradientInfo;
- basegfx::B2DRange maDefinitionRange;
+ basegfx::B2DRange maTargetRange;
basegfx::BColor maStart;
basegfx::BColor maEnd;
double mfBorder;
public:
GeoTexSvxGradient(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -96,7 +96,7 @@ namespace drawinglayer
// virtual base methods
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) = 0;
+ basegfx::BColor& rOutmostColor) = 0;
// data access
const basegfx::BColor& getStart() const { return maStart; }
@@ -113,15 +113,9 @@ namespace drawinglayer
{
class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientLinear : public GeoTexSvxGradient
{
- protected:
- double mfUnitMinX;
- double mfUnitWidth;
- double mfUnitMaxY;
-
public:
GeoTexSvxGradientLinear(
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -131,7 +125,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) SAL_OVERRIDE;
+ basegfx::BColor& rOutmostColor) SAL_OVERRIDE;
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
};
} // end of namespace texture
@@ -145,14 +139,9 @@ namespace drawinglayer
{
class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientAxial : public GeoTexSvxGradient
{
- protected:
- double mfUnitMinX;
- double mfUnitWidth;
-
public:
GeoTexSvxGradientAxial(
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -162,7 +151,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) SAL_OVERRIDE;
+ basegfx::BColor& rOutmostColor) SAL_OVERRIDE;
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
};
} // end of namespace texture
@@ -178,7 +167,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientRadial(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -189,7 +178,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) SAL_OVERRIDE;
+ basegfx::BColor& rOutmostColor) SAL_OVERRIDE;
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
};
} // end of namespace texture
@@ -205,7 +194,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientElliptical(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -217,7 +206,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) SAL_OVERRIDE;
+ basegfx::BColor& rOutmostColor) SAL_OVERRIDE;
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
};
} // end of namespace texture
@@ -233,7 +222,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientSquare(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -245,7 +234,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) SAL_OVERRIDE;
+ basegfx::BColor& rOutmostColor) SAL_OVERRIDE;
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
};
} // end of namespace texture
@@ -261,7 +250,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientRect(
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rTargetRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -273,7 +262,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOuterColor) SAL_OVERRIDE;
+ basegfx::BColor& rOutmostColor) SAL_OVERRIDE;
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
};
} // end of namespace texture
@@ -288,20 +277,15 @@ namespace drawinglayer
class DRAWINGLAYER_DLLPUBLIC GeoTexSvxHatch : public GeoTexSvx
{
protected:
- basegfx::B2DRange maOutputRange;
basegfx::B2DHomMatrix maTextureTransform;
basegfx::B2DHomMatrix maBackTextureTransform;
double mfDistance;
double mfAngle;
sal_uInt32 mnSteps;
- /// bitfield
- bool mbDefinitionRangeEqualsOutputRange : 1;
-
public:
GeoTexSvxHatch(
- const basegfx::B2DRange& rDefinitionRange,
- const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rTargetRange,
double fDistance,
double fAngle);
virtual ~GeoTexSvxHatch();
@@ -309,7 +293,7 @@ namespace drawinglayer
// compare operator
virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const SAL_OVERRIDE;
- void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+ virtual void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
double getDistanceToHatch(const basegfx::B2DPoint& rUV) const;
const basegfx::B2DHomMatrix& getBackTextureTransform() const;
};
@@ -348,7 +332,7 @@ namespace drawinglayer
// compare operator
virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const SAL_OVERRIDE;
- void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+ virtual void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
};
} // end of namespace texture
} // end of namespace drawinglayer
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 12cb66657cea..084fcb8c1ac6 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -111,11 +111,6 @@ public:
OUString GetGraphicFilter() const { return maStrFilter; }
void SetShadingValue( const sal_uInt32 nNew );
-
- //UUUU get graphic transparency in percent
- sal_Int8 getGraphicTransparency() const;
- void setGraphicTransparency(sal_Int8 nNew);
-
void SetGraphicPos( SvxGraphicPosition eNew );
void SetGraphic( const Graphic& rNew );
void SetGraphicObject( const GraphicObject& rNewObj );
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index 0d754ed83142..8b7c89637d34 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -34,13 +34,8 @@
#define UNO_NAME_FILLSTYLE "FillStyle"
#define UNO_NAME_FILLCOLOR "FillColor"
#define UNO_NAME_FILLGRADIENT "FillGradient"
-#define UNO_NAME_FILLGRADIENTNAME "FillGradientName"
#define UNO_NAME_FILLHATCH "FillHatch"
-#define UNO_NAME_FILLHATCHNAME "FillHatchName"
#define UNO_NAME_FILLBITMAP "FillBitmap"
-#define UNO_NAME_FILLBITMAPNAME "FillBitmapName"
-#define UNO_NAME_FILLBITMAPURL "FillBitmapURL"
-#define UNO_NAME_FILLGRADIENTSTEPCOUNT "FillGradientStepCount"
#define UNO_NAME_FILLBACKGROUND "FillBackground"
#define UNO_NAME_FILLCOLOR_2 "FillColor2"
@@ -64,8 +59,6 @@
#define UNO_NAME_FILLBMP_SIZE_X "FillBitmapSizeX"
#define UNO_NAME_FILLBMP_SIZE_Y "FillBitmapSizeY"
#define UNO_NAME_FILL_TRANSPARENCE "FillTransparence"
-#define UNO_NAME_FILLTRANSPARENCEGRADIENT "FillTransparenceGradient"
-#define UNO_NAME_FILLTRANSPARENCEGRADIENTNAME "FillTransparenceGradientName"
#define UNO_NAME_FILLBMP_MODE "FillBitmapMode"
#define UNO_NAME_FILL_GRADIENT_STYLE "FillGradientStyle"
diff --git a/include/svx/sdr/primitive2d/sdrattributecreator.hxx b/include/svx/sdr/primitive2d/sdrattributecreator.hxx
index f69a8578a71d..1d9ef5a8ff9e 100644
--- a/include/svx/sdr/primitive2d/sdrattributecreator.hxx
+++ b/include/svx/sdr/primitive2d/sdrattributecreator.hxx
@@ -66,7 +66,7 @@ namespace drawinglayer
attribute::SdrShadowAttribute createNewSdrShadowAttribute(
const SfxItemSet& rSet);
- attribute::SdrFillAttribute SVX_DLLPUBLIC createNewSdrFillAttribute(
+ attribute::SdrFillAttribute createNewSdrFillAttribute(
const SfxItemSet& rSet);
// #i101508# Support handing over given text-to-border distances
@@ -78,7 +78,7 @@ namespace drawinglayer
const sal_Int32* pRight = 0,
const sal_Int32* pLower = 0);
- attribute::FillGradientAttribute SVX_DLLPUBLIC createNewTransparenceGradientAttribute(
+ attribute::FillGradientAttribute createNewTransparenceGradientAttribute(
const SfxItemSet& rSet);
attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute(
diff --git a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
index eb7a29911f6e..63a8ea4c67a4 100644
--- a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -22,7 +22,6 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <svx/svxdllapi.h>
// predefines
namespace basegfx {
@@ -46,23 +45,19 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DReference SVX_DLLPUBLIC createPolyPolygonFillPrimitive(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::SdrFillAttribute& rFill,
- const attribute::FillGradientAttribute& rFillGradient);
-
- Primitive2DReference SVX_DLLPUBLIC createPolyPolygonFillPrimitive(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
+ Primitive2DReference createPolyPolygonFillPrimitive(
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrFillAttribute& rFill,
const attribute::FillGradientAttribute& rFillGradient);
- Primitive2DReference SVX_DLLPUBLIC createPolygonLinePrimitive(
- const basegfx::B2DPolygon& rPolygon,
+ Primitive2DReference createPolygonLinePrimitive(
+ const basegfx::B2DPolygon& rUnitPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrLineAttribute& rLine,
const attribute::SdrLineStartEndAttribute& rStroke);
- Primitive2DReference SVX_DLLPUBLIC createTextPrimitive(
+ Primitive2DReference createTextPrimitive(
const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrTextAttribute& rText,
@@ -71,7 +66,7 @@ namespace drawinglayer
bool bWordWrap,
bool bClipOnBounds);
- Primitive2DSequence SVX_DLLPUBLIC createEmbeddedShadowPrimitive(
+ Primitive2DSequence createEmbeddedShadowPrimitive(
const Primitive2DSequence& rContent,
const attribute::SdrShadowAttribute& rShadow);
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index facf6cbaadef..2f9e64232dee 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -413,7 +413,7 @@ public:
virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( Window* pParent,
const SfxItemSet* pAttr,
SdrModel* pModel,
- bool bShadow) = 0 ;
+ const SdrView* pSdrView = NULL ) = 0 ;
virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
SdrModel* pModel,
const SdrObject* pObj = NULL,
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index cec1a0ee9f14..b782c1657460 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -251,12 +251,8 @@
// include/editeng/editids.hrc and include/sfx2/sfxsids.hrc so don't use the
// same id for two different attributes
-// CAUTION! Range <1 .. 22> used by EditEngine (!)
-
#define SID_ATTR_BORDER_INNER ( SID_SVX_START + 23 )
-// CAUTION! Range <24 .. 43> used by EditEngine (!)
-
#define SID_ATTR_POSTIT_AUTHOR ( SID_SVX_START + 44 )
#define SID_ATTR_POSTIT_DATE ( SID_SVX_START + 45 )
#define SID_ATTR_POSTIT_TEXT ( SID_SVX_START + 46 )
@@ -264,6 +260,7 @@
// CAUTION! Range <48 .. 49> used by EditEngine (!)
+#define SID_ATTR_SEARCH ( SID_SVX_START + 47 )
#define SID_ATTR_PAGE ( SID_SVX_START + 50 )
#define SID_ATTR_PAGE_SIZE ( SID_SVX_START + 51 )
#define SID_ATTR_PAGE_MAXSIZE ( SID_SVX_START + 52 )
@@ -277,9 +274,6 @@
#define SID_ATTR_PAGE_DYNAMIC ( SID_SVX_START + 61 )
#define SID_ATTR_PAGE_SHARED ( SID_SVX_START + 62 )
#define SID_ATTR_PAGE_BSP ( SID_SVX_START + 63 )
-
-// CAUTION! Range <64 .. 67> used by EditEngine (!)
-
#define SID_RULER_NULL_OFFSET ( SID_SVX_START + 79 )
#define SID_RULER_BORDERS ( SID_SVX_START + 80 )
#define SID_RULER_OBJECT ( SID_SVX_START + 81 )
@@ -413,9 +407,6 @@
#define SID_SPELL_DIALOG ( SID_SVX_START + 243 )
#define SID_INSERT_DRAW ( SID_SVX_START + 244 )
#define SID_THESAURUS ( SID_SVX_START + 245 )
-
-// CAUTION! Range <250 .. 250> used by EditEngine (!)
-
#define SID_DRAW_TEXT ( SID_SVX_START + 253 )
#define SID_DRAW_CAPTION ( SID_SVX_START + 254 )
#define SID_DRAW_SELECT ( SID_SVX_START + 255 )
@@ -448,9 +439,6 @@
#define SID_PARA_DLG ( SID_SVX_START + 297 )
#define SID_ATTR_GRID_OPTIONS ( SID_SVX_START + 298 )
#define SID_ATTR_FILL_SHADOW ( SID_SVX_START + 299 )
-
-// CAUTION! Range <300 .. 300> used by EditEngine (!)
-
#define SID_ATTR_LINEEND_STYLE ( SID_SVX_START + 301 )
#define SID_ATTR_TRANSFORM_SHEAR ( SID_SVX_START + 304 )
#define SID_ATTR_TRANSFORM_SHEAR_X ( SID_SVX_START + 305 )
@@ -482,9 +470,6 @@
#define SID_BMPMASK ( SID_SVX_START + 350 )
#define SID_BMPMASK_PIPETTE ( SID_SVX_START + 351 )
#define SID_BMPMASK_EXEC ( SID_SVX_START + 353 )
-
-// CAUTION! Range <363 .. 363> used by EditEngine (!)
-
#define SID_ATTR_TEXT_FITTOSIZE ( SID_SVX_START + 367 )
#define SID_ATTR_BRUSH_ROW ( SID_SVX_START + 368 )
#define SID_OPTFILTER_MSOFFICE ( SID_SVX_START + 369 )
@@ -521,8 +506,6 @@
#define SID_ATTR_3D_LIGHT ( SID_SVX_START + 407 ) /* Slots mit --> koennen demnaechst entfallen */
#define SID_ATTR_3D_START SID_ATTR_3D_LIGHT
-// CAUTION! Range <413 .. 413> used by EditEngine (!)
-
#define SID_RULER_PROTECT ( SID_SVX_START + 415 )
#define SID_COLOR_CONTROL ( SID_SVX_START + 417 )
#define SID_ATTR_3D_INTERN ( SID_SVX_START + 422 )
@@ -553,9 +536,6 @@
#define SID_GROUP ( SID_SVX_START + 454 )
#define SID_UNGROUP ( SID_SVX_START + 455 )
#define SID_SET_DEFAULT ( SID_SVX_START + 456 )
-
-// CAUTION! Range <457 .. 457> used by EditEngine (!)
-
#define SID_ATTR_ALIGN_INDENT ( SID_SVX_START + 460 )
#define SID_DEC_INDENT ( SID_SVX_START + 461 )
#define SID_INC_INDENT ( SID_SVX_START + 462 )
@@ -580,13 +560,8 @@
#define SID_ATTR_ALIGN_LOCKPOS ( SID_SVX_START + 578 )
#define SID_ATTR_LINEEND_WIDTH_DEFAULT ( SID_SVX_START + 579 )
#define SID_ATTR_NUMBERFORMAT_ONE_AREA ( SID_SVX_START + 580 )
-
-// CAUTION! Range <587 .. 587> used by EditEngine (!)
-
#define SID_PARA_BACKGRND_DESTINATION ( SID_SVX_START + 590 )
-// CAUTION! Range <591 .. 591> used by EditEngine (!)
-
#define SID_FMSLOTS_START ( SID_SVX_START + 592 )
#define SID_FM_CONFIG ( SID_SVX_START + 593 )
#define SID_FM_PUSHBUTTON ( SID_SVX_START + 594 )
@@ -722,9 +697,6 @@
#define SID_HLINKBAR_LINK ( SID_SVX_START + 851 )
#define SID_HLINKBAR_SEARCH ( SID_SVX_START + 853 )
#define SID_HLINKBAR_TARGET ( SID_SVX_START + 854 )
-
-// CAUTION! Range <855 .. 855> used by EditEngine (!)
-
#define SID_PARAM_NUM_PRESET ( SID_SVX_START + 856 )
#define SID_PARAM_CUR_NUM_LEVEL ( SID_SVX_START + 859 )
#define SID_CREATE_SW_DRAWVIEW ( SID_SVX_START + 860 )
@@ -737,26 +709,15 @@
#define SID_ATTR_GRAF_TRANSPARENCE ( SID_SVX_START + 869 )
#define SID_ATTR_GRAF_INVERT ( SID_SVX_START + 870 )
#define SID_ATTR_GRAF_MODE ( SID_SVX_START + 871 )
-
-// CAUTION! Range <877 .. 877> used by EditEngine (!)
-
#define SID_ATTR_GRAF_KEEP_ZOOM ( SID_SVX_START + 882 )
#define SID_ATTR_GRAF_CROP ( SID_SVX_START + 883 )
#define SID_ATTR_GRAF_FRMSIZE ( SID_SVX_START + 884 )
#define SID_ATTR_GRAF_FRMSIZE_PERCENT ( SID_SVX_START + 885 )
#define SID_ATTR_GRAF_GRAPHIC ( SID_SVX_START + 886 )
#define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_VERTICAL
-
-// CAUTION! Range <887 .. 903> used by EditEngine (!)
-
-// CAUTION! Range <905 .. 905> used by EditEngine (!)
-
#define SID_DRAW_CAPTION_VERTICAL ( SID_SVX_START + 906 )
#define SID_TEXTDIRECTION_LEFT_TO_RIGHT ( SID_SVX_START + 907 )
#define SID_TEXTDIRECTION_TOP_TO_BOTTOM ( SID_SVX_START + 908 )
-
-// CAUTION! Range <910 .. 911> used by EditEngine (!)
-
#define SID_TRANSLITERATE_UPPER ( SID_SVX_START + 912 )
#define SID_TRANSLITERATE_LOWER ( SID_SVX_START + 913 )
#define SID_TRANSLITERATE_HALFWIDTH ( SID_SVX_START + 914 )
@@ -764,15 +725,10 @@
#define SID_TRANSLITERATE_HIRAGANA ( SID_SVX_START + 916 )
#define SID_TRANSLITERATE_KATAGANA ( SID_SVX_START + 917 )
#define SID_MN_SUB_TRANSLITERATE ( SID_SVX_START + 918 )
-
-// CAUTION! Range <919 .. 920> used by EditEngine (!)
-
#define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 )
#define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 )
#define SID_GETREDOSTRINGS ( SID_SVX_START + 924 )
-// CAUTION! Range <925 .. 925> used by EditEngine (!)
-
#define SID_INSERT_IMAGECONTROL ( SID_SVX_START + 926 )
#define SID_INSERT_PROGRESSBAR ( SID_SVX_START + 927 )
#define SID_INSERT_HFIXEDLINE ( SID_SVX_START + 928 )
@@ -790,18 +746,9 @@
#define SID_INSERT_PATTERNFIELD ( SID_SVX_START + 941 )
#define SID_INSERT_FILECONTROL ( SID_SVX_START + 942 )
#define SID_SHOW_PROPERTYBROWSER ( SID_SVX_START + 943 )
-
-// CAUTION! Range <944 .. 945> used by EditEngine (!)
-
#define SID_ATTR_TABSTOP_VERTICAL ( SID_SVX_START + 946 )
-
-// CAUTION! Range <947 .. 947> used by EditEngine (!)
-
#define SID_RULER_BORDERS_VERTICAL ( SID_SVX_START + 948 )
#define SID_ATTR_ALIGN_ASIANVERTICAL ( SID_SVX_START + 949 )
-
-// CAUTION! Range <950 .. 951> used by EditEngine (!)
-
#define SID_RULER_TEXT_RIGHT_TO_LEFT ( SID_SVX_START + 952 )
#define SID_ATTR_HDFT_DYNAMIC_SPACING ( SID_SVX_START + 953 )
#define SID_ATTR_NUMBERFORMAT_ADD_AUTO ( SID_SVX_START + 954 )
@@ -839,16 +786,10 @@
#define SID_FONTWORK_KERN_CHARACTER_PAIRS ( SID_SVX_START + 986 )
#define SID_DRAW_FONTWORK ( SID_SVX_START + 987 )
#define SID_DRAW_FONTWORK_VERTICAL ( SID_SVX_START + 988 )
-
-// CAUTION! Range <989 .. 989> used by EditEngine (!)
-
#define SID_ATTR_BORDER_CONNECT ( SID_SVX_START + 990 )
#define SID_SW_FOLLOW_TEXT_FLOW ( SID_SVX_START + 991 ) /* #i18732# - slot-id for new option IsFollowingTextFlow' */
#define SID_RULER_ROWS ( SID_SVX_START + 992 )
#define SID_RULER_ROWS_VERTICAL ( SID_SVX_START + 993 )
-
-// CAUTION! Range <994 .. 998> used by EditEngine (!)
-
#define SID_ATTR_TRANSFORM_HORI_POSITION ( SID_SVX_START + 999 )
#define SID_ATTR_TRANSFORM_VERT_POSITION ( SID_SVX_START + 1000 )
#define SID_SHOW_ITEMBROWSER ( SID_SVX_START + 1001 )
@@ -994,16 +935,15 @@
#define FN_SVX_SET_NUMBER ( SID_SVX_START + 1136 )
#define FN_SVX_SET_BULLET ( SID_SVX_START + 1137 )
+#define SID_SW_ATTR_FILL_STYLE ( SID_SVX_START + 1138 )
+#define SID_SW_ATTR_FILL_GRADIENT ( SID_SVX_START + 1139 )
#define SID_ATTR_BORDER_STYLES ( SID_SVX_START + 1140 )
#define SID_ATTR_BORDER_DEFAULT_WIDTH ( SID_SVX_START + 1141 )
-// 1142 is used by editeng (SID_ATTR_CHAR_GRABBAG)
-//UUUU
-#define SID_OFFER_IMPORT ( SID_SVX_START + 1143 )
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE (SID_OFFER_IMPORT + 1)
+#define SID_SVX_FIRSTFREE (SID_ATTR_BORDER_DEFAULT_WIDTH + 1)
// Overflow check for slot IDs
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 94d358c12a36..b6e2dc2d7e69 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -249,19 +249,19 @@
FILL_PROPERTIES_DEFAULTS \
{ OUString(UNO_NAME_FILLBACKGROUND), XATTR_FILLBACKGROUND , ::getBooleanCppuType(), 0, 0}, \
{ OUString(UNO_NAME_FILLBITMAP), XATTR_FILLBITMAP , ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0) , 0, MID_BITMAP}, \
- { OUString(UNO_NAME_FILLBITMAPNAME), XATTR_FILLBITMAP , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_FILLBITMAPURL), XATTR_FILLBITMAP , ::cppu::UnoType<OUString>::get(), 0, MID_GRAFURL }, \
- { OUString(UNO_NAME_FILLGRADIENTSTEPCOUNT), XATTR_GRADIENTSTEPCOUNT , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
- { OUString(UNO_NAME_FILLGRADIENT), XATTR_FILLGRADIENT , ::cppu::UnoType<com::sun::star::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \
- { OUString(UNO_NAME_FILLGRADIENTNAME), XATTR_FILLGRADIENT , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_FILLHATCH), XATTR_FILLHATCH , ::cppu::UnoType<com::sun::star::drawing::Hatch>::get(), 0, MID_FILLHATCH}, \
- { OUString(UNO_NAME_FILLHATCHNAME), XATTR_FILLHATCH , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_FILLSTYLE), XATTR_FILLSTYLE , ::cppu::UnoType<com::sun::star::drawing::FillStyle>::get() , 0, 0}, \
- { OUString(UNO_NAME_FILL_TRANSPARENCE), XATTR_FILLTRANSPARENCE, ::cppu::UnoType<sal_Int16>::get() , 0, 0}, \
- { OUString(UNO_NAME_FILLTRANSPARENCEGRADIENT), XATTR_FILLFLOATTRANSPARENCE, ::cppu::UnoType<com::sun::star::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \
- { OUString(UNO_NAME_FILLTRANSPARENCEGRADIENTNAME), XATTR_FILLFLOATTRANSPARENCE, ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_FILLCOLOR_2), XATTR_SECONDARYFILLCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(UNO_NAME_GRAPHIC_GRAPHICCROP), SDRATTR_GRAFCROP , ::cppu::UnoType<com::sun::star::text::GraphicCrop>::get(), 0, 0 },
+ { OUString("FillBitmapName"), XATTR_FILLBITMAP , ::getCppuType((const OUString*)0), 0, MID_NAME }, \
+ { OUString("FillBitmapURL"), XATTR_FILLBITMAP , ::getCppuType((const OUString*)0), 0, MID_GRAFURL }, \
+ { OUString("FillGradientStepCount"), XATTR_GRADIENTSTEPCOUNT , ::getCppuType((const sal_Int16*)0), 0, 0}, \
+ { OUString(UNO_NAME_FILLGRADIENT), XATTR_FILLGRADIENT , ::getCppuType((const ::com::sun::star::awt::Gradient*)0), 0, MID_FILLGRADIENT}, \
+ { OUString("FillGradientName"), XATTR_FILLGRADIENT , ::getCppuType((const OUString*)0), 0, MID_NAME }, \
+ { OUString(UNO_NAME_FILLHATCH), XATTR_FILLHATCH , ::getCppuType((const ::com::sun::star::drawing::Hatch*)0), 0, MID_FILLHATCH}, \
+ { OUString("FillHatchName"), XATTR_FILLHATCH , ::getCppuType((const OUString*)0), 0, MID_NAME }, \
+ { OUString(UNO_NAME_FILLSTYLE), XATTR_FILLSTYLE , ::getCppuType((const ::com::sun::star::drawing::FillStyle*)0) , 0, 0}, \
+ { OUString(UNO_NAME_FILL_TRANSPARENCE), XATTR_FILLTRANSPARENCE, ::getCppuType((const sal_Int16*)0) , 0, 0}, \
+ { OUString("FillTransparenceGradient"), XATTR_FILLFLOATTRANSPARENCE, ::getCppuType((const ::com::sun::star::awt::Gradient*)0), 0, MID_FILLGRADIENT}, \
+ { OUString("FillTransparenceGradientName"), XATTR_FILLFLOATTRANSPARENCE, ::getCppuType((const OUString*)0), 0, MID_NAME }, \
+ { OUString(UNO_NAME_FILLCOLOR_2), XATTR_SECONDARYFILLCOLOR, ::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { OUString(UNO_NAME_GRAPHIC_GRAPHICCROP), SDRATTR_GRAFCROP , ::getCppuType((const ::com::sun::star::text::GraphicCrop*)0), 0, 0 },
#define EDGERADIUS_PROPERTIES \
{ OUString(UNO_NAME_EDGERADIUS), SDRATTR_ECKENRADIUS , ::cppu::UnoType<sal_Int32>::get() , 0, SFX_METRIC_ITEM},
diff --git a/include/svx/xfillit0.hxx b/include/svx/xfillit0.hxx
index 51edf4e2e7b0..8c24fcb386ce 100644
--- a/include/svx/xfillit0.hxx
+++ b/include/svx/xfillit0.hxx
@@ -35,6 +35,7 @@ class SVX_DLLPUBLIC XFillStyleItem : public SfxEnumItem
public:
TYPEINFO_OVERRIDE();
XFillStyleItem(XFillStyle = XFILL_SOLID);
+ XFillStyleItem(XFillStyle, sal_uInt16 nWhich);
XFillStyleItem(SvStream& rIn);
virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
diff --git a/include/svx/xgrad.hxx b/include/svx/xgrad.hxx
index b97d0c0d0a6d..30c1741f31eb 100644
--- a/include/svx/xgrad.hxx
+++ b/include/svx/xgrad.hxx
@@ -75,6 +75,7 @@ public:
sal_uInt16 GetStartIntens() const { return nIntensStart; }
sal_uInt16 GetEndIntens() const { return nIntensEnd; }
sal_uInt16 GetSteps() const { return nStepCount; }
+ Gradient VclGradient() const;
};
#endif
diff --git a/include/xmloff/XMLShapeStyleContext.hxx b/include/xmloff/XMLShapeStyleContext.hxx
index a93181a5d71a..89662c09be30 100644
--- a/include/xmloff/XMLShapeStyleContext.hxx
+++ b/include/xmloff/XMLShapeStyleContext.hxx
@@ -36,8 +36,6 @@ protected:
OUString m_sControlDataStyleName;
OUString m_sListStyleName;
bool m_bIsNumRuleAlreadyConverted;
- //UUUU
- bool m_bIsFillStyleAlreadyConverted;
protected:
virtual void SetAttribute( sal_uInt16 nPrefixKey,
diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx
index 2de9987d5c92..dc8de7026395 100644
--- a/include/xmloff/txtprmap.hxx
+++ b/include/xmloff/txtprmap.hxx
@@ -198,14 +198,6 @@
#define CTF_RELHEIGHTREL (XML_TEXT_CTF_START + 169)
-//UUUU
-#define CTF_SW_REPEAT_OFFSET_X (XML_TEXT_CTF_START + 170)
-#define CTF_SW_REPEAT_OFFSET_Y (XML_TEXT_CTF_START + 171)
-#define CTF_SW_FILLGRADIENTNAME (XML_TEXT_CTF_START + 172)
-#define CTF_SW_FILLHATCHNAME (XML_TEXT_CTF_START + 173)
-#define CTF_SW_FILLBITMAPNAME (XML_TEXT_CTF_START + 174)
-#define CTF_SW_FILLTRANSNAME (XML_TEXT_CTF_START + 175)
-
#define TEXT_PROP_MAP_TEXT 0
#define TEXT_PROP_MAP_PARA 1
#define TEXT_PROP_MAP_FRAME 2
diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx
index 4226166993b7..5511bf1abea2 100644
--- a/include/xmloff/xmltypes.hxx
+++ b/include/xmloff/xmltypes.hxx
@@ -272,20 +272,12 @@
#define XML_TYPE_TEXT_OVERLINE_COLOR (XML_TEXT_TYPES_START + 112)
#define XML_TYPE_TEXT_OVERLINE_HASCOLOR (XML_TEXT_TYPES_START + 113)
#define XML_TYPE_BOOL_FALSE (XML_TEXT_TYPES_START + 114)
+#define XML_TYPE_FILLSTYLE (XML_TEXT_TYPES_START + 115)
#define XML_TYPE_CHAR_SCRIPT (XML_TEXT_TYPES_START + 116)
#define XML_TYPE_CHAR_RFC_LANGUAGE_TAG (XML_TEXT_TYPES_START + 117)
#define XML_TYPE_VERTICAL_ALIGN (XML_TEXT_TYPES_START + 118)
-//UUUU
-#define XML_SW_TYPE_FILLSTYLE (XML_TEXT_TYPES_START + 119)
-#define XML_SW_TYPE_FILLBITMAPSIZE (XML_TEXT_TYPES_START + 120)
-#define XML_SW_TYPE_LOGICAL_SIZE (XML_TEXT_TYPES_START + 121)
-#define XML_SW_TYPE_BITMAP_REFPOINT (XML_TEXT_TYPES_START + 122)
-#define XML_SW_TYPE_BITMAP_MODE (XML_TEXT_TYPES_START + 123)
-#define XML_SW_TYPE_BITMAPREPOFFSETX (XML_TEXT_TYPES_START + 124)
-#define XML_SW_TYPE_BITMAPREPOFFSETY (XML_TEXT_TYPES_START + 125)
-
#define XML_SCH_TYPES_START (0x4 << XML_TYPE_APP_SHIFT)
#define XML_PM_TYPES_START (0x5 << XML_TYPE_APP_SHIFT) // page master
#define XML_DB_TYPES_START (0x6 << XML_TYPE_APP_SHIFT)
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 0b3cf4d44545..a269c93e2a23 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -320,13 +320,9 @@
Calc, OLE, hidden ;
DrawImpress, 3DObject, visible ;
DrawImpress, Draw, visible ;
- DrawImpress, Graphic, hidden ;
DrawImpress, TextObject, hidden ;
DrawImpress, OLE, hidden ;
WriterVariants, Draw, visible ;
- Writer, Graphic, hidden ;
- Writer, OLE, hidden ;
- Writer, Frame, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 7533d843aee0..ccb588648925 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -766,7 +766,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
{ // want the dialog to be destroyed before our set
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr<AbstractSvxAreaTabDialog> pDialog(pFact->CreateSvxAreaTabDialog( pParent,pDescriptor.get(),pModel.get(), true ));
+ ::std::auto_ptr<AbstractSvxAreaTabDialog> pDialog(pFact->CreateSvxAreaTabDialog( pParent,pDescriptor.get(),pModel.get() ));
SAL_WNODEPRECATED_DECLARATIONS_POP
if ( ( bSuccess = ( RET_OK == pDialog->Execute() ) ) )
lcl_fillItemsToShape(_xShape,*pDialog->GetOutputItemSet());
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 3cc796f5e057..cae786fba005 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -421,7 +421,7 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
boost::scoped_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(
pViewData->GetDialogParent(), &aNewAttr,
- pViewData->GetDocument()->GetDrawLayer(), true));
+ pViewData->GetDocument()->GetDrawLayer(), pView));
if ( nTabPage != 0xffff )
pDlg->SetCurPageId( nTabPage );
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index a6da6484bcb8..7567a51fc4b3 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -65,7 +65,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
boost::scoped_ptr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( NULL,
&aNewAttr,
mpDoc,
- true) : 0);
+ mpView) : 0);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
mpView->SetAttributes (*(pDlg->GetOutputItemSet ()));
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 7cdc84401841..9cd44d4ee1dc 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1159,7 +1159,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
*/
{
- sal_uInt16 nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 const nId = pTabCtrl->GetCurPageId();
DBG_ASSERT( pImpl->aData.size(), "no Pages registered" );
SFX_APP();
@@ -1167,19 +1167,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
// Tab Page schon da?
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
Data_Impl* pDataObject = Find( pImpl->aData, nId );
-
- //UUUU fallback to 1st page when requested one does not exist
- if(!pDataObject && pTabCtrl->GetPageCount())
- {
- pTabCtrl->SetCurPageId(pTabCtrl->GetPageId(0));
- nId = pTabCtrl->GetCurPageId();
- pTabPage = dynamic_cast< SfxTabPage* >(pTabCtrl->GetTabPage(nId));
- pDataObject = Find(pImpl->aData, nId);
- }
-
- assert(pDataObject); //Id not known
- if (!pDataObject)
- return 0;
+ DBG_ASSERT( pDataObject, "Id not known" );
// Create TabPage if possible:
if ( !pTabPage )
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 4b3c13143247..3f4cfe8bdea7 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -581,10 +581,6 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
{
--m_pData->pActUndoArray->nCurUndoAction;
}
- else
- {
- OSL_ENSURE(false, "CurrentUndoAction going negative (!)");
- }
// fdo#66071 invalidate the current empty mark when removing
--m_pData->mnEmptyMark;
}
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 0ace4bf3ea66..965fbd046ced 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1383,7 +1383,7 @@ void GradientLB::Modify( const XGradientEntry& rEntry, sal_Int32 nPos, const Bit
void GradientLB::SelectEntryByList( const XGradientListRef &pList, const OUString& rStr,
const XGradient& rGradient, sal_uInt16 nDist )
{
- long nCount = pList.get() ? pList->Count() : 0;
+ long nCount = pList->Count();
XGradientEntry* pEntry;
bool bFound = false;
OUString aStr;
diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
index a9893045d222..95c0e2c3bab2 100644
--- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
+++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
@@ -68,9 +68,11 @@ namespace sdr
rOwnerPage.GetWdt() - rOwnerPage.GetRgtBorder(),
rOwnerPage.GetHgt() - rOwnerPage.GetLwrBorder());
const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange));
+ const basegfx::B2DHomMatrix aEmptyTransform;
const drawinglayer::primitive2d::Primitive2DReference xReference(
drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
basegfx::B2DPolyPolygon(aInnerPolgon),
+ aEmptyTransform,
aFill,
drawinglayer::attribute::FillGradientAttribute()));
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 4dfdf337955b..7b04c2057ad4 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -179,6 +179,7 @@ namespace sdr
// if there is shadow, create the specialized shadow primitive
xSpecialShadow = drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
aClippedShadow,
+ basegfx::B2DHomMatrix(),
aFill,
drawinglayer::attribute::FillGradientAttribute());
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index ce25218f3354..7269fb4c93d2 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -242,9 +242,11 @@ namespace sdr
rPage.GetLftBorder(), rPage.GetUppBorder(),
rPage.GetWdt() - rPage.GetRgtBorder(), rPage.GetHgt() - rPage.GetLwrBorder());
const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange));
+ const basegfx::B2DHomMatrix aEmptyTransform;
const drawinglayer::primitive2d::Primitive2DReference xReference(
drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
basegfx::B2DPolyPolygon(aInnerPolgon),
+ aEmptyTransform,
aFill,
drawinglayer::attribute::FillGradientAttribute()));
diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
index 33c3f37cde41..fc7d98e80b48 100644
--- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
@@ -56,12 +56,10 @@ namespace drawinglayer
}
else
{
- basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -84,20 +82,17 @@ namespace drawinglayer
}
else
{
- basegfx::B2DPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ aUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
- aTransformed = getTail();
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ getTail(),
+ getTransform(),
getSdrLFSTAttribute().getLine(),
getSdrLFSTAttribute().getLineStartEnd()));
}
diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
index b2d5c778a6f4..5758f74d7db9 100644
--- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
@@ -53,6 +53,7 @@ namespace drawinglayer
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
getUnitPolygon(),
+ basegfx::B2DHomMatrix(),
getSdrLSTAttribute().getLine(),
getSdrLSTAttribute().getLineStartEnd()));
}
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index a12ff99bd98b..798ba0151af2 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -56,62 +56,32 @@ namespace drawinglayer
namespace primitive2d
{
Primitive2DReference createPolyPolygonFillPrimitive(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::SdrFillAttribute& rFill,
- const attribute::FillGradientAttribute& rFillGradient)
- {
- // when we have no given definition range, use the range of the given geometry
- // also for definition (simplest case)
- const basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon));
-
- return createPolyPolygonFillPrimitive(
- rPolyPolygon,
- aRange,
- rFill,
- rFillGradient);
- }
-
- Primitive2DReference createPolyPolygonFillPrimitive(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrFillAttribute& rFill,
const attribute::FillGradientAttribute& rFillGradient)
{
- if(basegfx::fTools::moreOrEqual(rFill.getTransparence(), 1.0))
- {
- return Primitive2DReference();
- }
-
// prepare fully scaled polygon
+ basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon);
+ aScaledPolyPolygon.transform(rObjectTransform);
BasePrimitive2D* pNewFillPrimitive = 0;
if(!rFill.getGradient().isDefault())
{
- pNewFillPrimitive = new PolyPolygonGradientPrimitive2D(
- rPolyPolygon,
- rDefinitionRange,
- rFill.getGradient());
+ pNewFillPrimitive = new PolyPolygonGradientPrimitive2D(aScaledPolyPolygon, rFill.getGradient());
}
else if(!rFill.getHatch().isDefault())
{
- pNewFillPrimitive = new PolyPolygonHatchPrimitive2D(
- rPolyPolygon,
- rDefinitionRange,
- rFill.getColor(),
- rFill.getHatch());
+ pNewFillPrimitive = new PolyPolygonHatchPrimitive2D(aScaledPolyPolygon, rFill.getColor(), rFill.getHatch());
}
else if(!rFill.getFillGraphic().isDefault())
{
- pNewFillPrimitive = new PolyPolygonGraphicPrimitive2D(
- rPolyPolygon,
- rDefinitionRange,
- rFill.getFillGraphic().createFillGraphicAttribute(rDefinitionRange));
+ const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon));
+ pNewFillPrimitive = new PolyPolygonGraphicPrimitive2D(aScaledPolyPolygon, rFill.getFillGraphic().createFillGraphicAttribute(aRange));
}
else
{
- pNewFillPrimitive = new PolyPolygonColorPrimitive2D(
- rPolyPolygon,
- rFill.getColor());
+ pNewFillPrimitive = new PolyPolygonColorPrimitive2D(aScaledPolyPolygon, rFill.getColor());
}
if(0.0 != rFill.getTransparence())
@@ -129,7 +99,7 @@ namespace drawinglayer
// create FillGradientPrimitive2D for transparence and add to new sequence
// fillGradientPrimitive is enough here (compared to PolyPolygonGradientPrimitive2D) since float transparence will be masked anyways
- const basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon));
+ const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon));
const Primitive2DReference xRefB(new FillGradientPrimitive2D(aRange, rFillGradient));
const Primitive2DSequence aAlpha(&xRefB, 1L);
@@ -144,27 +114,32 @@ namespace drawinglayer
}
Primitive2DReference createPolygonLinePrimitive(
- const basegfx::B2DPolygon& rPolygon,
+ const basegfx::B2DPolygon& rUnitPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrLineAttribute& rLine,
const attribute::SdrLineStartEndAttribute& rStroke)
{
+ // prepare fully scaled polygon
+ basegfx::B2DPolygon aScaledPolygon(rUnitPolygon);
+ aScaledPolygon.transform(rObjectTransform);
+
// create line and stroke attribute
const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin(), rLine.getCap());
const attribute::StrokeAttribute aStrokeAttribute(rLine.getDotDashArray(), rLine.getFullDotDashLen());
BasePrimitive2D* pNewLinePrimitive = 0L;
- if(!rPolygon.isClosed() && !rStroke.isDefault())
+ if(!rUnitPolygon.isClosed() && !rStroke.isDefault())
{
attribute::LineStartEndAttribute aStart(rStroke.getStartWidth(), rStroke.getStartPolyPolygon(), rStroke.isStartCentered());
attribute::LineStartEndAttribute aEnd(rStroke.getEndWidth(), rStroke.getEndPolyPolygon(), rStroke.isEndCentered());
// create data
- pNewLinePrimitive = new PolygonStrokeArrowPrimitive2D(rPolygon, aLineAttribute, aStrokeAttribute, aStart, aEnd);
+ pNewLinePrimitive = new PolygonStrokeArrowPrimitive2D(aScaledPolygon, aLineAttribute, aStrokeAttribute, aStart, aEnd);
}
else
{
// create data
- pNewLinePrimitive = new PolygonStrokePrimitive2D(rPolygon, aLineAttribute, aStrokeAttribute);
+ pNewLinePrimitive = new PolygonStrokePrimitive2D(aScaledPolygon, aLineAttribute, aStrokeAttribute);
}
if(0.0 != rLine.getTransparence())
diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index 19223a0abc44..fc845ee14a29 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -57,12 +57,10 @@ namespace drawinglayer
// add fill
if(!getSdrLFSTAttribute().getFill().isDefault())
{
- basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -79,12 +77,10 @@ namespace drawinglayer
}
else
{
- basegfx::B2DPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ aUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
@@ -177,12 +173,10 @@ namespace drawinglayer
// add fill
if(!getSdrLFSTAttribute().getFill().isDefault() && aUnitOutline.isClosed())
{
- basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -199,12 +193,10 @@ namespace drawinglayer
}
else
{
- basegfx::B2DPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ aUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
getSdrLFSTAttribute().getLineStartEnd()));
}
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index f5bce280e92a..df2b5f8c1877 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -42,12 +42,10 @@ namespace drawinglayer
// add fill, but only when graphic ist transparent
if(!getSdrLFSTAttribute().getFill().isDefault() && isTransparent())
{
- basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -84,21 +82,18 @@ namespace drawinglayer
const basegfx::B2DRange aExpandedRange(-fScaleX, -fScaleY, 1.0 + fScaleX, 1.0 + fScaleY);
basegfx::B2DPolygon aExpandedUnitOutline(basegfx::tools::createPolygonFromRect(aExpandedRange));
- aExpandedUnitOutline.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
aExpandedUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
else
{
- basegfx::B2DPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ aUnitOutline, getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index ea9ae60597b6..cf01e7f68bef 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -52,12 +52,12 @@ namespace drawinglayer
aPolygon.append(rStart);
aPolygon.append(rEnd);
- aPolygon.transform(rObjectMatrix);
if(rLineStartEnd.isDefault() || (!bLeftActive && !bRightActive))
{
return createPolygonLinePrimitive(
aPolygon,
+ rObjectMatrix,
rLineAttribute,
attribute::SdrLineStartEndAttribute());
}
@@ -66,6 +66,7 @@ namespace drawinglayer
{
return createPolygonLinePrimitive(
aPolygon,
+ rObjectMatrix,
rLineAttribute,
rLineStartEnd);
}
@@ -77,10 +78,7 @@ namespace drawinglayer
bLeftActive && rLineStartEnd.isStartActive(), bRightActive && rLineStartEnd.isEndActive(),
bLeftActive && rLineStartEnd.isStartCentered(), bRightActive && rLineStartEnd.isEndCentered());
- return createPolygonLinePrimitive(
- aPolygon,
- rLineAttribute,
- aLineStartEnd);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, aLineStartEnd);
}
Primitive2DSequence SdrMeasurePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const
diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
index acc3349a2758..fec204adce53 100644
--- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
@@ -84,12 +84,10 @@ namespace drawinglayer
if(!bBehaveCompatibleToPaintVersion
&& !getSdrLFSTAttribute().getFill().isDefault())
{
- basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -116,21 +114,19 @@ namespace drawinglayer
const basegfx::B2DRange aExpandedRange(-fScaleX, -fScaleY, 1.0 + fScaleX, 1.0 + fScaleY);
basegfx::B2DPolygon aExpandedUnitOutline(basegfx::tools::createPolygonFromRect(aExpandedRange));
- aExpandedUnitOutline.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
aExpandedUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
else
{
- basegfx::B2DPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ aUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index 512098ecf514..3ebe0af33df2 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -44,12 +44,10 @@ namespace drawinglayer
{
// #i108255# no need to use correctOrientations here; target is
// straight visualisation
- basegfx::B2DPolyPolygon aTransformed(getUnitPolyPolygon());
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ getUnitPolyPolygon(),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -70,11 +68,9 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < getUnitPolyPolygon().count(); a++)
{
- basegfx::B2DPolygon aTransformed(getUnitPolyPolygon().getB2DPolygon(a));
-
- aTransformed.transform(getTransform());
aTemp[a] = createPolygonLinePrimitive(
- aTransformed,
+ getUnitPolyPolygon().getB2DPolygon(a),
+ getTransform(),
getSdrLFSTAttribute().getLine(),
getSdrLFSTAttribute().getLineStartEnd());
}
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 0822d7cf0018..801851db6ad9 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -48,12 +48,10 @@ namespace drawinglayer
// add fill
if(!getSdrLFSTAttribute().getFill().isDefault())
{
- basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
@@ -71,12 +69,10 @@ namespace drawinglayer
// add line
if(!getSdrLFSTAttribute().getLine().isDefault())
{
- basegfx::B2DPolygon aTransformed(aUnitOutline);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolygonLinePrimitive(
- aTransformed,
+ aUnitOutline,
+ getTransform(),
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 8124d7562de8..63fe7bfa061e 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -931,6 +931,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragMethod::AddConnectorOverla
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
aRetval, drawinglayer::primitive2d::createPolygonLinePrimitive(
aEdgePolygon,
+ basegfx::B2DHomMatrix(),
aLine,
aLineStartEnd));
}
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 08e282578f28..0abbd68c6389 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -92,12 +92,10 @@ namespace drawinglayer
// add fill
if(!getSdrFTAttribute().getFill().isDefault())
{
- basegfx::B2DPolyPolygon aTransformed(aUnitPolyPolygon);
-
- aTransformed.transform(getTransform());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aTransformed,
+ aUnitPolyPolygon,
+ getTransform(),
getSdrFTAttribute().getFill(),
getSdrFTAttribute().getFillFloatTransGradient()));
}
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 20c60e1387e2..b617c8d3fe7f 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2247,6 +2247,11 @@ XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) :
{
}
+XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle, sal_uInt16 nWhich_) :
+ SfxEnumItem(nWhich_, sal::static_int_cast< sal_uInt16 >(eFillStyle))
+{
+}
+
XFillStyleItem::XFillStyleItem(SvStream& rIn) :
SfxEnumItem(XATTR_FILLSTYLE, rIn)
{
@@ -2511,6 +2516,22 @@ bool XGradient::operator==(const XGradient& rGradient) const
nStepCount == rGradient.nStepCount );
}
+Gradient XGradient::VclGradient() const
+{
+ Gradient aGradient;
+ aGradient.SetStyle((GradientStyle)eStyle);
+ aGradient.SetStartColor(aStartColor);
+ aGradient.SetEndColor(aEndColor);
+ aGradient.SetAngle(nAngle);
+ aGradient.SetBorder(nBorder);
+ aGradient.SetOfsX(nOfsX);
+ aGradient.SetOfsY(nOfsY);
+ aGradient.SetStartIntensity(nIntensStart);
+ aGradient.SetEndIntensity(nIntensEnd);
+ aGradient.SetSteps(nStepCount);
+ return aGradient;
+}
+
// class XFillGradientItem
TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index ec4e021bb1ee..d10fbcff6e4d 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -285,7 +285,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/layout/anchoreddrawobject \
sw/source/core/layout/anchoredobject \
sw/source/core/layout/atrfrm \
- sw/source/core/layout/fillattributes \
sw/source/core/layout/calcmove \
sw/source/core/layout/colfrm \
sw/source/core/layout/dbg_lay \
@@ -453,7 +452,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/unocore/unoparagraph \
sw/source/core/unocore/unoport \
sw/source/core/unocore/unoportenum \
- sw/source/core/unocore/unobrushitemhelper \
sw/source/core/unocore/unoredline \
sw/source/core/unocore/unoredlines \
sw/source/core/unocore/unorefmk \
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 4e833d8f66fe..f3cc3ba29b33 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1025,13 +1025,6 @@ public:
bool bDelRedlines = true,
bool bCopyFlyAtFly = false ) const;
- //UUUU Helper that checks for unique items for DrawingLayer items of type NameOrIndex
- // and evtl. corrects that items to ensure unique names for that type. This call may
- // modify/correct entries inside of the given SfxItemSet, and it will apply a name to
- // the items in question (what is essential to make the named slots associated with
- // these items work for the UNO API and thus e.g. for ODF im/export)
- void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet);
-
bool SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet );
bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
diff --git a/sw/inc/fillattributes.hxx b/sw/inc/fillattributes.hxx
deleted file mode 100644
index 05624c4a8de5..000000000000
--- a/sw/inc/fillattributes.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- 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_SW_INC_FILLATTRIBUTES_HXX
-#define INCLUDED_SW_INC_FILLATTRIBUTES_HXX
-
-#include <drawinglayer/attribute/fillgradientattribute.hxx>
-#include <drawinglayer/attribute/sdrfillattribute.hxx>
-#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <boost/shared_ptr.hpp>
-
-//////////////////////////////////////////////////////////////////////////////
-
-class Color;
-class SfxItemSet;
-class FillAttributes
-{
-private:
- basegfx::B2DRange maLastPaintRange;
- basegfx::B2DRange maLastDefineRange;
- boost::shared_ptr< drawinglayer::attribute::SdrFillAttribute > maFillAttribute;
- boost::shared_ptr< drawinglayer::attribute::FillGradientAttribute > maFillGradientAttribute;
- drawinglayer::primitive2d::Primitive2DSequence maPrimitives;
-
- void createPrimitive2DSequence(
- const basegfx::B2DRange& rPaintRange,
- const basegfx::B2DRange& rDefineRange);
-
-protected:
-public:
- FillAttributes(const Color& rColor);
- FillAttributes(const SfxItemSet& rSet);
- ~FillAttributes();
-
- bool isUsed() const;
- bool hasSdrFillAttribute() const { return maFillAttribute.get(); }
- bool hasFillGradientAttribute() const { return maFillGradientAttribute.get(); }
- bool isTransparent() const;
-
- const drawinglayer::attribute::SdrFillAttribute& getFillAttribute() const;
- const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence(
- const basegfx::B2DRange& rPaintRange,
- const basegfx::B2DRange& rDefineRange) const;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-typedef boost::shared_ptr< FillAttributes > FillAttributesPtr;
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif // INCLUDED_SW_INC_FILLATTRIBUTES_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index 95aa7bf81ea0..4fb68062bd62 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -25,8 +25,6 @@
#include <calbck.hxx>
#include <hintids.hxx>
#include <boost/shared_ptr.hpp>
-//UUUU
-#include <fillattributes.hxx>
class IDocumentSettingAccess;
class IDocumentDrawModelAccess;
@@ -89,11 +87,9 @@ public:
bool SetDerivedFrom(SwFmt *pDerivedFrom = 0);
/// If bInParents is FALSE, search only in this format for attribute.
- //UUUUinline
- const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich,
- bool bInParents = true ) const;
- //UUUUinline
- SfxItemState GetItemState( sal_uInt16 nWhich, bool bSrchInParent = true,
+ inline const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents = true ) const;
+ inline SfxItemState GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent = true,
const SfxPoolItem **ppItem = 0 ) const;
virtual bool SetFmtAttr( const SfxPoolItem& rAttr );
virtual bool SetFmtAttr( const SfxItemSet& rSet );
@@ -240,10 +236,7 @@ public:
inline const SwFmtVertOrient &GetVertOrient( bool = true ) const;
inline const SvxBoxItem &GetBox( bool = true ) const;
inline const SvxFmtKeepItem &GetKeep( bool = true ) const;
-
- //UUUU
- const SvxBrushItem& GetBackground( bool = true ) const;
-
+ inline const SvxBrushItem &GetBackground( bool = true ) const;
inline const SvxShadowItem &GetShadow( bool = true ) const;
inline const SwFmtPageDesc &GetPageDesc( bool = true ) const;
inline const SvxFmtBreakItem &GetBreak( bool = true ) const;
@@ -326,18 +319,15 @@ public:
@return false, default implementation
*/
virtual bool IsShadowTransparent() const;
-
- //UUUU
- virtual FillAttributesPtr getFillAttributes() const;
};
// --------------- inline Implementations ------------------------
-//UUUUinline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich,
-//UUUU bool bInParents ) const
-//UUUU{
-//UUUU return aSet.Get( nWhich, bInParents );
-//UUUU}
+inline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
+{
+ return aSet.Get( nWhich, bInParents );
+}
inline void SwFmt::SetName( const sal_Char* pNewName,
bool bBroadcast )
@@ -345,11 +335,11 @@ inline void SwFmt::SetName( const sal_Char* pNewName,
SetName(OUString::createFromAscii(pNewName), bBroadcast);
}
-//UUUUinline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, bool bSrchInParent,
-//UUUU const SfxPoolItem **ppItem ) const
-//UUUU{
-//UUUU return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
-//UUUU}
+inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent,
+ const SfxPoolItem **ppItem ) const
+{
+ return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
+}
#endif // INCLUDED_SW_INC_FORMAT_HXX
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
index adde000b9c84..6db239b36c40 100644
--- a/sw/inc/frmatr.hxx
+++ b/sw/inc/frmatr.hxx
@@ -43,6 +43,10 @@ inline const SvxFmtKeepItem &SwAttrSet::GetKeep(bool bInP) const
{ return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
inline const SvxBrushItem &SwAttrSet::GetBackground(bool bInP) const
{ return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
+inline const XFillStyleItem &SwAttrSet::GetFillStyle(bool bInP) const
+ { return (const XFillStyleItem&)Get( RES_FILL_STYLE,bInP); }
+inline const XFillGradientItem &SwAttrSet::GetFillGradient(bool bInP) const
+ { return (const XFillGradientItem&)Get( RES_FILL_GRADIENT,bInP); }
inline const SvxShadowItem &SwAttrSet::GetShadow(bool bInP) const
{ return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
inline const SvxFmtBreakItem &SwAttrSet::GetBreak(bool bInP) const
@@ -71,8 +75,8 @@ inline const SvxBoxItem &SwFmt::GetBox(bool bInP) const
{ return aSet.GetBox(bInP); }
inline const SvxFmtKeepItem &SwFmt::GetKeep(bool bInP) const
{ return aSet.GetKeep(bInP); }
-//UUUUinline const SvxBrushItem &SwFmt::GetBackground(sal_Bool bInP) const
-//UUUU { return aSet.GetBackground(bInP); }
+inline const SvxBrushItem &SwFmt::GetBackground(bool bInP) const
+ { return aSet.GetBackground(bInP); }
inline const SvxShadowItem &SwFmt::GetShadow(bool bInP) const
{ return aSet.GetShadow(bInP); }
inline const SvxFmtBreakItem &SwFmt::GetBreak(bool bInP) const
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 03bda2e96c29..471569bd40e5 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -43,23 +43,20 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt
::com::sun::star::uno::WeakReference<
::com::sun::star::uno::XInterface> m_wXObject;
- //UUUU
- FillAttributesPtr maFillAttributes;
-
protected:
- SwFrmFmt(
- SwAttrPool& rPool,
- const sal_Char* pFmtNm,
- SwFrmFmt *pDrvdFrm,
- sal_uInt16 nFmtWhich = RES_FRMFMT,
- const sal_uInt16* pWhichRange = 0);
-
- SwFrmFmt(
- SwAttrPool& rPool,
- const OUString &rFmtNm,
- SwFrmFmt *pDrvdFrm,
- sal_uInt16 nFmtWhich = RES_FRMFMT,
- const sal_uInt16* pWhichRange = 0);
+ SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
+ : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+ SwFrmFmt( SwAttrPool& rPool, const OUString &rFmtNm,
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
+ : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ) SAL_OVERRIDE;
@@ -133,9 +130,6 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
void RegisterToFormat( SwFmt& rFmt );
-
- //UUUU
- virtual FillAttributesPtr getFillAttributes() const SAL_OVERRIDE;
};
// The FlyFrame-Format
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index e0a668562272..23819823d266 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -230,6 +230,8 @@ RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
RES_AUTO_STYLE, // 125
RES_FRMATR_STYLE_NAME, // 126
RES_FRMATR_CONDITIONAL_STYLE_NAME, // 127
+ RES_FILL_STYLE, // 128
+ RES_FILL_GRADIENT, // 129
RES_FRMATR_GRABBAG, // 130
RES_TEXT_VERT_ADJUST, // 131
RES_FRMATR_END
@@ -280,13 +282,13 @@ RES_UNKNOWNATR_END
enum RES_FMT
{
RES_FMT_BEGIN = RES_UNKNOWNATR_END,
- RES_CHRFMT = RES_FMT_BEGIN, // 144
- RES_FRMFMT, // 145
- RES_FLYFRMFMT, // 146
- RES_TXTFMTCOLL, // 147
- RES_GRFFMTCOLL, // 148
- RES_DRAWFRMFMT, // 149
- RES_CONDTXTFMTCOLL, // 150
+ RES_CHRFMT = RES_FMT_BEGIN,
+ RES_FRMFMT,
+ RES_FLYFRMFMT,
+ RES_TXTFMTCOLL,
+ RES_GRFFMTCOLL,
+ RES_DRAWFRMFMT,
+ RES_CONDTXTFMTCOLL,
RES_FMT_END
};
@@ -294,7 +296,7 @@ RES_FMT_END
enum RES_MSG
{
RES_MSG_BEGIN = RES_FMT_END,
- RES_OBJECTDYING = RES_MSG_BEGIN, // 151
+ RES_OBJECTDYING = RES_MSG_BEGIN,
RES_FMT_CHG,
RES_ATTRSET_CHG,
RES_FRM_SIZECHG,
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index fbd6c6d2e23b..fbdae44a5b83 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -137,12 +137,6 @@ class SwTblBoxValue;
class SwAttrPool : public SfxItemPool
{
-private:
- ///UUUU helpers to add/rmove DrawingLayer ItemPool, used in constructor
- /// and destructor; still isolated to evtl. allow other use later
- void createAndAddSecondaryPools();
- void removeAndDeleteSecondaryPools();
-
friend void _InitCore(); // For creating/deleting of version maps.
friend void _FinitCore();
static sal_uInt16* pVersionMap1;
@@ -278,6 +272,8 @@ public:
inline const SvxBoxItem &GetBox( bool = true ) const;
inline const SvxFmtKeepItem &GetKeep( bool = true ) const;
inline const SvxBrushItem &GetBackground( bool = true ) const;
+ inline const XFillStyleItem &GetFillStyle( bool = true ) const;
+ inline const XFillGradientItem &GetFillGradient( bool = true ) const;
inline const SvxShadowItem &GetShadow( bool = true ) const;
inline const SwFmtPageDesc &GetPageDesc( bool = true ) const;
inline const SvxFmtBreakItem &GetBreak( bool = true ) const;
diff --git a/sw/inc/unobrushitemhelper.hxx b/sw/inc/unobrushitemhelper.hxx
deleted file mode 100644
index fd141e51d248..000000000000
--- a/sw/inc/unobrushitemhelper.hxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- 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_SW_INC_UNOBRUSHITEMHELPER_HXX
-#define INCLUDED_SW_INC_UNOBRUSHITEMHELPER_HXX
-
-#include <swdllapi.h>
-#include <editeng/brushitem.hxx>
-
-namespace sw {
-
-//UUUU helper function definintions for UNO API fallbacks to replace SvxBrushItem
-void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxItemSet& rToSet);
-SW_DLLPUBLIC SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, bool bSearchInParents = true);
-
-} // namespace sw
-
-#endif // INCLUDED_SW_INC_UNOBRUSHITEMHELPER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 7f28bd08cd23..fedcb076b284 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -72,11 +72,6 @@ private:
SwPaM* m_pCopySource;
- ///UUUU helper to check if fill style is set to color or bitmap
- /// and thus formally used SvxBrushItem parts need to be mapped
- /// for backwards compatibility
- bool needToMapFillItemsToSvxBrushItemTypes() const;
-
protected:
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index cdd60de72939..018e028d99ea 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -310,14 +310,6 @@
#define WID_TXTCOL_AUTO_DISTANCE 6
#define WID_TXTCOL_LINE_STYLE 7
-//UUUU This define would need the include of <svx/unoshprp.hxx>, but this ends
-// in a mess; there *are* double used symbols which are used in a #define in
-// editengine and as an enum in sw; these will then collide and lead to severe
-// problems which will be hard to detect at all (e.g. look for UNO_NAME_CHAR_COLOR).
-// More of these are likely, so better use a local define here, but at least the same
-// as in svx/inc/unoshprp.hxx
-#define OWN_ATTR_FILLBMP_MODE (OWN_ATTR_VALUE_START+45)
-
class SwUnoPropertyMapProvider
{
SfxItemPropertyMapEntry const * aMapEntriesArr[PROPERTY_MAP_END];
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 63dfe4abaa32..9c8c7a7a8e66 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -633,34 +633,6 @@
#define UNO_NAME_FRAME_WIDTH_ABSOLUTE "FrameWidthAbsolute"
#define UNO_NAME_FRAME_WIDTH_PERCENT "FrameWidthPercent"
-//UUUU names for FillAttributes from SVX
-#define UNO_NAME_SW_FILLBMP_LOGICAL_SIZE UNO_NAME_FILLBMP_LOGICAL_SIZE
-#define UNO_NAME_SW_FILLBMP_OFFSET_X UNO_NAME_FILLBMP_OFFSET_X
-#define UNO_NAME_SW_FILLBMP_OFFSET_Y UNO_NAME_FILLBMP_OFFSET_Y
-#define UNO_NAME_SW_FILLBMP_POSITION_OFFSET_X UNO_NAME_FILLBMP_POSITION_OFFSET_X
-#define UNO_NAME_SW_FILLBMP_POSITION_OFFSET_Y UNO_NAME_FILLBMP_POSITION_OFFSET_Y
-#define UNO_NAME_SW_FILLBMP_RECTANGLE_POINT UNO_NAME_FILLBMP_RECTANGLE_POINT
-#define UNO_NAME_SW_FILLBMP_SIZE_X UNO_NAME_FILLBMP_SIZE_X
-#define UNO_NAME_SW_FILLBMP_SIZE_Y UNO_NAME_FILLBMP_SIZE_Y
-#define UNO_NAME_SW_FILLBMP_STRETCH UNO_NAME_FILLBMP_STRETCH
-#define UNO_NAME_SW_FILLBMP_TILE UNO_NAME_FILLBMP_TILE
-#define UNO_NAME_SW_FILLBMP_MODE UNO_NAME_FILLBMP_MODE
-#define UNO_NAME_SW_FILLCOLOR UNO_NAME_FILLCOLOR
-#define UNO_NAME_SW_FILLBACKGROUND UNO_NAME_FILLBACKGROUND
-#define UNO_NAME_SW_FILLBITMAP UNO_NAME_FILLBITMAP
-#define UNO_NAME_SW_FILLBITMAPNAME UNO_NAME_FILLBITMAPNAME
-#define UNO_NAME_SW_FILLBITMAPURL UNO_NAME_FILLBITMAPURL
-#define UNO_NAME_SW_FILLGRADIENTSTEPCOUNT UNO_NAME_FILLGRADIENTSTEPCOUNT
-#define UNO_NAME_SW_FILLGRADIENT UNO_NAME_FILLGRADIENT
-#define UNO_NAME_SW_FILLGRADIENTNAME UNO_NAME_FILLGRADIENTNAME
-#define UNO_NAME_SW_FILLHATCH UNO_NAME_FILLHATCH
-#define UNO_NAME_SW_FILLHATCHNAME UNO_NAME_FILLHATCHNAME
-#define UNO_NAME_SW_FILLSTYLE UNO_NAME_FILLSTYLE
-#define UNO_NAME_SW_FILL_TRANSPARENCE UNO_NAME_FILL_TRANSPARENCE
-#define UNO_NAME_SW_FILLTRANSPARENCEGRADIENT UNO_NAME_FILLTRANSPARENCEGRADIENT
-#define UNO_NAME_SW_FILLTRANSPARENCEGRADIENTNAME UNO_NAME_FILLTRANSPARENCEGRADIENTNAME
-#define UNO_NAME_SW_FILLCOLOR_2 UNO_NAME_FILLCOLOR_2
-
#define UNO_NAME_PARA_STYLEHEADING "ParaStyleHeading"
#define UNO_NAME_PARA_STYLELEVEL1 "ParaStyleLevel1"
#define UNO_NAME_PARA_STYLELEVEL10 "ParaStyleLevel10"
@@ -820,6 +792,9 @@
#define UNO_NAME_TABLE_BORDER2 "TableBorder2"
#define UNO_NAME_REPLACEMENT_GRAPHIC_URL "ReplacementGraphicURL"
#define UNO_NAME_HIDDEN "Hidden"
+#define UNO_NAME_FILL_STYLE "FillStyle"
+#define UNO_NAME_FILL_GRADIENT "FillGradient"
+#define UNO_NAME_FILL_GRADIENT_NAME "FillGradientName"
#define UNO_NAME_DEFAULT_PAGE_MODE "DefaultPageMode"
#define UNO_NAME_CHAR_SHADING_VALUE "CharShadingValue"
#define UNO_NAME_PARA_INTEROP_GRAB_BAG "ParaInteropGrabBag"
diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index 6d1bd32b7105..959a94bda8aa 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -21,101 +21,6 @@ interface BaseTextFrame
Automation = FALSE;
]
{
- //UUUU
- SID_ATTR_FILL_STYLE
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_ATTR_FILL_COLOR
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_ATTR_FILL_GRADIENT
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_ATTR_FILL_HATCH
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_ATTR_FILL_BITMAP
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_ATTR_FILL_TRANSPARENCE
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_ATTR_FILL_FLOATTRANSPARENCE
- [
- Export = FALSE;
- ExecMethod = ExecDrawAttrArgsTextFrame;
- StateMethod = GetDrawAttrStateTextFrame;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- //UUUU
- SID_COLOR_TABLE
- [
- StateMethod = GetDrawAttrStateTextFrame;
- ]
-
- //UUUU
- SID_GRADIENT_LIST
- [
- StateMethod = GetDrawAttrStateTextFrame;
- ]
-
- //UUUU
- SID_HATCH_LIST
- [
- StateMethod = GetDrawAttrStateTextFrame;
- ]
-
- //UUUU
- SID_BITMAP_LIST
- [
- StateMethod = GetDrawAttrStateTextFrame;
- ]
-
- //UUUU
- SID_ATTRIBUTES_AREA
- [
- ExecMethod = ExecDrawDlgTextFrame;
- StateMethod = DisableStateTextFrame;
- ]
-
-
FN_FRAME_TO_ANCHOR // status()
[
/*OS: Datentypen unvertraeglich ?? */
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 5b0ab7685161..6a876614e699 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1038,14 +1038,12 @@ static bool lcl_GetBackgroundColor( Color & rColor,
SwCrsrShell* pCrsrSh )
{
const SvxBrushItem* pBackgrdBrush = 0;
+ const XFillStyleItem* pFillStyleItem = 0;
+ const XFillGradientItem* pFillGradientItem = 0;
const Color* pSectionTOXColor = 0;
SwRect aDummyRect;
-
- //UUUU
- FillAttributesPtr aFillAttributes;
-
if ( pFrm &&
- pFrm->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) )
+ pFrm->GetBackgroundBrush( pBackgrdBrush, pFillStyleItem, pFillGradientItem, pSectionTOXColor, aDummyRect, false ) )
{
if ( pSectionTOXColor )
{
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index ad04fe623e6c..430dc17e89a8 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -27,9 +27,6 @@
#include <swcache.hxx>
#include <svl/grabbagitem.hxx>
#include <com/sun/star/beans/PropertyValues.hpp>
-//UUUU
-#include <unobrushitemhelper.hxx>
-#include <svx/xdef.hxx>
using namespace com::sun::star;
@@ -385,61 +382,6 @@ bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
return true;
}
-const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich, bool bInParents ) const
-{
- if(RES_BACKGROUND == nWhich && RES_FLYFRMFMT == Which())
- {
- //UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
- OSL_ENSURE(false, "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
- static SvxBrushItem aSvxBrushItem(RES_BACKGROUND);
-
- // fill the local static SvxBrushItem from the current ItemSet so that
- // the fill attributes [XATTR_FILL_FIRST .. XATTR_FILL_LAST] are used
- // as good as possible to create a fallback representation and return that
- aSvxBrushItem = sw::getSvxBrushItemFromSourceSet(aSet, bInParents);
-
- return aSvxBrushItem;
- }
-
- return aSet.Get( nWhich, bInParents );
-}
-
-
-SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, bool bSrchInParent, const SfxPoolItem **ppItem ) const
-{
- if(RES_BACKGROUND == nWhich && RES_FLYFRMFMT == Which())
- {
- //UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
- OSL_ENSURE(false, "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
- const FillAttributesPtr aFill = getFillAttributes();
-
- // check if the new fill attributes are used
- if(aFill.get() && aFill->isUsed())
- {
- // if yes, fill the local SvxBrushItem using the new fill attributes
- // as good as possible to have an instance for the pointer to point
- // to and return as state that it is set
- static SvxBrushItem aSvxBrushItem(RES_BACKGROUND);
-
- aSvxBrushItem = sw::getSvxBrushItemFromSourceSet(aSet, bSrchInParent);
- if( ppItem )
- *ppItem = &aSvxBrushItem;
-
- return SFX_ITEM_SET;
- }
-
- // if not, reset pointer and return SFX_ITEM_DEFAULT to signal that
- // the item is not set
- if( ppItem )
- *ppItem = NULL;
-
- return SFX_ITEM_DEFAULT;
- }
-
- return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
-}
-
-
bool SwFmt::SetFmtAttr( const SfxPoolItem& rAttr )
{
if ( IsInCache() || IsInSwFntCache() )
@@ -448,50 +390,9 @@ bool SwFmt::SetFmtAttr( const SfxPoolItem& rAttr )
CheckCaching( nWhich );
}
- bool bRet = false;
-
- //UUUU
- if(RES_BACKGROUND == rAttr.Which() && RES_FLYFRMFMT == Which())
- {
- //UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
- OSL_ENSURE(false, "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
- SfxItemSet aTempSet(*aSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0, 0);
- const SvxBrushItem& rSource = static_cast< const SvxBrushItem& >(rAttr);
-
- // fill a local ItemSet with the attributes corresponding as good as possible
- // to the new fill properties [XATTR_FILL_FIRST .. XATTR_FILL_LAST] and set these
- // as ItemSet
- sw::setSvxBrushItemAsFillAttributesToTargetSet(rSource, aTempSet);
-
- if(IsModifyLocked())
- {
- if( ( bRet = aSet.Put( aTempSet ) ) )
- {
- aSet.SetModifyAtAttr( this );
- }
- }
- else
- {
- SwAttrSet aOld(*aSet.GetPool(), aSet.GetRanges()), aNew(*aSet.GetPool(), aSet.GetRanges());
-
- bRet = aSet.Put_BC(aTempSet, &aOld, &aNew);
-
- if(bRet)
- {
- aSet.SetModifyAtAttr(this);
-
- SwAttrSetChg aChgOld(aSet, aOld);
- SwAttrSetChg aChgNew(aSet, aNew);
-
- ModifyNotification(&aChgOld, &aChgNew);
- }
- }
-
- return bRet;
- }
-
// if Modify is locked then no modifications will be sent;
// but call Modify always for FrmFmts
+ bool bRet = false;
const sal_uInt16 nFmtWhich = Which();
if( IsModifyLocked() ||
( !GetDepends() &&
@@ -538,73 +439,16 @@ bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
}
SetInSwFntCache( false );
- bool bRet = false;
-
- //UUUU Usel local copy to be able to apply needed changes, e.g. call
- // CheckForUniqueItemForLineFillNameOrIndex which is needed for NameOrIndex stuff
- SfxItemSet aTempSet(rSet);
-
- //UUUU Need to check for unique item for DrawingLayer items of type NameOrIndex
- // and evtl. correct that item to ensure unique names for that type. This call may
- // modify/correct entries inside of the given SfxItemSet
- if(GetDoc())
- {
- GetDoc()->CheckForUniqueItemForLineFillNameOrIndex(aTempSet);
- }
-
- //UUUU
- if(RES_FLYFRMFMT == Which())
- {
- const SfxPoolItem* pSource = 0;
-
- if(SFX_ITEM_SET == aTempSet.GetItemState(RES_BACKGROUND, false, &pSource))
- {
- //UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
- OSL_ENSURE(false, "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
-
- // copy all items to be set anyways to a local ItemSet with is also prepared for the new
- // fill attribute ranges [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. Add the attributes
- // corresponding as good as possible to the new fill properties and set the whole ItemSet
- const SvxBrushItem& rSource(static_cast< const SvxBrushItem& >(*pSource));
- sw::setSvxBrushItemAsFillAttributesToTargetSet(rSource, aTempSet);
-
- if(IsModifyLocked())
- {
- if( ( bRet = aSet.Put( aTempSet ) ) )
- {
- aSet.SetModifyAtAttr( this );
- }
- }
- else
- {
- SwAttrSet aOld(*aSet.GetPool(), aSet.GetRanges()), aNew(*aSet.GetPool(), aSet.GetRanges());
-
- bRet = aSet.Put_BC(aTempSet, &aOld, &aNew);
-
- if(bRet)
- {
- aSet.SetModifyAtAttr(this);
-
- SwAttrSetChg aChgOld(aSet, aOld);
- SwAttrSetChg aChgNew(aSet, aNew);
-
- ModifyNotification(&aChgOld, &aChgNew);
- }
- }
-
- return bRet;
- }
- }
-
// if Modify is locked then no modifications will be sent;
// but call Modify always for FrmFmts
+ bool bRet = false;
const sal_uInt16 nFmtWhich = Which();
if ( IsModifyLocked() ||
( !GetDepends() &&
( RES_GRFFMTCOLL == nFmtWhich ||
RES_TXTFMTCOLL == nFmtWhich ) ) )
{
- if( ( bRet = aSet.Put( aTempSet )) )
+ if( ( bRet = aSet.Put( rSet )) )
aSet.SetModifyAtAttr( this );
// #i71574#
if ( nFmtWhich == RES_TXTFMTCOLL )
@@ -616,7 +460,7 @@ bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
{
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- bRet = aSet.Put_BC( aTempSet, &aOld, &aNew );
+ bRet = aSet.Put_BC( rSet, &aOld, &aNew );
if( bRet )
{
// some special treatments for attributes
@@ -783,33 +627,4 @@ void SwFmt::SetGrabBagItem(const uno::Any& rVal)
m_pGrabBagItem->PutValue(rVal);
}
-//UUUU
-const SvxBrushItem& SwFmt::GetBackground(bool bInP) const
-{
- if(RES_FLYFRMFMT == Which())
- {
- //UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
- OSL_ENSURE(false, "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
- static SvxBrushItem aSvxBrushItem(RES_BACKGROUND);
-
- // fill the local static SvxBrushItem from the current ItemSet so that
- // the fill attributes [XATTR_FILL_FIRST .. XATTR_FILL_LAST] are used
- // as good as possible to create a fallback representation and return that
- aSvxBrushItem = sw::getSvxBrushItemFromSourceSet(aSet, bInP);
-
- return aSvxBrushItem;
- }
-
- return aSet.GetBackground(bInP);
-}
-
-//UUUU
-FillAttributesPtr SwFmt::getFillAttributes() const
-{
- // FALLBACKBREAKHERE return empty pointer
- OSL_ENSURE(false, "getFillAttributes() call only valid for RES_FLYFRMFMT currently (!)");
-
- return FillAttributesPtr();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 984db36e7577..aafb81199b43 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -25,7 +25,6 @@
#include <editeng/brushitem.hxx>
#include <editeng/lineitem.hxx>
#include <editeng/boxitem.hxx>
-#include <editeng/editeng.hxx>
#include <fmtpdsc.hxx>
#include <hintids.hxx>
#include <istyleaccess.hxx>
@@ -37,10 +36,6 @@
#include <svl/whiter.hxx>
#include <svx/xtable.hxx>
-#include <svx/svdpool.hxx>
-#include <svx/sxenditm.hxx>
-#include <svx/sdsxyitm.hxx>
-
// SwAttrPool
SwAttrPool::SwAttrPool( SwDoc* pD )
@@ -57,92 +52,10 @@ SwAttrPool::SwAttrPool( SwDoc* pD )
SetVersionMap( 5, 1,130, pVersionMap5 );
SetVersionMap( 6, 1,136, pVersionMap6 );
SetVersionMap( 7, 1,144, pVersionMap7 );
-
- //UUUU create secondary pools immediately
- createAndAddSecondaryPools();
}
SwAttrPool::~SwAttrPool()
{
- //UUUU cleanup secondary pools first
- removeAndDeleteSecondaryPools();
-}
-
-//UUUU
-void SwAttrPool::createAndAddSecondaryPools()
-{
- const SfxItemPool* pCheckAlreadySet = GetSecondaryPool();
-
- if(pCheckAlreadySet)
- {
- OSL_ENSURE(false, "SwAttrPool already has a secondary pool (!)");
- return;
- }
-
- // create SfxItemPool and EditEngine pool and add these in a chain. These
- // belong us and will be removed/destroyed in removeAndDeleteSecondaryPools() used from
- // the destructor
- SfxItemPool *pSdrPool = new SdrItemPool(this);
-
- // #75371# change DefaultItems for the SdrEdgeObj distance items
- // to TWIPS.
- if(pSdrPool)
- {
- // 1/100th mm in twips
- const long nDefEdgeDist = ((500 * 72) / 127);
-
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist));
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist));
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode2HorzDistItem(nDefEdgeDist));
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist));
-
- // #i33700# // Set shadow distance defaults as PoolDefaultItems
- pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127));
- pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127));
- }
-
- SfxItemPool *pEEgPool = EditEngine::CreatePool(false);
-
- pSdrPool->SetSecondaryPool(pEEgPool);
-
- if(!GetFrozenIdRanges())
- {
- FreezeIdRanges();
- }
- else
- {
- pSdrPool->FreezeIdRanges();
- }
-}
-
-//UUUU
-void SwAttrPool::removeAndDeleteSecondaryPools()
-{
- SfxItemPool *pSdrPool = GetSecondaryPool();
-
- if(!pSdrPool)
- {
- OSL_ENSURE(false, "SwAttrPool has no secondary pool, it's missing (!)");
- return;
- }
-
- SfxItemPool *pEEgPool = pSdrPool->GetSecondaryPool();
-
- if(!pEEgPool)
- {
- OSL_ENSURE(false, "i don't accept additional pools");
- return;
- }
-
- // first delete the items, then break the linking
- pSdrPool->Delete();
-
- SetSecondaryPool(0);
- pSdrPool->SetSecondaryPool(0);
-
- // final cleanup of secondary pool(s)
- SfxItemPool::Free(pSdrPool);
- SfxItemPool::Free(pEEgPool);
}
// SwAttrSet
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 1abeb5b43397..47aff571fe9a 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -150,10 +150,6 @@ sal_uInt16 aTxtFmtCollSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
0
};
@@ -227,10 +223,6 @@ sal_uInt16 aTableBoxSetRange[] = {
sal_uInt16 aFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
0
};
@@ -400,6 +392,8 @@ SfxItemInfo aSlotTab[] =
{ 0, 0 }, // RES_AUTO_STYLE
{ 0, SFX_ITEM_POOLABLE }, // RES_FRMATR_STYLE_NAME
{ 0, SFX_ITEM_POOLABLE }, // RES_FRMATR_CONDITIONAL_STYLE_NAME
+ { SID_SW_ATTR_FILL_STYLE, SFX_ITEM_POOLABLE }, // RES_FILL_STYLE
+ { SID_SW_ATTR_FILL_GRADIENT, SFX_ITEM_POOLABLE }, // RES_FILL_GRADIENT
{ 0, SFX_ITEM_POOLABLE }, // RES_FRMATR_GRABBAG
{ 0, SFX_ITEM_POOLABLE }, // RES_TEXT_VERT_ADJUST
@@ -615,6 +609,8 @@ void _InitCore()
aAttrTab[ RES_AUTO_STYLE - POOLATTR_BEGIN ] = new SwFmtAutoFmt( RES_AUTO_STYLE );
aAttrTab[ RES_FRMATR_STYLE_NAME - POOLATTR_BEGIN ] = new SfxStringItem( RES_FRMATR_STYLE_NAME, OUString());
aAttrTab[ RES_FRMATR_CONDITIONAL_STYLE_NAME - POOLATTR_BEGIN ] = new SfxStringItem( RES_FRMATR_CONDITIONAL_STYLE_NAME, OUString() );
+ aAttrTab[ RES_FILL_STYLE - POOLATTR_BEGIN ] = new XFillStyleItem(XFILL_SOLID, RES_FILL_STYLE);
+ aAttrTab[ RES_FILL_GRADIENT - POOLATTR_BEGIN ] = new XFillGradientItem(RES_FILL_GRADIENT);
aAttrTab[ RES_FRMATR_GRABBAG - POOLATTR_BEGIN ] = new SfxGrabBagItem(RES_FRMATR_GRABBAG);
aAttrTab[ RES_TEXT_VERT_ADJUST - POOLATTR_BEGIN ] = new SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP,RES_TEXT_VERT_ADJUST);
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 9e48240d7334..cd984ed229ba 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -520,32 +520,31 @@ void SwDoc::InitDrawModel()
if ( mpDrawModel )
ReleaseDrawModel();
-//UUUU
-// // Setup DrawPool and EditEnginePool. Ownership is ours and only gets passed
-// // to the Drawing.
-// // The pools are destroyed in the ReleaseDrawModel.
-// // for loading the drawing items. This must be loaded without RefCounts!
-// SfxItemPool *pSdrPool = new SdrItemPool( &GetAttrPool() );
-// // change DefaultItems for the SdrEdgeObj distance items to TWIPS.
-// if(pSdrPool)
-// {
-// const long nDefEdgeDist = ((500 * 72) / 127); // 1/100th mm in twips
-// pSdrPool->SetPoolDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist));
-// pSdrPool->SetPoolDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist));
-// pSdrPool->SetPoolDefaultItem(SdrEdgeNode2HorzDistItem(nDefEdgeDist));
-// pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist));
-//
-// // #i33700#
-// // Set shadow distance defaults as PoolDefaultItems. Details see bug.
-// pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127));
-// pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127));
-// }
-// SfxItemPool *pEEgPool = EditEngine::CreatePool( false );
-// pSdrPool->SetSecondaryPool( pEEgPool );
-// if ( !GetAttrPool().GetFrozenIdRanges () )
-// GetAttrPool().FreezeIdRanges();
-// else
-// pSdrPool->FreezeIdRanges();
+ // Setup DrawPool and EditEnginePool. Ownership is ours and only gets passed
+ // to the Drawing.
+ // The pools are destroyed in the ReleaseDrawModel.
+ // for loading the drawing items. This must be loaded without RefCounts!
+ SfxItemPool *pSdrPool = new SdrItemPool( &GetAttrPool() );
+ // change DefaultItems for the SdrEdgeObj distance items to TWIPS.
+ if(pSdrPool)
+ {
+ const long nDefEdgeDist = ((500 * 72) / 127); // 1/100th mm in twips
+ pSdrPool->SetPoolDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist));
+ pSdrPool->SetPoolDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist));
+ pSdrPool->SetPoolDefaultItem(SdrEdgeNode2HorzDistItem(nDefEdgeDist));
+ pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist));
+
+ // #i33700#
+ // Set shadow distance defaults as PoolDefaultItems. Details see bug.
+ pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127));
+ pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127));
+ }
+ SfxItemPool *pEEgPool = EditEngine::CreatePool( false );
+ pSdrPool->SetSecondaryPool( pEEgPool );
+ if ( !GetAttrPool().GetFrozenIdRanges () )
+ GetAttrPool().FreezeIdRanges();
+ else
+ pSdrPool->FreezeIdRanges();
// set FontHeight pool defaults without changing static SdrEngineDefaults
GetAttrPool().SetPoolDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ));
@@ -746,18 +745,17 @@ void SwDoc::ReleaseDrawModel()
// !! Also maintain the code in the sw3io for inserting documents!!
delete mpDrawModel; mpDrawModel = 0;
-//UUUU
-// SfxItemPool *pSdrPool = GetAttrPool().GetSecondaryPool();
-//
-// OSL_ENSURE( pSdrPool, "missing pool" );
-// SfxItemPool *pEEgPool = pSdrPool->GetSecondaryPool();
-// OSL_ENSURE( !pEEgPool->GetSecondaryPool(), "I don't accept additional pools");
-// pSdrPool->Delete(); // First have the items destroyed,
-// // then destroy the chain!
-// GetAttrPool().SetSecondaryPool( 0 ); // This one's a must!
-// pSdrPool->SetSecondaryPool( 0 ); // That one's safer
-// SfxItemPool::Free(pSdrPool);
-// SfxItemPool::Free(pEEgPool);
+ SfxItemPool *pSdrPool = GetAttrPool().GetSecondaryPool();
+
+ OSL_ENSURE( pSdrPool, "missing pool" );
+ SfxItemPool *pEEgPool = pSdrPool->GetSecondaryPool();
+ OSL_ENSURE( !pEEgPool->GetSecondaryPool(), "I don't accept additional pools");
+ pSdrPool->Delete(); // First have the items destroyed,
+ // then destroy the chain!
+ GetAttrPool().SetSecondaryPool( 0 ); // This one's a must!
+ pSdrPool->SetSecondaryPool( 0 ); // That one's safer
+ SfxItemPool::Free(pSdrPool);
+ SfxItemPool::Free(pEEgPool);
}
}
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index cd5162c8b144..985a0e3ddb16 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -58,13 +58,7 @@
#include <switerator.hxx>
#include <boost/scoped_ptr.hpp>
-//UUUU
-#include <svx/xbtmpit.hxx>
-#include <svx/xflftrit.hxx>
-#include <svx/xlndsit.hxx>
-#include <svx/xlnstit.hxx>
-#include <svx/xlnedit.hxx>
-#include <svx/xflhtit.hxx>
+extern sal_uInt16 GetHtmlMode( const SwDocShell* );
using namespace ::com::sun::star;
@@ -424,64 +418,6 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc,
return aTmpSet.Count() || MAKEFRMS == nMakeFrms;
}
-void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet)
-{
- SdrModel* pDrawModel = GetOrCreateDrawModel();
- SfxItemIter aIter(rSet);
-
- for(const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem())
- {
- if (IsInvalidItem(pItem))
- continue;
- const SfxPoolItem* pResult = pItem;
-
- switch(pItem->Which())
- {
- case XATTR_FILLBITMAP:
- {
- pResult = static_cast< const XFillBitmapItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- case XATTR_LINEDASH:
- {
- pResult = static_cast< const XLineDashItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- case XATTR_LINESTART:
- {
- pResult = static_cast< const XLineStartItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- case XATTR_LINEEND:
- {
- pResult = static_cast< const XLineEndItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- case XATTR_FILLGRADIENT:
- {
- pResult = static_cast< const XFillGradientItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- case XATTR_FILLFLOATTRANSPARENCE:
- {
- pResult = static_cast< const XFillFloatTransparenceItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- case XATTR_FILLHATCH:
- {
- pResult = static_cast< const XFillHatchItem* >(pItem)->checkForUniqueItem(pDrawModel);
- break;
- }
- }
-
- if(pResult != pItem)
- {
- rSet.Put(*pResult);
- delete pResult;
- }
- }
-}
-
bool SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
{
if( !rSet.Count() )
@@ -495,11 +431,6 @@ bool SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
pSaveUndo.reset( new SwUndoFmtAttrHelper( rFlyFmt ) );
}
- //UUUU Need to check for unique item for DrawingLayer items of type NameOrIndex
- // and evtl. correct that item to ensure unique names for that type. This call may
- // modify/correct entries inside of the given SfxItemSet
- CheckForUniqueItemForLineFillNameOrIndex(rSet);
-
bool const bRet =
lcl_SetFlyFrmAttr(*this, &SwDoc::SetFlyFrmAnchor, rFlyFmt, rSet);
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 0b0ba9245a9a..aea42a37ea39 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -178,23 +178,10 @@ static void lcl_ClearArea( const SwFrm &rFrm,
if ( !aRegion.empty() )
{
- const SvxBrushItem *pItem; const Color *pCol; SwRect aOrigRect;
-
- //UUUU
- FillAttributesPtr aFillAttributes;
-
- if ( rFrm.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) )
- {
- const bool bDone(::DrawFillAttributes(aFillAttributes, aOrigRect, rPtArea, rOut));
-
- if(!bDone)
- {
- for( sal_uInt16 i = 0; i < aRegion.size(); ++i )
- {
- ::DrawGraphic( pItem, &rOut, aOrigRect, aRegion[i] );
- }
- }
- }
+ const SvxBrushItem *pItem; const XFillStyleItem* pFillStyleItem; const XFillGradientItem* pFillGradientItem; const Color *pCol; SwRect aOrigRect;
+ if ( rFrm.GetBackgroundBrush( pItem, pFillStyleItem, pFillGradientItem, pCol, aOrigRect, false ) )
+ for( sal_uInt16 i = 0; i < aRegion.size(); ++i )
+ ::DrawGraphic( pItem, pFillStyleItem, pFillGradientItem, &rOut, aOrigRect, aRegion[i] );
else
{
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 5340ee390bec..1048e3a90190 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -62,7 +62,6 @@
#include <poolfmt.hrc>
#include <GetMetricVal.hxx>
#include <numrule.hxx>
-#include <svx/xdef.hxx>
using namespace ::editeng;
using namespace ::com::sun::star;
@@ -1314,9 +1313,6 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
aSet.Put( SvxULSpaceItem( 114, 114, RES_UL_SPACE ) );
}
-
- //UUUU for styles of FlyFrames do not set the FillStyle to make it a derived attribute
- aSet.ClearItem(XATTR_FILLSTYLE);
}
break;
case RES_POOLFRM_GRAPHIC:
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index bc043ed7b189..80f09d7b42b6 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -468,7 +468,6 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject(
{
// if there's no viewport set, all fly-frames will be painted,
// which is slow, wastes memory, and can cause other trouble.
- (void) rViewInformation; // suppress "unused parameter" warning
assert(!rViewInformation.getViewport().isEmpty());
if ( !pFlyFrm->IsFlyInCntFrm() )
{
diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index a839716e42f4..e7a2d4dd23c2 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SW_SOURCE_CORE_INC_DFLYOBJ_HXX
#include <svx/svdovirt.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
class SwFlyFrm;
class SwFrmFmt;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 300e8d766b7e..e0796be61438 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -61,8 +61,6 @@ class SwPrintData;
class SwSortedObjs;
class SwAnchoredObject;
typedef struct _xmlTextWriter *xmlTextWriterPtr;
-//UUUU
-class FillAttributes;
// Each FrmType is represented here as a bit.
// The bits must be set in a way that it can be determined with masking of
@@ -512,12 +510,12 @@ public:
// retouch, not in the area of the given Rect!
void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
- bool GetBackgroundBrush(
- boost::shared_ptr< FillAttributes >& rFillAttributes,
- const SvxBrushItem*& rpBrush,
- const Color*& rpColor,
- SwRect &rOrigRect,
- bool bLowerMode ) const;
+ sal_Bool GetBackgroundBrush( const SvxBrushItem*& rpBrush,
+ const XFillStyleItem* & rpFillStyle,
+ const XFillGradientItem* & rpFillGradient,
+ const Color*& rpColor,
+ SwRect &rOrigRect,
+ bool bLowerMode ) const;
inline void SetCompletePaint() const;
inline void ResetCompletePaint() const;
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index c7e32b9dab1e..bdae8baf9766 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -53,18 +53,9 @@ class SwPageDesc;
// draw background with brush or graphics
// The 6th parameter indicates that the method should consider background
// transparency, saved in the color of the brush item.
-void DrawGraphic(
- const SvxBrushItem *,
- OutputDevice *,
- const SwRect &rOrg,
- const SwRect &rOut,
- const sal_uInt8 nGrfNum = GRFNUM_NO,
- const bool bConsiderBackgroundTransparency = false );
-bool DrawFillAttributes(
- const boost::shared_ptr< FillAttributes >& rFillAttributes,
- const SwRect& rOriginalLayoutRect,
- const SwRect& rPaintRect,
- OutputDevice& rOut);
+void DrawGraphic( const SvxBrushItem *, const XFillStyleItem*, const XFillGradientItem*, OutputDevice *,
+ const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum = GRFNUM_NO,
+ const bool bConsiderBackgroundTransparency = false );
void paintGraphicUsingPrimitivesHelper(
OutputDevice & rOutputDevice,
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index a829e7478d6d..41b888461616 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -76,11 +76,6 @@
#include <ndtxt.hxx>
#endif
-//UUUU
-#include <fillattributes.hxx>
-#include <svx/xfillit0.hxx>
-#include <svl/itemiter.hxx>
-
using namespace ::com::sun::star;
TYPEINIT1(SwFmtVertOrient, SfxPoolItem);
@@ -2411,58 +2406,6 @@ SfxPoolItem* SwHeaderAndFooterEatSpacingItem::Clone( SfxItemPool* ) const
TYPEINIT1( SwFrmFmt, SwFmt );
IMPL_FIXEDMEMPOOL_NEWDEL_DLL( SwFrmFmt )
-SwFrmFmt::SwFrmFmt(
- SwAttrPool& rPool,
- const sal_Char* pFmtNm,
- SwFrmFmt *pDrvdFrm,
- sal_uInt16 nFmtWhich,
- const sal_uInt16* pWhichRange)
-: SwFmt(rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich),
- m_wXObject(),
- maFillAttributes()
-{
- //UUUU
- if(RES_FLYFRMFMT == nFmtWhich)
- {
- // when its a SwFlyFrmFmt do not do this, this setting
- // will be derived from the parent style. In the future this
- // may be needed for more formats; all which use the
- // XATTR_FILL_FIRST, XATTR_FILL_LAST range as fill attributes
- }
- else
- {
- // set FillStyle to none; this is necessary since the pool default is
- // to fill objects by color (blue8)
- SetFmtAttr(XFillStyleItem(XFILL_NONE));
- }
-}
-
-SwFrmFmt::SwFrmFmt(
- SwAttrPool& rPool,
- const OUString &rFmtNm,
- SwFrmFmt *pDrvdFrm,
- sal_uInt16 nFmtWhich,
- const sal_uInt16* pWhichRange)
-: SwFmt(rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich),
- m_wXObject(),
- maFillAttributes()
-{
- //UUUU
- if(RES_FLYFRMFMT == nFmtWhich)
- {
- // when its a SwFlyFrmFmt do not do this, this setting
- // will be derived from the parent style. In the future this
- // may be needed for more formats; all which use the
- // XATTR_FILL_FIRST, XATTR_FILL_LAST range as fill attributes
- }
- else
- {
- // set FillStyle to none; this is necessary since the pool default is
- // to fill objects by color (blue8)
- SetFmtAttr(XFillStyleItem(XFILL_NONE));
- }
-}
-
void SwFrmFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
SwFmtHeader *pH = 0;
@@ -2476,31 +2419,6 @@ void SwFrmFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
RES_HEADER, false, (const SfxPoolItem**)&pH );
((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_FOOTER, false, (const SfxPoolItem**)&pF );
-
- //UUUU reset fill information
- if(RES_FLYFRMFMT == Which() && maFillAttributes.get())
- {
- SfxItemIter aIter(*((SwAttrSetChg*)pNew)->GetChgSet());
- bool bReset(false);
-
- for(const SfxPoolItem* pItem = aIter.FirstItem(); pItem && !bReset; pItem = aIter.NextItem())
- {
- bReset = !IsInvalidItem(pItem) && pItem->Which() >= XATTR_FILL_FIRST && pItem->Which() <= XATTR_FILL_LAST;
- }
-
- if(bReset)
- {
- maFillAttributes.reset();
- }
- }
- }
- else if(RES_FMT_CHG == nWhich) //UUUU
- {
- //UUUU reset fill information on format change (e.g. style changed)
- if(RES_FLYFRMFMT == Which() && maFillAttributes.get())
- {
- maFillAttributes.reset();
- }
}
else if( RES_HEADER == nWhich )
pH = (SwFmtHeader*)pNew;
@@ -3017,11 +2935,7 @@ OUString SwFlyFrmFmt::GetObjDescription() const
*/
bool SwFlyFrmFmt::IsBackgroundTransparent() const
{
- //UUUU
- if(RES_FLYFRMFMT == Which() && getFillAttributes())
- {
- return getFillAttributes()->isTransparent();
- }
+ bool bReturn = false;
// NOTE: If background color is "no fill"/"auto fill" (COL_TRANSPARENT)
// and there is no background graphic, it "inherites" the background
@@ -3030,7 +2944,7 @@ bool SwFlyFrmFmt::IsBackgroundTransparent() const
(GetBackground().GetColor() != COL_TRANSPARENT)
)
{
- return true;
+ bReturn = true;
}
else
{
@@ -3040,11 +2954,11 @@ bool SwFlyFrmFmt::IsBackgroundTransparent() const
(pTmpGrf->GetAttr().GetTransparency() != 0)
)
{
- return true;
+ bReturn = true;
}
}
- return false;
+ return bReturn;
}
/** SwFlyFrmFmt::IsBackgroundBrushInherited - for #103898#
@@ -3059,18 +2973,15 @@ bool SwFlyFrmFmt::IsBackgroundTransparent() const
*/
bool SwFlyFrmFmt::IsBackgroundBrushInherited() const
{
- //UUUU
- if(RES_FLYFRMFMT == Which() && getFillAttributes())
- {
- return !getFillAttributes()->isUsed();
- }
- else if ( (GetBackground().GetColor() == COL_TRANSPARENT) &&
+ bool bReturn = false;
+
+ if ( (GetBackground().GetColor() == COL_TRANSPARENT) &&
!(GetBackground().GetGraphicObject()) )
{
- return true;
+ bReturn = true;
}
- return false;
+ return bReturn;
}
// #125892#
@@ -3284,24 +3195,4 @@ IMapObject* SwFrmFmt::GetIMapObject( const Point& rPoint,
return 0;
}
-//UUUU
-FillAttributesPtr SwFrmFmt::getFillAttributes() const
-{
- if(RES_FLYFRMFMT == Which())
- {
- // create FillAttributes on demand
- if(!maFillAttributes.get())
- {
- const_cast< SwFrmFmt* >(this)->maFillAttributes.reset(new FillAttributes(GetAttrSet()));
- }
- }
- else
- {
- // FALLBACKBREAKHERE assert wrong usage
- OSL_ENSURE(false, "getFillAttributes() call only valid for RES_FLYFRMFMT currently (!)");
- }
-
- return maFillAttributes;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/fillattributes.cxx b/sw/source/core/layout/fillattributes.cxx
deleted file mode 100644
index 8666c27ab092..000000000000
--- a/sw/source/core/layout/fillattributes.cxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- 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 <fillattributes.hxx>
-#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
-#include <svx/sdr/primitive2d/sdrdecompositiontools.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <drawinglayer/attribute/fillhatchattribute.hxx>
-#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
-#include <svx/xfillit0.hxx>
-#include <tools/color.hxx>
-#include <vcl/graph.hxx>
-
-void FillAttributes::createPrimitive2DSequence(
- const basegfx::B2DRange& rPaintRange,
- const basegfx::B2DRange& rDefineRange)
-{
- // reset and remember new target range for object geometry
- maLastPaintRange = rPaintRange;
- maLastDefineRange = rDefineRange;
-
- if(isUsed())
- {
- maPrimitives.realloc(1);
- maPrimitives[0] = drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
- basegfx::B2DPolyPolygon(
- basegfx::tools::createPolygonFromRect(
- maLastPaintRange)),
- maLastDefineRange,
- maFillAttribute.get() ? *maFillAttribute.get() : drawinglayer::attribute::SdrFillAttribute(),
- maFillGradientAttribute.get() ? *maFillGradientAttribute.get() : drawinglayer::attribute::FillGradientAttribute());
- }
-}
-
-FillAttributes::FillAttributes(const Color& rColor)
-: maLastPaintRange(),
- maLastDefineRange(),
- maFillAttribute(),
- maFillGradientAttribute(),
- maPrimitives()
-{
- maFillAttribute.reset(
- new drawinglayer::attribute::SdrFillAttribute(
- 0.0,
- Color(rColor.GetRGBColor()).getBColor(),
- drawinglayer::attribute::FillGradientAttribute(),
- drawinglayer::attribute::FillHatchAttribute(),
- drawinglayer::attribute::SdrFillGraphicAttribute()));
-}
-
-FillAttributes::FillAttributes(const SfxItemSet& rSet)
-: maLastPaintRange(),
- maLastDefineRange(),
- maFillAttribute(
- new drawinglayer::attribute::SdrFillAttribute(
- drawinglayer::primitive2d::createNewSdrFillAttribute(rSet))),
- maFillGradientAttribute(
- new drawinglayer::attribute::FillGradientAttribute(
- drawinglayer::primitive2d::createNewTransparenceGradientAttribute(rSet))),
- maPrimitives()
-{
-}
-
-FillAttributes::~FillAttributes()
-{
-}
-
-bool FillAttributes::isUsed() const
-{
- // only depends on fill, FillGradientAttribute alone defines no fill
- return maFillAttribute.get() && !maFillAttribute->isDefault();
-}
-
-bool FillAttributes::isTransparent() const
-{
- if(hasSdrFillAttribute() && 0.0 != maFillAttribute->getTransparence())
- {
- return true;
- }
-
- if(hasFillGradientAttribute() && !maFillGradientAttribute->isDefault())
- {
- return true;
- }
-
- if(hasSdrFillAttribute())
- {
- const Graphic& rGraphic = getFillAttribute().getFillGraphic().getFillGraphic();
-
- return rGraphic.IsSupportedGraphic() && rGraphic.IsTransparent();
- }
-
- return false;
-}
-
-const drawinglayer::attribute::SdrFillAttribute& FillAttributes::getFillAttribute() const
-{
- if(!maFillAttribute.get())
- {
- const_cast< FillAttributes* >(this)->maFillAttribute.reset(new drawinglayer::attribute::SdrFillAttribute());
- }
-
- return *maFillAttribute.get();
-}
-
-const drawinglayer::primitive2d::Primitive2DSequence& FillAttributes::getPrimitive2DSequence(
- const basegfx::B2DRange& rPaintRange,
- const basegfx::B2DRange& rDefineRange) const
-{
- if(maPrimitives.getLength() && (maLastPaintRange != rPaintRange || maLastDefineRange != rDefineRange))
- {
- const_cast< FillAttributes* >(this)->maPrimitives.realloc(0);
- }
-
- if(!maPrimitives.getLength())
- {
- const_cast< FillAttributes* >(this)->createPrimitive2DSequence(rPaintRange, rDefineRange);
- }
-
- return maPrimitives;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 8d16d93cb737..0217c3b35514 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -75,9 +75,6 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-//UUUU
-#include <drawinglayer/processor2d/processor2dtools.hxx>
-
#define COL_NOTES_SIDEPANE RGB_COLORDATA(230,230,230)
#define COL_NOTES_SIDEPANE_BORDER RGB_COLORDATA(200,200,200)
#define COL_NOTES_SIDEPANE_SCROLLAREA RGB_COLORDATA(230,230,220)
@@ -1500,172 +1497,172 @@ static void lcl_ExtendLeftAndRight( SwRect& _rRect,
}
}
-//static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
-// const SwRect &rRect, SwRegionRects &rRegion )
-//{
-// const SwSortedObjs& rObjs = *pPage->GetSortedObjs();
-// const SwFlyFrm* pSelfFly = pFrm->IsInFly() ? pFrm->FindFlyFrm() : pRetoucheFly2;
-// if ( !pRetoucheFly )
-// pRetoucheFly = pRetoucheFly2;
-//
-// for ( sal_uInt16 j = 0; (j < rObjs.Count()) && !rRegion.empty(); ++j )
-// {
-// const SwAnchoredObject* pAnchoredObj = rObjs[j];
-// const SdrObject* pSdrObj = pAnchoredObj->GetDrawObj();
-//
-// // Do not consider invisible objects
-// if ( !pPage->GetFmt()->GetDoc()->IsVisibleLayerId( pSdrObj->GetLayer() ) )
-// continue;
-//
-// if ( !pAnchoredObj->ISA(SwFlyFrm) )
-// continue;
-//
-// const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
-//
-// if ( pSelfFly == pFly || pRetoucheFly == pFly || !rRect.IsOver( pFly->Frm() ) )
-// continue;
-//
-// if ( !pFly->GetFmt()->GetPrint().GetValue() &&
-// (OUTDEV_PRINTER == pGlobalShell->GetOut()->GetOutDevType() ||
-// pGlobalShell->IsPreview()))
-// continue;
-//
-// const bool bLowerOfSelf = pSelfFly && pFly->IsLowerOf( pSelfFly );
-//
-// //For character bound Flys only examine those Flys in which it is not
-// //anchored itself.
-// //Why only for character bound ones you may ask? It never makes sense to
-// //subtract frames in which it is anchored itself right?
-// if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) )
-// continue;
-//
-// //Any why does it not apply for the RetoucheFly too?
-// if ( pRetoucheFly && pRetoucheFly->IsLowerOf( pFly ) )
-// continue;
-//
-//#if OSL_DEBUG_LEVEL > 0
-// //Flys who are anchored inside their own one, must have a bigger OrdNum
-// //or be character bound.
-// if ( pSelfFly && bLowerOfSelf )
-// {
-// OSL_ENSURE( pFly->IsFlyInCntFrm() ||
-// pSdrObj->GetOrdNumDirect() > pSelfFly->GetVirtDrawObj()->GetOrdNumDirect(),
-// "Fly with wrong z-Order" );
-// }
-//#endif
-//
-// bool bStopOnHell = true;
-// if ( pSelfFly )
-// {
-// const SdrObject *pTmp = pSelfFly->GetVirtDrawObj();
-// if ( pSdrObj->GetLayer() == pTmp->GetLayer() )
-// {
-// if ( pSdrObj->GetOrdNumDirect() < pTmp->GetOrdNumDirect() )
-// //In the same layer we only observe those that are above.
-// continue;
-// }
-// else
-// {
-// if ( !bLowerOfSelf && !pFly->GetFmt()->GetOpaque().GetValue() )
-// //From other layers we are only interested in non
-// //transparent ones or those that are internal
-// continue;
-// bStopOnHell = false;
-// }
-// }
-// if ( pRetoucheFly )
-// {
-// const SdrObject *pTmp = pRetoucheFly->GetVirtDrawObj();
-// if ( pSdrObj->GetLayer() == pTmp->GetLayer() )
-// {
-// if ( pSdrObj->GetOrdNumDirect() < pTmp->GetOrdNumDirect() )
-// //In the same layer we only observe those that are above.
-// continue;
-// }
-// else
-// {
-// if ( !pFly->IsLowerOf( pRetoucheFly ) && !pFly->GetFmt()->GetOpaque().GetValue() )
-// //From other layers we are only interested in non
-// //transparent ones or those that are internal
-// continue;
-// bStopOnHell = false;
-// }
-// }
-//
-// //If the content of the Fly is transparent, we subtract it only if it's
-// //contained in the hell layer.
-// const IDocumentDrawModelAccess* pIDDMA = pFly->GetFmt()->getIDocumentDrawModelAccess();
-// bool bHell = pSdrObj->GetLayer() == pIDDMA->GetHellId();
-// if ( (bStopOnHell && bHell) ||
-// /// Change internal order of condition
-// /// first check "!bHell", then "..->Lower()" and "..->IsNoTxtFrm()"
-// /// have not to be performed, if frame is in "Hell"
-// ( !bHell && pFly->Lower() && pFly->Lower()->IsNoTxtFrm() &&
-// ( ((SwNoTxtFrm*)pFly->Lower())->IsTransparent() ||
-// ((SwNoTxtFrm*)pFly->Lower())->HasAnimation() ||
-// pFly->GetFmt()->GetSurround().IsContour()
-// )
-// )
-// )
-// continue;
-//
-// // Own if-statements for transparent background/shadow of fly frames
-// // in order to handle special conditions.
-// if ( pFly->IsBackgroundTransparent() )
-// {
-// // Background <pFly> is transparent drawn. Thus normally, its region
-// // have not to be subtracted from given region.
-// // But, if method is called for a fly frame and
-// // <pFly> is a direct lower of this fly frame and
-// // <pFly> inherites its transparent background brush from its parent,
-// // then <pFly> frame area have to be subtracted from given region.
-// // NOTE: Because in Status Quo transparent backgrounds can only be
-// // assigned to fly frames, the handle of this special case
-// // avoids drawing of transparent areas more than once, if
-// // a fly frame inherites a transparent background from its
-// // parent fly frame.
-// if ( pFrm->IsFlyFrm() &&
-// (pFly->GetAnchorFrm()->FindFlyFrm() == pFrm) &&
-// static_cast<const SwFlyFrmFmt*>(pFly->GetFmt())->IsBackgroundBrushInherited()
-// )
-// {
-// SwRect aRect;
-// SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
-// const SwBorderAttrs &rAttrs = *aAccess.Get();
-// ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true );
-// rRegion -= aRect;
-// continue;
-// }
-// else
-// {
-// continue;
-// }
-// }
-// if ( pFly->IsShadowTransparent() )
-// {
-// continue;
-// }
-//
-// if ( bHell && pFly->GetAnchorFrm()->IsInFly() )
-// {
-// //So the border won't get dismantled by the background of the other
-// //Fly.
-// SwRect aRect;
-// SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
-// const SwBorderAttrs &rAttrs = *aAccess.Get();
-// ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true );
-// rRegion -= aRect;
-// }
-// else
-// {
-// SwRect aRect( pFly->Prt() );
-// aRect += pFly->Frm().Pos();
-// rRegion -= aRect;
-// }
-// }
-// if ( pRetoucheFly == pRetoucheFly2 )
-// pRetoucheFly = 0;
-//}
+static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
+ const SwRect &rRect, SwRegionRects &rRegion )
+{
+ const SwSortedObjs& rObjs = *pPage->GetSortedObjs();
+ const SwFlyFrm* pSelfFly = pFrm->IsInFly() ? pFrm->FindFlyFrm() : pRetoucheFly2;
+ if ( !pRetoucheFly )
+ pRetoucheFly = pRetoucheFly2;
+
+ for ( sal_uInt16 j = 0; (j < rObjs.Count()) && !rRegion.empty(); ++j )
+ {
+ const SwAnchoredObject* pAnchoredObj = rObjs[j];
+ const SdrObject* pSdrObj = pAnchoredObj->GetDrawObj();
+
+ // Do not consider invisible objects
+ if ( !pPage->GetFmt()->GetDoc()->IsVisibleLayerId( pSdrObj->GetLayer() ) )
+ continue;
+
+ if ( !pAnchoredObj->ISA(SwFlyFrm) )
+ continue;
+
+ const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
+
+ if ( pSelfFly == pFly || pRetoucheFly == pFly || !rRect.IsOver( pFly->Frm() ) )
+ continue;
+
+ if ( !pFly->GetFmt()->GetPrint().GetValue() &&
+ (OUTDEV_PRINTER == pGlobalShell->GetOut()->GetOutDevType() ||
+ pGlobalShell->IsPreview()))
+ continue;
+
+ const bool bLowerOfSelf = pSelfFly && pFly->IsLowerOf( pSelfFly );
+
+ //For character bound Flys only examine those Flys in which it is not
+ //anchored itself.
+ //Why only for character bound ones you may ask? It never makes sense to
+ //subtract frames in which it is anchored itself right?
+ if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) )
+ continue;
+
+ //Any why does it not apply for the RetoucheFly too?
+ if ( pRetoucheFly && pRetoucheFly->IsLowerOf( pFly ) )
+ continue;
+
+#if OSL_DEBUG_LEVEL > 0
+ //Flys who are anchored inside their own one, must have a bigger OrdNum
+ //or be character bound.
+ if ( pSelfFly && bLowerOfSelf )
+ {
+ OSL_ENSURE( pFly->IsFlyInCntFrm() ||
+ pSdrObj->GetOrdNumDirect() > pSelfFly->GetVirtDrawObj()->GetOrdNumDirect(),
+ "Fly with wrong z-Order" );
+ }
+#endif
+
+ bool bStopOnHell = true;
+ if ( pSelfFly )
+ {
+ const SdrObject *pTmp = pSelfFly->GetVirtDrawObj();
+ if ( pSdrObj->GetLayer() == pTmp->GetLayer() )
+ {
+ if ( pSdrObj->GetOrdNumDirect() < pTmp->GetOrdNumDirect() )
+ //In the same layer we only observe those that are above.
+ continue;
+ }
+ else
+ {
+ if ( !bLowerOfSelf && !pFly->GetFmt()->GetOpaque().GetValue() )
+ //From other layers we are only interested in non
+ //transparent ones or those that are internal
+ continue;
+ bStopOnHell = false;
+ }
+ }
+ if ( pRetoucheFly )
+ {
+ const SdrObject *pTmp = pRetoucheFly->GetVirtDrawObj();
+ if ( pSdrObj->GetLayer() == pTmp->GetLayer() )
+ {
+ if ( pSdrObj->GetOrdNumDirect() < pTmp->GetOrdNumDirect() )
+ //In the same layer we only observe those that are above.
+ continue;
+ }
+ else
+ {
+ if ( !pFly->IsLowerOf( pRetoucheFly ) && !pFly->GetFmt()->GetOpaque().GetValue() )
+ //From other layers we are only interested in non
+ //transparent ones or those that are internal
+ continue;
+ bStopOnHell = false;
+ }
+ }
+
+ //If the content of the Fly is transparent, we subtract it only if it's
+ //contained in the hell layer.
+ const IDocumentDrawModelAccess* pIDDMA = pFly->GetFmt()->getIDocumentDrawModelAccess();
+ bool bHell = pSdrObj->GetLayer() == pIDDMA->GetHellId();
+ if ( (bStopOnHell && bHell) ||
+ /// Change internal order of condition
+ /// first check "!bHell", then "..->Lower()" and "..->IsNoTxtFrm()"
+ /// have not to be performed, if frame is in "Hell"
+ ( !bHell && pFly->Lower() && pFly->Lower()->IsNoTxtFrm() &&
+ ( ((SwNoTxtFrm*)pFly->Lower())->IsTransparent() ||
+ ((SwNoTxtFrm*)pFly->Lower())->HasAnimation() ||
+ pFly->GetFmt()->GetSurround().IsContour()
+ )
+ )
+ )
+ continue;
+
+ // Own if-statements for transparent background/shadow of fly frames
+ // in order to handle special conditions.
+ if ( pFly->IsBackgroundTransparent() )
+ {
+ // Background <pFly> is transparent drawn. Thus normally, its region
+ // have not to be substracted from given region.
+ // But, if method is called for a fly frame and
+ // <pFly> is a direct lower of this fly frame and
+ // <pFly> inherites its transparent background brush from its parent,
+ // then <pFly> frame area have to be subtracted from given region.
+ // NOTE: Because in Status Quo transparent backgrounds can only be
+ // assigned to fly frames, the handle of this special case
+ // avoids drawing of transparent areas more than once, if
+ // a fly frame inherites a transparent background from its
+ // parent fly frame.
+ if ( pFrm->IsFlyFrm() &&
+ (pFly->GetAnchorFrm()->FindFlyFrm() == pFrm) &&
+ static_cast<const SwFlyFrmFmt*>(pFly->GetFmt())->IsBackgroundBrushInherited()
+ )
+ {
+ SwRect aRect;
+ SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
+ const SwBorderAttrs &rAttrs = *aAccess.Get();
+ ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true );
+ rRegion -= aRect;
+ continue;
+ }
+ else
+ {
+ continue;
+ }
+ }
+ if ( pFly->IsShadowTransparent() )
+ {
+ continue;
+ }
+
+ if ( bHell && pFly->GetAnchorFrm()->IsInFly() )
+ {
+ //So the border won't get dismantled by the background of the other
+ //Fly.
+ SwRect aRect;
+ SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
+ const SwBorderAttrs &rAttrs = *aAccess.Get();
+ ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true );
+ rRegion -= aRect;
+ }
+ else
+ {
+ SwRect aRect( pFly->Prt() );
+ aRect += pFly->Frm().Pos();
+ rRegion -= aRect;
+ }
+ }
+ if ( pRetoucheFly == pRetoucheFly2 )
+ pRetoucheFly = 0;
+}
static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush,
OutputDevice* _pOut,
@@ -1822,75 +1819,14 @@ static void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
pOut->Pop();
}
-bool DrawFillAttributes(
- const FillAttributesPtr& rFillAttributes,
- const SwRect& rOriginalLayoutRect,
- const SwRect& rPaintRect,
- OutputDevice& rOut)
-{
- static bool bUseNew(true);
- static bool bReturnWhenNew(true);
-
- if(bUseNew && rFillAttributes.get() && rFillAttributes->isUsed())
- {
- const basegfx::B2DRange aPaintRange(
- rPaintRect.Left(),
- rPaintRect.Top(),
- rPaintRect.Right(),
- rPaintRect.Bottom());
-
- if(!aPaintRange.isEmpty() &&
- !basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
- !basegfx::fTools::equalZero(aPaintRange.getHeight()))
- {
- const basegfx::B2DRange aDefineRange(
- rOriginalLayoutRect.Left(),
- rOriginalLayoutRect.Top(),
- rOriginalLayoutRect.Right(),
- rOriginalLayoutRect.Bottom());
-
- const drawinglayer::primitive2d::Primitive2DSequence& rSequence = rFillAttributes->getPrimitive2DSequence(
- aPaintRange,
- aDefineRange);
-
- if(rSequence.getLength())
- {
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(
- basegfx::B2DHomMatrix(),
- rOut.GetViewTransformation(),
- aPaintRange,
- 0,
- 0.0,
- uno::Sequence< beans::PropertyValue >());
- drawinglayer::processor2d::BaseProcessor2D* pProcessor = drawinglayer::processor2d::createProcessor2DFromOutputDevice(
- rOut,
- aViewInformation2D);
-
- if(pProcessor)
- {
- pProcessor->process(rSequence);
-
- delete pProcessor;
-
- if(bReturnWhenNew)
- {
- return true;
- }
- }
- }
- }
- }
-
- return false;
-}
-
-void DrawGraphic(
- const SvxBrushItem *pBrush,
- OutputDevice *pOutDev,
- const SwRect &rOrg,
- const SwRect &rOut,
- const sal_uInt8 nGrfNum,
- const bool bConsiderBackgroundTransparency )
+void DrawGraphic( const SvxBrushItem *pBrush,
+ const XFillStyleItem* pFillStyleItem,
+ const XFillGradientItem* pFillGradientItem,
+ OutputDevice *pOutDev,
+ const SwRect &rOrg,
+ const SwRect &rOut,
+ const sal_uInt8 nGrfNum,
+ const bool bConsiderBackgroundTransparency )
// Add 6th parameter to indicate that method should
// consider background transparency, saved in the color of the brush item
{
@@ -2120,9 +2056,15 @@ void DrawGraphic(
enum DrawStyle {
Default,
Transparent,
+ Gradient
} eDrawStyle = Default;
- if (bConsiderBackgroundTransparency &&
+ // Gradient and transparency are mutually exclusive (need to check gradient first)
+ if (pFillStyleItem && pFillStyleItem->GetValue() == XFILL_GRADIENT && pFillGradientItem)
+ {
+ eDrawStyle = Gradient;
+ }
+ else if (bConsiderBackgroundTransparency &&
( ( aColor.GetTransparency() != 0) ||
bTransparentGrfWithNoFillBackgrd ) )
{
@@ -2200,6 +2142,11 @@ void DrawGraphic(
break;
}
+ case Gradient:
+ {
+ pOutDev->DrawGradient(rOut.SVRect(), pFillGradientItem->GetGradientValue().VclGradient());
+ break;
+ }
case Default:
default:
{
@@ -3878,12 +3825,11 @@ bool SwFlyFrm::IsBackgroundTransparent() const
static_cast<const SwFlyFrmFmt*>(GetFmt())->IsBackgroundBrushInherited() )
{
const SvxBrushItem* pBackgrdBrush = 0;
+ const XFillStyleItem* pFillStyleItem = 0;
+ const XFillGradientItem* pFillGradientItem = 0;
const Color* pSectionTOXColor = 0;
SwRect aDummyRect;
- //UUUU
- FillAttributesPtr aFillAttributes;
-
- if ( GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false) )
+ if ( GetBackgroundBrush( pBackgrdBrush, pFillStyleItem, pFillGradientItem, pSectionTOXColor, aDummyRect, false) )
{
if ( pSectionTOXColor &&
(pSectionTOXColor->GetTransparency() != 0) &&
@@ -3891,10 +3837,6 @@ bool SwFlyFrm::IsBackgroundTransparent() const
{
bBackgroundTransparent = true;
}
- else if(aFillAttributes.get() && aFillAttributes->isUsed()) //UUUU
- {
- bBackgroundTransparent = aFillAttributes->isTransparent();
- }
else if ( pBackgrdBrush )
{
if ( (pBackgrdBrush->GetColor().GetTransparency() != 0) &&
@@ -4114,29 +4056,13 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( !bPaintCompleteBack &&
( bIsGraphicTransparent|| bContour ) )
{
- const SwFrmFmt* pSwFrmFmt = dynamic_cast< const SwFrmFmt* >(GetFmt());
-
- if(pSwFrmFmt && RES_FLYFRMFMT == pSwFrmFmt->Which())
- {
- //UUUU check for transparency
- const FillAttributesPtr aFillAttributes(pSwFrmFmt->getFillAttributes());
-
- // check if the new fill attributes are used
- if(aFillAttributes.get() && aFillAttributes->isUsed())
- {
- bPaintCompleteBack = true;
- }
- }
- else
- {
- const SvxBrushItem &rBack = GetFmt()->GetBackground();
- // OD 07.08.2002 #99657# #GetTransChg#
- // to determine, if background has to be painted, by checking, if
- // background color is not COL_TRANSPARENT ("no fill"/"auto fill")
- // or a background graphic exists.
- bPaintCompleteBack = !(rBack.GetColor() == COL_TRANSPARENT) ||
- rBack.GetGraphicPos() != GPOS_NONE;
- }
+ const SvxBrushItem &rBack = GetFmt()->GetBackground();
+ // OD 07.08.2002 #99657# #GetTransChg#
+ // to determine, if background has to be painted, by checking, if
+ // background color is not COL_TRANSPARENT ("no fill"/"auto fill")
+ // or a background graphic exists.
+ bPaintCompleteBack = !(rBack.GetColor() == COL_TRANSPARENT) ||
+ rBack.GetGraphicPos() != GPOS_NONE;
}
// paint of margin needed.
const bool bPaintMarginOnly( !bPaintCompleteBack &&
@@ -4602,7 +4528,7 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
void SwFrm::PaintBorderLine( const SwRect& rRect,
const SwRect& rOutRect,
- const SwPageFrm * /*pPage*/,
+ const SwPageFrm *pPage,
const Color *pColor,
const SvxBorderStyle nStyle ) const
{
@@ -4622,14 +4548,14 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
pColor = &SwViewOption::GetFontColor();
}
- //if ( pPage->GetSortedObjs() )
- //{
- // SwRegionRects aRegion( aOut, 4 );
- // ::lcl_SubtractFlys( this, pPage, aOut, aRegion );
- // for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
- // pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol );
- //}
- //else
+ if ( pPage->GetSortedObjs() )
+ {
+ SwRegionRects aRegion( aOut, 4 );
+ ::lcl_SubtractFlys( this, pPage, aOut, aRegion );
+ for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
+ pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol );
+ }
+ else
pLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol );
}
@@ -5905,9 +5831,9 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
return;
SwRegionRects aPgRegion( aPgRect );
aPgRegion -= aPgPrtRect;
- //const SwPageFrm* pPage = static_cast<const SwPageFrm*>(this);
- //if ( pPage->GetSortedObjs() )
- // ::lcl_SubtractFlys( this, pPage, aPgRect, aPgRegion );
+ const SwPageFrm* pPage = static_cast<const SwPageFrm*>(this);
+ if ( pPage->GetSortedObjs() )
+ ::lcl_SubtractFlys( this, pPage, aPgRect, aPgRegion );
if ( !aPgRegion.empty() )
{
OutputDevice *pOut = _pViewShell->GetOut();
@@ -6417,6 +6343,8 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
const SvxBrushItem* pItem;
+ const XFillStyleItem* pFillStyleItem;
+ const XFillGradientItem* pFillGradientItem;
// OD 05.09.2002 #102912#
// temporary background brush for a fly frame without a background brush
SvxBrushItem* pTmpBackBrush = 0;
@@ -6425,10 +6353,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
const bool bPageFrm = IsPageFrm();
bool bLowMode = true;
- //UUUU
- FillAttributesPtr aFillAttributes;
-
- bool bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, bLowerMode );
+ bool bBack = GetBackgroundBrush( pItem, pFillStyleItem, pFillGradientItem, pCol, aOrigBackRect, bLowerMode );
//- Output if a separate background is used.
bool bNoFlyBackground = !bFlyMetafile && !bBack && IsFlyFrm();
if ( bNoFlyBackground )
@@ -6438,7 +6363,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
// <GetBackgroundBrush> disabled this option with the parameter <bLowerMode>
if ( bLowerMode )
{
- bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false );
+ bBack = GetBackgroundBrush( pItem, pFillStyleItem, pFillGradientItem, pCol, aOrigBackRect, false );
}
// If still no background found for the fly frame, initialize the
// background brush <pItem> with global retouche color and set <bBack>
@@ -6456,18 +6381,11 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
)
{
pTmpBackBrush = new SvxBrushItem( Color( COL_WHITE ), RES_BACKGROUND );
-
- //UUU
- aFillAttributes.reset(new FillAttributes(Color( COL_WHITE )));
}
else
{
pTmpBackBrush = new SvxBrushItem( aGlobalRetoucheColor, RES_BACKGROUND);
-
- //UUU
- aFillAttributes.reset(new FillAttributes(aGlobalRetoucheColor));
}
-
pItem = pTmpBackBrush;
bBack = true;
}
@@ -6508,57 +6426,43 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
if ( aRect.HasArea() )
{
SvxBrushItem* pNewItem = 0;
- //SwRegionRects aRegion( aRect );
-
+ SwRegionRects aRegion( aRect );
if( pCol )
{
pNewItem = new SvxBrushItem( *pCol, RES_BACKGROUND );
pItem = pNewItem;
-
- //UUUU
- aFillAttributes.reset(new FillAttributes(*pCol));
}
-
- //if ( pPage->GetSortedObjs() )
- //{
- // ::lcl_SubtractFlys( this, pPage, aRect, aRegion );
- //}
+ if ( pPage->GetSortedObjs() )
+ ::lcl_SubtractFlys( this, pPage, aRect, aRegion );
// OD 06.08.2002 #99657# - determine, if background transparency
// have to be considered for drawing.
// --> Status Quo: background transparency have to be
// considered for fly frames
const bool bConsiderBackgroundTransparency = IsFlyFrm();
- bool bDone(false);
-
- if(pOut && aFillAttributes.get() && aFillAttributes->isUsed())
+ if (!pFillStyleItem || pFillStyleItem->GetValue() != XFILL_GRADIENT || !pFillGradientItem)
{
- bDone = DrawFillAttributes(aFillAttributes, aOrigBackRect, aRect, *pOut);
+ for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
+ {
+ if ( 1 < aRegion.size() )
+ {
+ ::SwAlignRect( aRegion[i], pGlobalShell );
+ if( !aRegion[i].HasArea() )
+ continue;
+ }
+ // OD 06.08.2002 #99657# - add 6th parameter to indicate, if
+ // background transparency have to be considered
+ // Set missing 5th parameter to the default value GRFNUM_NO
+ // - see declaration in /core/inc/frmtool.hxx.
+ if (IsTxtFrm() || !bOnlyTxtBackground)
+ ::DrawGraphic( pItem, pFillStyleItem, pFillGradientItem, pOut, aOrigBackRect, aRegion[i], GRFNUM_NO,
+ bConsiderBackgroundTransparency );
+ }
}
-
- if(!bDone)
+ else
{
- //for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
- //{
- // if ( 1 < aRegion.Count() )
- // {
- // ::SwAlignRect( aRegion[i], pGlobalShell );
- // if( !aRegion[i].HasArea() )
- // continue;
- // }
- // OD 06.08.2002 #99657# - add 6th parameter to indicate, if
- // background transparency have to be considered
- // Set missing 5th parameter to the default value GRFNUM_NO
- // - see declaration in /core/inc/frmtool.hxx.
- if (IsTxtFrm() || !bOnlyTxtBackground)
- ::DrawGraphic(
- pItem,
- pOut,
- aOrigBackRect,
- aRect, // aRegion[i],
- GRFNUM_NO,
+ ::DrawGraphic( pItem, pFillStyleItem, pFillGradientItem, pOut, aOrigBackRect, aRect, GRFNUM_NO,
bConsiderBackgroundTransparency );
- //}
}
if( pCol )
delete pNewItem;
@@ -7200,13 +7104,12 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
const Color& SwPageFrm::GetDrawBackgrdColor() const
{
const SvxBrushItem* pBrushItem;
+ const XFillStyleItem* pFillStyleItem;
+ const XFillGradientItem* pFillGradientItem;
const Color* pDummyColor;
SwRect aDummyRect;
- //UUUU
- FillAttributesPtr aFillAttributes;
-
- if ( GetBackgroundBrush( aFillAttributes, pBrushItem, pDummyColor, aDummyRect, true) )
+ if ( GetBackgroundBrush( pBrushItem, pFillStyleItem, pFillGradientItem, pDummyColor, aDummyRect, true) )
{
OUString referer;
SwViewShell * sh1 = getRootFrm()->GetCurrShell();
@@ -7365,37 +7268,27 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
@return true, if a background brush for the frame is found
*/
-bool SwFrm::GetBackgroundBrush(
- FillAttributesPtr& rFillAttributes,
- const SvxBrushItem* & rpBrush,
- const Color*& rpCol,
- SwRect &rOrigRect,
- bool bLowerMode ) const
+sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
+ const XFillStyleItem* & rpFillStyle,
+ const XFillGradientItem* & rpFillGradient,
+ const Color*& rpCol,
+ SwRect &rOrigRect,
+ bool bLowerMode ) const
{
const SwFrm *pFrm = this;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
const SwViewOption *pOpt = pSh->GetViewOptions();
rpBrush = 0;
+ rpFillStyle = 0;
+ rpFillGradient = 0;
rpCol = NULL;
do
{ if ( pFrm->IsPageFrm() && !pOpt->IsPageBack() )
return false;
- //UUUU
- const SwLayoutFrm* pSwLayoutFrm = dynamic_cast< const SwLayoutFrm* >(pFrm);
-
- if(pSwLayoutFrm)
- {
- const SwFrmFmt* pSwFrmFmt = dynamic_cast< const SwFrmFmt* >(pSwLayoutFrm->GetFmt());
-
- if(pSwFrmFmt && RES_FLYFRMFMT == pSwFrmFmt->Which())
- {
- rFillAttributes = pSwFrmFmt->getFillAttributes();
- }
- }
-
const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground();
-
+ const XFillStyleItem &rFillStyle = pFrm->GetAttrSet()->GetFillStyle();
+ const XFillGradientItem &rFillGradient = pFrm->GetAttrSet()->GetFillGradient();
if( pFrm->IsSctFrm() )
{
const SwSection* pSection = ((SwSectionFrm*)pFrm)->GetSection();
@@ -7433,25 +7326,18 @@ bool SwFrm::GetBackgroundBrush(
// add condition:
// If <bConsiderBackgroundTransparency> is set - see above -,
// return brush of frame <pFrm>, if its color is *not* "no fill"/"auto fill"
- if (
- // done when FillAttributesare set
- (rFillAttributes.get() && rFillAttributes->isUsed()) ||
-
- // done when SvxBrushItem is used
- !rBack.GetColor().GetTransparency() || rBack.GetGraphicPos() != GPOS_NONE ||
-
- // done when direct color is forced
- rpCol ||
-
- // done when consider BG transparency and color is not completely transparent
- (bConsiderBackgroundTransparency && (rBack.GetColor() != COL_TRANSPARENT))
+ if ( !rBack.GetColor().GetTransparency() ||
+ rBack.GetGraphicPos() != GPOS_NONE ||
+ rpCol ||
+ (bConsiderBackgroundTransparency && (rBack.GetColor() != COL_TRANSPARENT || rFillStyle.GetValue() == XFILL_GRADIENT))
)
{
rpBrush = &rBack;
- if ( pFrm->IsPageFrm() && pSh->GetViewOptions()->getBrowseMode() )
- {
+ rpFillStyle = &rFillStyle;
+ rpFillGradient = &rFillGradient;
+ if ( pFrm->IsPageFrm() &&
+ pSh->GetViewOptions()->getBrowseMode() )
rOrigRect = pFrm->Frm();
- }
else
{
if ( pFrm->Frm().SSize() != pFrm->Prt().SSize() )
@@ -7466,26 +7352,20 @@ bool SwFrm::GetBackgroundBrush(
rOrigRect += pFrm->Frm().Pos();
}
}
-
return true;
}
if ( bLowerMode )
- {
// Do not try to get background brush from parent (anchor/upper)
return false;
- }
// get parent frame - anchor or upper - for next loop
if ( pFrm->IsFlyFrm() )
- {
// OD 20.08.2002 - use "static_cast" instead of "old C-cast"
pFrm = (static_cast<const SwFlyFrm*>(pFrm))->GetAnchorFrm();
- }
else
- {
pFrm = pFrm->GetUpper();
- }
+
} while ( pFrm );
return false;
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index bbab6c3c3e88..9da99ccd2241 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -62,7 +62,6 @@
#include <dbg_lay.hxx>
#include <editeng/frmdiritem.hxx>
#include <sortedobjs.hxx>
-#include <svx/xdef.hxx>
using namespace ::com::sun::star;
@@ -298,6 +297,8 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
break;
case RES_BACKGROUND:
+ case RES_FILL_STYLE:
+ case RES_FILL_GRADIENT:
rInvFlags |= 0x28;
break;
@@ -334,11 +335,6 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
break;
default:
- //UUUU the new FillStyle has to do the same as previous RES_BACKGROUND
- if(nWhich >= XATTR_FILL_FIRST && nWhich <= XATTR_FILL_LAST)
- {
- rInvFlags |= 0x28;
- }
/* do Nothing */;
}
}
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 7ce119cc9441..1b133fb167e2 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -64,9 +64,6 @@
#include <EnhancedPDFExportHelper.hxx>
#include <docufld.hxx>
-//UUUU
-#include <frmfmt.hxx>
-
#include <unomid.h>
#if OSL_DEBUG_LEVEL > 1
@@ -502,16 +499,15 @@ static bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
if( ! pCol || COL_TRANSPARENT == pCol->GetColor() )
{
const SvxBrushItem* pItem;
+ const XFillStyleItem* pFillStyleItem;
+ const XFillGradientItem* pFillGradientItem;
SwRect aOrigBackRect;
- //UUUU
- FillAttributesPtr aFillAttributes;
-
// Consider, that [GetBackgroundBrush(...)] can set <pCol>
// See implementation in /core/layout/paintfrm.cxx
// There is a background color, if there is a background brush and
// its color is *not* "no fill"/"auto fill".
- if( rInf.GetTxtFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) )
+ if( rInf.GetTxtFrm()->GetBackgroundBrush( pItem, pFillStyleItem, pFillGradientItem, pCol, aOrigBackRect, false ) )
{
if ( !pCol )
pCol = &pItem->GetColor();
@@ -903,14 +899,8 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, bool bNoGraphic,
m_pOut->DrawRect( rRect.SVRect() );
else
{
- if(pBrushItem != ((SvxBrushItem*)-1))
- {
- ::DrawGraphic( pBrushItem, m_pOut, aItemRect, rRect );
- }
- else
- {
- OSL_ENSURE(false, "DrawRect: Uninitialized BrushItem!" );
- }
+ OSL_ENSURE( ((SvxBrushItem*)-1) != pBrushItem, "DrawRect: Uninitialized BrushItem!" );
+ ::DrawGraphic( pBrushItem, 0, 0, m_pOut, aItemRect, rRect );
}
}
}
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 5c946a715b3e..19ffe1f30d84 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -979,10 +979,8 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
if( bDraw && aTmp.HasArea() )
- {
- DrawGraphic( pBrush, (OutputDevice*)rInf.GetOut(),
+ DrawGraphic( pBrush, 0, 0, (OutputDevice*)rInf.GetOut(),
aTmp, aRepaint, bReplace ? GRFNUM_REPLACE : GRFNUM_YES );
- }
}
void SwGrfNumPortion::SetBase( long nLnAscent, long nLnDescent,
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index fb122fd4b570..24c8daaa063a 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -638,19 +638,13 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
for( MSHORT i = 0; i < aRegion.size(); ++i )
{
if ( bNoGraphic )
- {
pOut->DrawRect( aRegion[i].SVRect() );
- }
else
{
- if(((SvxBrushItem*)-1) != rInf.GetBrushItem())
- {
- ::DrawGraphic(rInf.GetBrushItem(), pOut, rInf.GetBrushRect(), aRegion[i] );
- }
- else
- {
- OSL_ENSURE(false, "DrawRect: Uninitialized BrushItem!" );
- }
+ OSL_ENSURE( ((SvxBrushItem*)-1) != rInf.GetBrushItem(),
+ "DrawRect: Uninitialized BrushItem!" );
+ ::DrawGraphic( rInf.GetBrushItem(), 0, 0, pOut, rInf.GetBrushRect(),
+ aRegion[i] );
}
}
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 1a6fd1cb4a7c..b4a80b771d96 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2515,18 +2515,17 @@ bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
if( ! pCol || COL_TRANSPARENT == pCol->GetColor() )
{
const SvxBrushItem* pItem;
+ const XFillStyleItem* pFillStyleItem;
+ const XFillGradientItem* pFillGradientItem;
SwRect aOrigBackRect;
- //UUUU
- FillAttributesPtr aFillAttributes;
-
/// OD 21.08.2002
/// consider, that [GetBackgroundBrush(...)] can set <pCol>
/// - see implementation in /core/layout/paintfrm.cxx
/// OD 21.08.2002 #99657#
/// There is a user defined setting for the background, if there
/// is a background brush and its color is *not* "no fill"/"auto fill".
- if( GetFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) )
+ if( GetFrm()->GetBackgroundBrush( pItem, pFillStyleItem, pFillGradientItem, pCol, aOrigBackRect, false ) )
{
if ( !pCol )
{
diff --git a/sw/source/core/uibase/app/docst.cxx b/sw/source/core/uibase/app/docst.cxx
index dc5af5c35665..5e846f730b9d 100644
--- a/sw/source/core/uibase/app/docst.cxx
+++ b/sw/source/core/uibase/app/docst.cxx
@@ -42,7 +42,6 @@
#include <fmtfsize.hxx>
#include <fchrfmt.hxx>
#include <svtools/htmlcfg.hxx>
-#include <svx/xdef.hxx>
#include <SwStyleNameMapper.hxx>
#include <SwRewriter.hxx>
#include <numrule.hxx>
@@ -570,14 +569,6 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl)
{
::ConvertAttrGenToChar(aTmpSet, CONV_ATTR_STD);
}
-
- //UUUU
- if(m_bNew && SFX_STYLE_FAMILY_FRAME == m_nFamily)
- {
- // clear FillStyle so that it works as a derived attribute
- aTmpSet.ClearItem(XATTR_FILLSTYLE);
- }
-
m_xTmp->SetItemSet( aTmpSet );
if( SFX_STYLE_FAMILY_PAGE == m_nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
@@ -604,10 +595,6 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl)
return m_nRet;
}
-//UUUU
-//#include <svx/svdmodel.hxx>
-//#include <svx/drawitem.hxx>
-
sal_uInt16 SwDocShell::Edit(
const OUString &rName,
const OUString &rParent,
@@ -739,20 +726,6 @@ sal_uInt16 SwDocShell::Edit(
}
if (!bBasic)
{
- //UUUU
- //if(SFX_STYLE_FAMILY_FRAME == nFamily)
- //{
- // //UUUU create needed items for XPropertyList entries from the DrawModel so that
- // // the Area TabPage can access them
- // SfxItemSet& rSet = xTmp->GetItemSet();
- // const SdrModel* pDrawModel = GetDoc()->GetDrawModel();
- //
- // rSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
- // rSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));
- // rSet.Put(SvxHatchListItem(pDrawModel->GetHatchListFromSdrModel(), SID_HATCH_LIST));
- // rSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapListFromSdrModel(), SID_BITMAP_LIST));
- //}
-
// prior to the dialog the HtmlMode at the DocShell is being sunk
sal_uInt16 nHtmlMode = ::GetHtmlMode(this);
diff --git a/sw/source/core/uibase/app/docstyle.cxx b/sw/source/core/uibase/app/docstyle.cxx
index d4c56b14bdaf..61e535d298fe 100644
--- a/sw/source/core/uibase/app/docstyle.cxx
+++ b/sw/source/core/uibase/app/docstyle.cxx
@@ -51,7 +51,6 @@
#include <numrule.hxx>
#include <fmthdft.hxx>
#include <svx/svxids.hrc>
-#include <svx/xdef.hxx>
#include <SwRewriter.hxx>
using namespace com::sun::star;
@@ -352,34 +351,25 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
pNumRule(0),
rDoc(rDocument),
- aCoreSet(GetPool().GetPool(), //UUUU sorted by indices, one double removed
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1, // [1
- RES_PARATR_BEGIN, RES_PARATR_END - 1, // [60
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1, // [77
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1, // [82
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, // [143
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
-
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, // [10023
- SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1, // [10050
- SID_ATTR_PAGE_HEADERSET,SID_ATTR_PAGE_FOOTERSET, // [10058
- SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, // [10065
-
- //UUUU items to hand over XPropertyList things like
- // XColorList, XHatchList, XGradientList and XBitmapList
- // to the Area TabPage
- SID_COLOR_TABLE, SID_BITMAP_LIST, // [10179
-
- SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION, // [10451
- SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, // [10457
- SID_SWREGISTER_MODE, SID_SWREGISTER_MODE, // [10467
- SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR, // [10590
- SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE, // [10855
- SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE, // [12065
- FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO, // [21123
- FN_COND_COLL, FN_COND_COLL, // [22401
+ aCoreSet(GetPool().GetPool(),
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_PARATR_BEGIN, RES_PARATR_END - 1,
+ RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
+ RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
+ SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1,
+ SID_ATTR_PAGE_HEADERSET,SID_ATTR_PAGE_FOOTERSET,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
+ SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL,
+ SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
+ SID_SWREGISTER_MODE, SID_SWREGISTER_MODE,
+ SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION,
+ FN_COND_COLL, FN_COND_COLL,
+ SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE,
+ SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
+ SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR,
+ SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
0),
bPhysical(false)
{
@@ -1095,11 +1085,6 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr)
}
// extract ItemSet to Name and Family, Mask
-
-//UUUU
-#include <svx/svdmodel.hxx>
-#include <svx/drawitem.hxx>
-
SfxItemSet& SwDocStyleSheet::GetItemSet()
{
if(!bPhysical)
@@ -1147,15 +1132,6 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
if(pFrmFmt->DerivedFrom())
aCoreSet.SetParent(&pFrmFmt->DerivedFrom()->GetAttrSet());
-
- //UUUU create needed items for XPropertyList entries from the DrawModel so that
- // the Area TabPage can access them
- const SdrModel* pDrawModel = rDoc.GetDrawModel();
-
- aCoreSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
- aCoreSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
- aCoreSet.Put(SvxHatchListItem(pDrawModel->GetHatchList(), SID_HATCH_LIST));
- aCoreSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapList(), SID_BITMAP_LIST));
}
}
break;
@@ -1459,14 +1435,6 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SfxItemSet aSet(rSet);
aSet.ClearInvalidItems();
- if(SFX_STYLE_FAMILY_FRAME == nFamily)
- {
- //UUUU Need to check for unique item for DrawingLayer items of type NameOrIndex
- // and evtl. correct that item to ensure unique names for that type. This call may
- // modify/correct entries inside of the given SfxItemSet
- rDoc.CheckForUniqueItemForLineFillNameOrIndex(aSet);
- }
-
aCoreSet.ClearItem();
if( pNewDsc )
diff --git a/sw/source/core/uibase/frmdlg/frmmgr.cxx b/sw/source/core/uibase/frmdlg/frmmgr.cxx
index e06aa49fbc94..089bd0ff5e82 100644
--- a/sw/source/core/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/core/uibase/frmdlg/frmmgr.cxx
@@ -28,7 +28,6 @@
#include <editeng/ulspitem.hxx>
#include <editeng/shaditem.hxx>
#include <svx/swframevalidation.hxx>
-#include <svx/xdef.hxx>
#include <fmtclds.hxx>
#include "wrtsh.hxx"
#include "view.hxx"
@@ -47,10 +46,6 @@ using namespace ::com::sun::star;
static sal_uInt16 aFrmMgrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
0};
diff --git a/sw/source/core/uibase/inc/frmdlg.hxx b/sw/source/core/uibase/inc/frmdlg.hxx
index 885140abf8f0..92b4354e3f5a 100644
--- a/sw/source/core/uibase/inc/frmdlg.hxx
+++ b/sw/source/core/uibase/inc/frmdlg.hxx
@@ -43,9 +43,7 @@ class SwFrmDlg : public SfxTabDialog
sal_uInt16 m_nPictureId;
sal_uInt16 m_nCropId;
sal_uInt16 m_nColumnId;
- //sal_uInt16 m_nBackgroundId;
- sal_uInt16 m_nAreaId;
- sal_uInt16 m_nTransparenceId;
+ sal_uInt16 m_nBackgroundId;
sal_uInt16 m_nMacroId;
sal_uInt16 m_nBorderId;
diff --git a/sw/source/core/uibase/inc/frmsh.hxx b/sw/source/core/uibase/inc/frmsh.hxx
index 0b8f7cb5ee9d..51a6ff08dc1e 100644
--- a/sw/source/core/uibase/inc/frmsh.hxx
+++ b/sw/source/core/uibase/inc/frmsh.hxx
@@ -41,14 +41,6 @@ public:
void StateInsert(SfxItemSet &rSet);
void StateStatusline(SfxItemSet &rSet);
-
- //UUUU
- void GetDrawAttrStateTextFrame(SfxItemSet &rSet);
- void ExecDrawAttrArgsTextFrame(SfxRequest& rReq);
-
- //UUUU
- void ExecDrawDlgTextFrame(SfxRequest& rReq);
- void DisableStateTextFrame(SfxItemSet &rSet);
};
#endif
diff --git a/sw/source/core/uibase/inc/tmpdlg.hxx b/sw/source/core/uibase/inc/tmpdlg.hxx
index e6ef9cdcf7ab..fb8333844d11 100644
--- a/sw/source/core/uibase/inc/tmpdlg.hxx
+++ b/sw/source/core/uibase/inc/tmpdlg.hxx
@@ -49,8 +49,6 @@ class SwTemplateDlg: public SfxStyleDialog
sal_uInt16 m_nOutlineId;
sal_uInt16 m_nDropCapsId;
sal_uInt16 m_nBackgroundId;
- sal_uInt16 m_nAreaId;
- sal_uInt16 m_nTransparenceId;
sal_uInt16 m_nBorderId;
sal_uInt16 m_nConditionId;
sal_uInt16 m_nTypeId;
diff --git a/sw/source/core/uibase/shells/basesh.cxx b/sw/source/core/uibase/shells/basesh.cxx
index aa63b4fa1597..e7dba76b343e 100644
--- a/sw/source/core/uibase/shells/basesh.cxx
+++ b/sw/source/core/uibase/shells/basesh.cxx
@@ -54,7 +54,6 @@
#include <editeng/opaqitem.hxx>
#include <editeng/sizeitem.hxx>
#include <svx/flagsdef.hxx>
-#include <svx/xflclit.hxx>
#include <editeng/scripttypeitem.hxx>
#include <sfx2/objface.hxx>
#include <fmturl.hxx>
@@ -2160,42 +2159,15 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
SvxBrushItem aBrushItem( RES_BACKGROUND );
if( nsSelectionType::SEL_TBL_CELLS & nSelType )
- {
rSh.GetBoxBackground( aBrushItem );
- }
else
{
- //UUUU
- if(nSelType & nsSelectionType::SEL_GRF)
- {
- SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
-
+ SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
+ if( nSelType & nsSelectionType::SEL_GRF || nsSelectionType::SEL_FRM & nSelType )
rSh.GetFlyFrmAttr( aCoreSet );
- aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
- }
- else if(nsSelectionType::SEL_FRM & nSelType)
- {
- SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
- const XFillStyleItem& rXFillStyleItem(static_cast< const XFillStyleItem& >(aCoreSet.Get(XATTR_FILLSTYLE)));
-
- if(XFILL_SOLID == rXFillStyleItem.GetValue())
- {
- const Color aFillColor(static_cast< const XFillColorItem& >(aCoreSet.Get(XATTR_FILLCOLOR)).GetColorValue());
-
- aBrushItem.SetColor(aFillColor);
- }
- else
- {
- // keep default in SvxBrushItem which equals no fill
- }
- }
else
- {
- SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
-
rSh.GetCurAttr( aCoreSet );
- aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
- }
+ aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
}
while ( nWhich )
@@ -2239,37 +2211,12 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
else
{
- //UUUU
- if(nSelType & nsSelectionType::SEL_GRF)
- {
- SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
-
+ SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
+ if( (nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType) )
rSh.GetFlyFrmAttr( aCoreSet );
- aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
- }
- else if(nsSelectionType::SEL_FRM & nSelType)
- {
- SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
- const XFillStyleItem& rXFillStyleItem(static_cast< const XFillStyleItem& >(aCoreSet.Get(XATTR_FILLSTYLE)));
-
- if(XFILL_SOLID == rXFillStyleItem.GetValue())
- {
- const Color aFillColor(static_cast< const XFillColorItem& >(aCoreSet.Get(XATTR_FILLCOLOR)).GetColorValue());
-
- aBrushItem.SetColor(aFillColor);
- }
- else
- {
- // keep default in SvxBrushItem which equals no fill
- }
- }
else
- {
- SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
-
rSh.GetCurAttr( aCoreSet );
- aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
- }
+ aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
}
switch (nSlot)
@@ -2313,8 +2260,8 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
{
rSh.SetBoxBackground( aBrushItem );
}
- //UUUU
- else if(nsSelectionType::SEL_GRF & nSelType)
+ else if( (nsSelectionType::SEL_FRM & nSelType) ||
+ (nsSelectionType::SEL_GRF & nSelType) )
{
SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
aCoreSet.Put( aBrushItem );
@@ -2325,26 +2272,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
else
rSh.SetFlyFrmAttr( aCoreSet );
}
- else if(nsSelectionType::SEL_FRM & nSelType)
- {
- SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
-
- // set FillStyle and color when applying
- aCoreSet.Put(XFillStyleItem(XFILL_SOLID));
- aCoreSet.Put(XFillColorItem(OUString(), aBrushItem.GetColor()));
-
- // Vorlagen-AutoUpdate
- SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
-
- if(pFmt && pFmt->IsAutoUpdateFmt())
- {
- rSh.AutoUpdateFrame( pFmt, aCoreSet);
- }
- else
- {
- rSh.SetFlyFrmAttr( aCoreSet );
- }
- }
else
{
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
diff --git a/sw/source/core/uibase/shells/drawdlg.cxx b/sw/source/core/uibase/shells/drawdlg.cxx
index ce37589eb08e..989483e2c843 100644
--- a/sw/source/core/uibase/shells/drawdlg.cxx
+++ b/sw/source/core/uibase/shells/drawdlg.cxx
@@ -81,7 +81,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog( NULL,
&aNewAttr,
pDoc,
- true);
+ pView);
if (pDlg->Execute() == RET_OK)
{
pSh->StartAction();
diff --git a/sw/source/core/uibase/shells/frmsh.cxx b/sw/source/core/uibase/shells/frmsh.cxx
index 6656c24f7b82..b1525b4c88c1 100644
--- a/sw/source/core/uibase/shells/frmsh.cxx
+++ b/sw/source/core/uibase/shells/frmsh.cxx
@@ -63,6 +63,7 @@
#include <swwait.hxx>
#include <docstat.hxx>
#include <IDocumentStatistics.hxx>
+
#include <comphelper/processfactory.hxx>
#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
@@ -78,9 +79,6 @@
#include <svx/dialogs.hrc>
#include <wordcountdialog.hxx>
-#include <docsh.hxx>
-#include <svx/drawitem.hxx>
-
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -412,42 +410,22 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
else
{
- SfxItemSet aSet(GetPool(), //UUUU sorted by indices
- RES_FRMATR_BEGIN, RES_FRMATR_END-1, // [82
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
-
- SID_DOCFRAME, SID_DOCFRAME, // [5598
-
- SID_ATTR_BRUSH, SID_ATTR_BRUSH, // [10001
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, // [10023
- SID_ATTR_LRSPACE, SID_ATTR_ULSPACE, // [10048
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, // [10051
-
- //UUUU items to hand over XPropertyList things like
- // XColorList, XHatchList, XGradientList and XBitmapList
- // to the Area TabPage
- SID_COLOR_TABLE, SID_BITMAP_LIST, // [10179
-
- SID_HTML_MODE, SID_HTML_MODE, // [10414
- FN_GET_PRINT_AREA, FN_GET_PRINT_AREA, // [21032
- FN_SURROUND, FN_HORI_ORIENT, // [21303
- FN_SET_FRM_NAME, FN_KEEP_ASPECT_RATIO, // [21306
- FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, // [21318
- FN_OLE_IS_MATH, FN_MATH_BASELINE_ALIGNMENT, // [22314
- FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT, // [22420
-
- 0);
-
- //UUUU create needed items for XPropertyList entries from the DrawModel so that
- // the Area TabPage can access them
- const SdrModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
-
- aSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
- aSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
- aSet.Put(SvxHatchListItem(pDrawModel->GetHatchList(), SID_HATCH_LIST));
- aSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapList(), SID_BITMAP_LIST));
+ SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
+ SID_ATTR_BRUSH, SID_ATTR_BRUSH,
+ SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
+ FN_SURROUND, FN_HORI_ORIENT,
+ FN_SET_FRM_NAME, FN_SET_FRM_NAME,
+ FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
+ SID_DOCFRAME, SID_DOCFRAME,
+ SID_HTML_MODE, SID_HTML_MODE,
+ FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
+ FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
+ FN_OLE_IS_MATH, FN_OLE_IS_MATH,
+ FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
+ 0);
const SwViewOption* pVOpt = rSh.GetViewOptions();
if(nSel & nsSelectionType::SEL_OLE)
@@ -1206,157 +1184,4 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet)
}
}
-//UUUU
-void SwFrameShell::GetDrawAttrStateTextFrame(SfxItemSet &rSet)
-{
- SwWrtShell &rSh = GetShell();
-
- if(rSh.IsFrmSelected())
- {
- rSh.GetFlyFrmAttr(rSet);
- }
- else
- {
- SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
-
- if(pSdrView)
- {
- rSet.Put(pSdrView->GetDefaultAttr());
- }
- }
-}
-
-//UUUU
-void SwFrameShell::ExecDrawAttrArgsTextFrame(SfxRequest& rReq)
-{
- const SfxItemSet* pArgs = rReq.GetArgs();
- SwWrtShell& rSh = GetShell();
-
- if(pArgs)
- {
- if(rSh.IsFrmSelected())
- {
- rSh.SetFlyFrmAttr(const_cast< SfxItemSet& >(*pArgs));
- }
- else
- {
- SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
-
- if(pSdrView)
- {
- pSdrView->SetDefaultAttr(*pArgs, false);
- }
- }
- }
- else
- {
- SfxDispatcher* pDis = rSh.GetView().GetViewFrame()->GetDispatcher();
-
- switch(rReq.GetSlot())
- {
- case SID_ATTR_FILL_STYLE:
- case SID_ATTR_FILL_COLOR:
- case SID_ATTR_FILL_GRADIENT:
- case SID_ATTR_FILL_HATCH:
- case SID_ATTR_FILL_BITMAP:
- case SID_ATTR_FILL_TRANSPARENCE:
- case SID_ATTR_FILL_FLOATTRANSPARENCE:
- {
- pDis->Execute(SID_ATTRIBUTES_AREA, sal_False);
- break;
- }
- }
- }
-}
-
-//UUUU
-void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq)
-{
- switch(rReq.GetSlot())
- {
- case SID_ATTRIBUTES_AREA:
- {
- SwWrtShell& rSh = GetShell();
-
- if(rSh.IsFrmSelected())
- {
- SdrView* pView = rSh.GetDrawView();
- SdrModel* pDoc = pView->GetModel();
- SfxItemSet aNewAttr(pDoc->GetItemPool());
-
- // get attributes from FlyFrame
- rSh.GetFlyFrmAttr(aNewAttr);
-
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
- AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog(
- NULL,
- &aNewAttr,
- pDoc,
- false);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
-
- if(RET_OK == pDlg->Execute())
- {
- // set attributes at FlyFrame
- rSh.SetFlyFrmAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet()));
-
- static sal_uInt16 aInval[] =
- {
- SID_ATTR_FILL_STYLE,
- SID_ATTR_FILL_COLOR,
- SID_ATTR_FILL_TRANSPARENCE,
- SID_ATTR_FILL_FLOATTRANSPARENCE,
- 0
- };
-
- SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
-
- rBnd.Invalidate(aInval);
- rBnd.Update(SID_ATTR_FILL_STYLE);
- rBnd.Update(SID_ATTR_FILL_COLOR);
- rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
- rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
- }
-
- delete pDlg;
- }
-
- break;
- }
- }
-}
-
-//UUUU
-void SwFrameShell::DisableStateTextFrame(SfxItemSet &rSet)
-{
- SfxWhichIter aIter(rSet);
- sal_uInt16 nWhich(aIter.FirstWhich());
-
- while(nWhich)
- {
- switch(nWhich)
- {
- case SID_ATTRIBUTES_AREA:
- {
- SwWrtShell& rSh = GetShell();
-
- if(!rSh.IsFrmSelected())
- {
- rSet.DisableItem(nWhich);
- }
-
- break;
- }
- default:
- {
- rSet.DisableItem(nWhich);
- break;
- }
- }
-
- nWhich = aIter.NextWhich();
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/shells/grfsh.cxx b/sw/source/core/uibase/shells/grfsh.cxx
index 3e5822a4421f..e81d1bfe079f 100644
--- a/sw/source/core/uibase/shells/grfsh.cxx
+++ b/sw/source/core/uibase/shells/grfsh.cxx
@@ -68,10 +68,6 @@
#include <svx/graphichelper.hxx>
#include <doc.hxx>
-#include <doc.hxx>
-#include <docsh.hxx>
-#include <svx/drawitem.hxx>
-
#define SwGrfShell
#include <sfx2/msg.hxx>
@@ -208,42 +204,23 @@ void SwGrfShell::Execute(SfxRequest &rReq)
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
- SfxItemSet aSet(GetPool(), //UUUU sorted by indices
-
- RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [ 82
- RES_GRFATR_MIRRORGRF,RES_GRFATR_CROPGRF, // [ 123
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST, // [ 1014
-
- SID_DOCFRAME,SID_DOCFRAME, // [ 5598
- SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
- SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
- SID_ATTR_GRAF_KEEP_ZOOM,SID_ATTR_GRAF_KEEP_ZOOM, // [10882
- SID_ATTR_GRAF_FRMSIZE,SID_ATTR_GRAF_GRAPHIC, // [10884, contains SID_ATTR_GRAF_FRMSIZE_PERCENT
-
- //UUUU items to hand over XPropertyList things like
- // XColorList, XHatchList, XGradientList and XBitmapList
- // to the Area TabPage
- SID_COLOR_TABLE, SID_BITMAP_LIST, // [10179
-
- SID_HTML_MODE,SID_HTML_MODE, // [10414
- FN_GET_PRINT_AREA,FN_GET_PRINT_AREA, // [21032
- FN_PARAM_GRF_CONNECT,FN_PARAM_GRF_CONNECT, // [21153
- FN_PARAM_GRF_DIALOG,FN_PARAM_GRF_DIALOG, // [21171
- FN_SET_FRM_NAME,FN_KEEP_ASPECT_RATIO, // [21306
- FN_SET_FRM_ALT_NAME,FN_SET_FRM_ALT_NAME, // [21318
- SID_REFERER, SID_REFERER,
- 0);
-
- //UUUU create needed items for XPropertyList entries from the DrawModel so that
- // the Area TabPage can access them
- const SdrModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
-
- aSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
- aSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
- aSet.Put(SvxHatchListItem(pDrawModel->GetHatchList(), SID_HATCH_LIST));
- aSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapList(), SID_BITMAP_LIST));
+ SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
+ RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ SID_ATTR_GRAF_KEEP_ZOOM, SID_ATTR_GRAF_KEEP_ZOOM,
+ SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_FRMSIZE,
+ SID_ATTR_GRAF_FRMSIZE_PERCENT, SID_ATTR_GRAF_FRMSIZE_PERCENT,
+ SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC,
+ FN_PARAM_GRF_CONNECT, FN_PARAM_GRF_CONNECT,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
+ FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
+ FN_SET_FRM_NAME, FN_KEEP_ASPECT_RATIO,
+ FN_PARAM_GRF_DIALOG, FN_PARAM_GRF_DIALOG,
+ SID_DOCFRAME, SID_DOCFRAME,
+ SID_HTML_MODE, SID_HTML_MODE,
+ FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
+ SID_REFERER, SID_REFERER,
+ 0);
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
diff --git a/sw/source/core/unocore/unobrushitemhelper.cxx b/sw/source/core/unocore/unobrushitemhelper.cxx
deleted file mode 100644
index fe1a4962b62d..000000000000
--- a/sw/source/core/unocore/unobrushitemhelper.cxx
+++ /dev/null
@@ -1,327 +0,0 @@
-/* -*- 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 <unobrushitemhelper.hxx>
-#include <svx/xfillit0.hxx>
-#include <svx/xbtmpit.hxx>
-#include <svx/xgrscit.hxx>
-#include <svx/xflbmtit.hxx>
-#include <svx/xflbmpit.hxx>
-#include <svx/xflbmsxy.hxx>
-#include <svx/xflbmsxy.hxx>
-#include <svx/xflftrit.hxx>
-#include <svx/xsflclit.hxx>
-#include <svx/xflbmsli.hxx>
-#include <svx/xflbtoxy.hxx>
-#include <svx/xflbstit.hxx>
-#include <svx/xflboxy.hxx>
-#include <svx/xflbckit.hxx>
-#include <svx/unoshape.hxx>
-#include <hintids.hxx>
-#include <svx/xflclit.hxx>
-#include <svx/xfltrit.hxx>
-#include <svx/xflhtit.hxx>
-
-namespace sw {
-
-//UUUU
-void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxItemSet& rToSet)
-{
- if(0xff != rBrush.GetColor().GetTransparency())
- {
- const Color aColor(rBrush.GetColor().GetRGBColor());
- const sal_uInt8 nTransparency(rBrush.GetColor().GetTransparency());
-
- rToSet.Put(XFillStyleItem(XFILL_SOLID));
- rToSet.Put(XFillColorItem(OUString(), aColor));
-
- if(0xff != nTransparency)
- {
- // nTransparency is in range [0..255]
- rToSet.Put(XFillTransparenceItem((((sal_Int32)nTransparency * 100) + 127) / 255));
- }
- }
- else if(GPOS_NONE != rBrush.GetGraphicPos())
- {
- const Graphic* pGraphic = rBrush.GetGraphic();
-
- if(pGraphic)
- {
- // set fill style and graphic itself
- rToSet.Put(XFillStyleItem(XFILL_BITMAP));
- rToSet.Put(XFillBitmapItem(OUString(), *pGraphic));
-
- // set defaults
- // already pool default rToSet.Put(XFillBmpPosItem(RP_MM));
- // already pool default rToSet.Put(XFillBmpTileOffsetXItem(0));
- // already pool default rToSet.Put(XFillBmpTileOffsetYItem(0));
- // already pool default rToSet.Put(XFillBmpPosOffsetXItem(0));
- // already pool default rToSet.Put(XFillBmpPosOffsetYItem(0));
- // already pool default rToSet.Put(XFillBmpSizeLogItem(true));
- // already pool default rToSet.Put(XFillBmpSizeXItem(0));
- // already pool default rToSet.Put(XFillBmpSizeYItem(0));
-
- if(GPOS_AREA == rBrush.GetGraphicPos())
- {
- // stretch, also means no tile (both items are defaulted to true)
- // rToSet.Put(XFillBmpStretchItem(true));
- rToSet.Put(XFillBmpTileItem(false));
-
- // default for strech is also top-left, but this will not be visible
- // rToSet.Put(XFillBmpPosItem(RP_LT));
- }
- else if(GPOS_TILED == rBrush.GetGraphicPos())
- {
- // tiled, also means no stretch (both items are defaulted to true)
- rToSet.Put(XFillBmpStretchItem(false));
- //rToSet.Put(XFillBmpTileItem(true));
-
- // default for tiled is top-left
- rToSet.Put(XFillBmpPosItem(RP_LT));
- }
- else
- {
- // everything else means no tile and no stretch
- rToSet.Put(XFillBmpStretchItem(false));
- rToSet.Put(XFillBmpTileItem(false));
-
- switch(rBrush.GetGraphicPos())
- {
- case GPOS_LT: rToSet.Put(XFillBmpPosItem(RP_LT)); break;
- case GPOS_MT: rToSet.Put(XFillBmpPosItem(RP_MT)); break;
- case GPOS_RT: rToSet.Put(XFillBmpPosItem(RP_RT)); break;
- case GPOS_LM: rToSet.Put(XFillBmpPosItem(RP_LM)); break;
- case GPOS_MM: rToSet.Put(XFillBmpPosItem(RP_MM)); break;
- case GPOS_RM: rToSet.Put(XFillBmpPosItem(RP_RM)); break;
- case GPOS_LB: rToSet.Put(XFillBmpPosItem(RP_LB)); break;
- case GPOS_MB: rToSet.Put(XFillBmpPosItem(RP_MB)); break;
- case GPOS_RB: rToSet.Put(XFillBmpPosItem(RP_RB)); break;
- default: break; // already handled GPOS_AREA, GPOS_TILED and GPOS_NONE
- }
- }
-
- // check for transparency
- const sal_Int8 nTransparency(rBrush.getGraphicTransparency());
-
- if(0 != nTransparency)
- {
- // nTransparency is in range [0..100]
- rToSet.Put(XFillTransparenceItem(nTransparency));
- }
- }
- else
- {
- OSL_ENSURE(false, "Could not get Graphic from SvxBrushItem (!)");
- }
- }
- else
- {
- // GPOS_NONE == rBrush.GetGraphicPos() && 0xff == rBrush.GetColor().GetTransparency(),
- // still need to rescue the color used. There are sequences used on the UNO API at
- // import time (OLE. e.g. chart) which first set RGB color (MID_BACK_COLOR_R_G_B,
- // color stays transparent) and then set transparency (MID_BACK_COLOR_TRANSPARENCY)
- // to zero later. When not saving the color, it will be lost
- const Color aColor(rBrush.GetColor().GetRGBColor());
-
- // rToSet.Put(XFillStyleItem(XFILL_NONE));
- rToSet.Put(XFillColorItem(OUString(), aColor));
- }
-}
-
-//UUUU
-sal_uInt16 getTransparenceForSvxBrushItem(const SfxItemSet& rSourceSet, bool bSearchInParents)
-{
- sal_uInt16 nFillTransparence(static_cast< const XFillTransparenceItem& >(rSourceSet.Get(XATTR_FILLTRANSPARENCE, bSearchInParents)).GetValue());
- const SfxPoolItem* pGradientItem = 0;
-
- if(SFX_ITEM_SET == rSourceSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, bSearchInParents, &pGradientItem)
- && static_cast< const XFillFloatTransparenceItem* >(pGradientItem)->IsEnabled())
- {
- const XGradient& rGradient = static_cast< const XFillFloatTransparenceItem* >(pGradientItem)->GetGradientValue();
- const sal_uInt16 nStartLuminance(rGradient.GetStartColor().GetLuminance());
- const sal_uInt16 nEndLuminance(rGradient.GetEndColor().GetLuminance());
-
- // luminance is [0..255], transparence needs to be in [0..100].Maximum is 51200, thus sal_uInt16 is okay to use
- nFillTransparence = static_cast< sal_uInt16 >(((nStartLuminance + nEndLuminance) * 100) / 512);
- }
-
- return nFillTransparence;
-}
-
-//UUUU
-SvxBrushItem getSvxBrushItemForSolid(const SfxItemSet& rSourceSet, bool bSearchInParents)
-{
- Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
-
- // get evtl. mixed transparence
- const sal_uInt16 nFillTransparence(getTransparenceForSvxBrushItem(rSourceSet, bSearchInParents));
-
- if(0 != nFillTransparence)
- {
- // nFillTransparence is in range [0..100] and needs to be in [0..255] unsigned
- aFillColor.SetTransparency(static_cast< sal_uInt8 >((nFillTransparence * 255) / 100));
- }
-
- return SvxBrushItem(aFillColor, RES_BACKGROUND);
-}
-
-//UUUU
-SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, bool bSearchInParents)
-{
- const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rSourceSet.GetItem(XATTR_FILLSTYLE, bSearchInParents)));
-
- if(!pXFillStyleItem || XFILL_NONE == pXFillStyleItem->GetValue())
- {
- // need to rescue the evtl. set RGB color, but use as transparent color (we have XFILL_NONE)
- Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
- aFillColor.SetTransparency(0xff);
-
- return SvxBrushItem(aFillColor, RES_BACKGROUND);
- }
-
- SvxBrushItem aRetval(RES_BACKGROUND);
-
- switch(pXFillStyleItem->GetValue())
- {
- case XFILL_NONE:
- {
- // already handled above, can not happen again
- break;
- }
- case XFILL_SOLID:
- {
- // create SvxBrushItem with fill color
- aRetval = getSvxBrushItemForSolid(rSourceSet, bSearchInParents);
- break;
- }
- case XFILL_GRADIENT:
- {
- // cannot be directly supported, but do the best possible
- const XGradient aXGradient(static_cast< const XFillGradientItem& >(rSourceSet.Get(XATTR_FILLGRADIENT)).GetGradientValue());
- const basegfx::BColor aStartColor(aXGradient.GetStartColor().getBColor() * (aXGradient.GetStartIntens() * 0.01));
- const basegfx::BColor aEndColor(aXGradient.GetEndColor().getBColor() * (aXGradient.GetEndIntens() * 0.01));
-
- // use half/half mixed color from gradient start and end
- Color aMixedColor((aStartColor + aEndColor) * 0.5);
-
- // get evtl. mixed transparence
- const sal_uInt16 nFillTransparence(getTransparenceForSvxBrushItem(rSourceSet, bSearchInParents));
-
- if(0 != nFillTransparence)
- {
- // nFillTransparence is in range [0..100] and needs to be in [0..255] unsigned
- aMixedColor.SetTransparency(static_cast< sal_uInt8 >((nFillTransparence * 255) / 100));
- }
-
- aRetval = SvxBrushItem(aMixedColor, RES_BACKGROUND);
- break;
- }
- case XFILL_HATCH:
- {
- // cannot be directly supported, but do the best possible
- const XHatch& rHatch(static_cast< const XFillHatchItem& >(rSourceSet.Get(XATTR_FILLHATCH)).GetHatchValue());
- const bool bFillBackground(static_cast< const XFillBackgroundItem& >(rSourceSet.Get(XATTR_FILLBACKGROUND)).GetValue());
-
- if(bFillBackground)
- {
- // hatch is background-filled, use FillColor as if XFILL_SOLID
- aRetval = getSvxBrushItemForSolid(rSourceSet, bSearchInParents);
- }
- else
- {
- // hatch is not background-filled and using hatch color would be too dark; compensate
- // somewhat by making it more transparent
- Color aHatchColor(rHatch.GetColor());
-
- // get evtl. mixed transparence
- sal_uInt16 nFillTransparence(getTransparenceForSvxBrushItem(rSourceSet, bSearchInParents));
-
- // take half orig transparence, add half transparent, clamp result
- nFillTransparence = basegfx::clamp((sal_uInt16)((nFillTransparence / 2) + 50), (sal_uInt16)0, (sal_uInt16)255);
-
- // nFillTransparence is in range [0..100] and needs to be in [0..255] unsigned
- aHatchColor.SetTransparency(static_cast< sal_uInt8 >((nFillTransparence * 255) / 100));
-
- aRetval = SvxBrushItem(aHatchColor, RES_BACKGROUND);
- }
-
- break;
- }
- case XFILL_BITMAP:
- {
- // create SvxBrushItem with bitmap info and flags
- const XFillBitmapItem& rBmpItm = static_cast< const XFillBitmapItem& >(rSourceSet.Get(XATTR_FILLBITMAP, bSearchInParents));
- const Graphic aGraphic(rBmpItm.GetGraphicObject().GetGraphic());
-
- if(GRAPHIC_NONE != aGraphic.GetType())
- {
- // get graphic position
- SvxGraphicPosition aSvxGraphicPosition(GPOS_NONE);
- const XFillBmpStretchItem& rStretchItem = static_cast< const XFillBmpStretchItem& >(rSourceSet.Get(XATTR_FILLBMP_STRETCH, bSearchInParents));
- const XFillBmpTileItem& rTileItem = static_cast< const XFillBmpTileItem& >(rSourceSet.Get(XATTR_FILLBMP_TILE, bSearchInParents));
-
- if(rTileItem.GetValue())
- {
- aSvxGraphicPosition = GPOS_TILED;
- }
- else if(rStretchItem.GetValue())
- {
- aSvxGraphicPosition = GPOS_AREA;
- }
- else
- {
- const XFillBmpPosItem& rPosItem = static_cast< const XFillBmpPosItem& >(rSourceSet.Get(XATTR_FILLBMP_POS, bSearchInParents));
-
- switch(rPosItem.GetValue())
- {
- case RP_LT: aSvxGraphicPosition = GPOS_LT; break;
- case RP_MT: aSvxGraphicPosition = GPOS_MT; break;
- case RP_RT: aSvxGraphicPosition = GPOS_RT; break;
- case RP_LM: aSvxGraphicPosition = GPOS_LM; break;
- case RP_MM: aSvxGraphicPosition = GPOS_MM; break;
- case RP_RM: aSvxGraphicPosition = GPOS_RM; break;
- case RP_LB: aSvxGraphicPosition = GPOS_LB; break;
- case RP_MB: aSvxGraphicPosition = GPOS_MB; break;
- case RP_RB: aSvxGraphicPosition = GPOS_RB; break;
- }
- }
-
- // create with given graphic and position
- aRetval = SvxBrushItem(aGraphic, aSvxGraphicPosition, RES_BACKGROUND);
-
- // get evtl. mixed transparence
- const sal_uInt16 nFillTransparence(getTransparenceForSvxBrushItem(rSourceSet, bSearchInParents));
-
- if(0 != nFillTransparence)
- {
- // nFillTransparence is in range [0..100] and needs to be in [0..100] signed
- aRetval.setGraphicTransparency(static_cast< sal_Int8 >(nFillTransparence));
- }
- }
-
- break;
- }
- }
-
- return aRetval;
-}
-
-} // namespace sw
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 405d5d805553..9aa7bad93a50 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/embed/XClassifiedObject.hpp>
@@ -33,7 +32,6 @@
#include <svx/xfillit0.hxx>
#include <svx/xflgrit.hxx>
#include <svx/sdtaitm.hxx>
-#include <svx/xflclit.hxx>
#include <editeng/memberids.hrc>
#include <swtypes.hxx>
@@ -116,26 +114,6 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
-//UUUU
-#include <unobrushitemhelper.hxx>
-#include <svx/xfillit0.hxx>
-#include <svx/xbtmpit.hxx>
-#include <svx/xgrscit.hxx>
-#include <svx/xflbmtit.hxx>
-#include <svx/xflbmpit.hxx>
-#include <svx/xflbmsxy.hxx>
-#include <svx/xflbmsxy.hxx>
-#include <svx/xflftrit.hxx>
-#include <svx/xsflclit.hxx>
-#include <svx/xflbmsli.hxx>
-#include <svx/xflbtoxy.hxx>
-#include <svx/xflbstit.hxx>
-#include <svx/xflboxy.hxx>
-#include <svx/xflbckit.hxx>
-#include <svx/unoshape.hxx>
-#include <svx/xflhtit.hxx>
-#include <svx/xfltrit.hxx>
-
// from fefly1.cxx
extern bool sw_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet );
@@ -148,9 +126,9 @@ using ::com::sun::star::style::XStyleFamiliesSupplier;
const sal_Char sPackageProtocol[] = "vnd.sun.star.Package:";
const sal_Char sGraphicObjectProtocol[] = "vnd.sun.star.GraphicObject:";
-//UUUU
-#define OWN_ATTR_FILLBMP_MODE (OWN_ATTR_VALUE_START+45)
-
+/****************************************************************************
+ Rahmenbeschreibung
+****************************************************************************/
class BaseFrameProperties_Impl
{
SwUnoCursorHelper::SwAnyMapHelper aAnyMap;
@@ -160,9 +138,10 @@ public:
void SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal);
bool GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& pAny );
- bool FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet &rFromSet, bool& rSizeFound);
+ bool FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSet, const SfxItemSet &rFromSet, bool& rSizeFound);
virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) = 0;
+
};
BaseFrameProperties_Impl::~BaseFrameProperties_Impl()
@@ -179,7 +158,7 @@ bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId,
return aAnyMap.FillValue( nWID, nMemberId, rpAny );
}
-bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet& rFromSet, bool& rSizeFound)
+bool BaseFrameProperties_Impl::FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSet, const SfxItemSet& rFromSet, bool& rSizeFound)
{
bool bRet = true;
//Anker kommt auf jeden Fall in den Set
@@ -192,397 +171,113 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
if(GetProperty(RES_ANCHOR, MID_ANCHOR_ANCHORTYPE, pAnchorType))
bRet &= ((SfxPoolItem&)aAnchor).PutValue(*pAnchorType, MID_ANCHOR_ANCHORTYPE);
}
-
rToSet.Put(aAnchor);
-
- //UUUU check for SvxBrushItem (RES_BACKGROUND) properties
- const ::uno::Any* pCol = 0; GetProperty(RES_BACKGROUND, MID_BACK_COLOR, pCol );
- const ::uno::Any* pRGBCol = 0; GetProperty(RES_BACKGROUND, MID_BACK_COLOR_R_G_B, pRGBCol );
- const ::uno::Any* pColTrans = 0; GetProperty(RES_BACKGROUND, MID_BACK_COLOR_TRANSPARENCY, pColTrans);
- const ::uno::Any* pTrans = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENT, pTrans );
- const ::uno::Any* pGrLoc = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_POSITION, pGrLoc );
- const ::uno::Any* pGrURL = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_URL, pGrURL );
- const ::uno::Any* pGrFilter = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_FILTER, pGrFilter );
- const ::uno::Any* pGrTranparency = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENCY, pGrTranparency );
- const bool bSvxBrushItemPropertiesUsed(
- pCol ||
- pTrans ||
- pGrURL ||
- pGrFilter ||
- pGrLoc ||
- pGrTranparency ||
- pColTrans ||
- pRGBCol);
-
- //UUUU check for FillStyle properties in the range XATTR_FILL_FIRST, XATTR_FILL_LAST
- const uno::Any* pXFillStyleItem = 0; GetProperty(XATTR_FILLSTYLE, 0, pXFillStyleItem);
- const uno::Any* pXFillColorItem = 0; GetProperty(XATTR_FILLCOLOR, 0, pXFillColorItem);
-
- // XFillGradientItem: two possible slots supported in UNO API
- const uno::Any* pXFillGradientItem = 0; GetProperty(XATTR_FILLGRADIENT, MID_FILLGRADIENT, pXFillGradientItem);
- const uno::Any* pXFillGradientNameItem = 0; GetProperty(XATTR_FILLGRADIENT, MID_NAME, pXFillGradientNameItem);
-
- // XFillHatchItem: two possible slots supported in UNO API
- const uno::Any* pXFillHatchItem = 0; GetProperty(XATTR_FILLHATCH, MID_FILLHATCH, pXFillHatchItem);
- const uno::Any* pXFillHatchNameItem = 0; GetProperty(XATTR_FILLHATCH, MID_NAME, pXFillHatchNameItem);
-
- // XFillBitmapItem: three possible slots supported in UNO API
- const uno::Any* pXFillBitmapItem = 0; GetProperty(XATTR_FILLBITMAP, MID_BITMAP, pXFillBitmapItem);
- const uno::Any* pXFillBitmapNameItem = 0; GetProperty(XATTR_FILLBITMAP, MID_NAME, pXFillBitmapNameItem);
- const uno::Any* pXFillBitmapURLItem = 0; GetProperty(XATTR_FILLBITMAP, MID_GRAFURL, pXFillBitmapURLItem);
-
- const uno::Any* pXFillTransparenceItem = 0; GetProperty(XATTR_FILLTRANSPARENCE, 0, pXFillTransparenceItem);
- const uno::Any* pXGradientStepCountItem = 0; GetProperty(XATTR_GRADIENTSTEPCOUNT, 0, pXGradientStepCountItem);
- const uno::Any* pXFillBmpPosItem = 0; GetProperty(XATTR_FILLBMP_POS, 0, pXFillBmpPosItem);
- const uno::Any* pXFillBmpSizeXItem = 0; GetProperty(XATTR_FILLBMP_SIZEX, 0, pXFillBmpSizeXItem);
- const uno::Any* pXFillBmpSizeYItem = 0; GetProperty(XATTR_FILLBMP_SIZEY, 0, pXFillBmpSizeYItem);
-
- // XFillFloatTransparenceItem: two possible slots supported in UNO API
- const uno::Any* pXFillFloatTransparenceItem = 0; GetProperty(XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT, pXFillFloatTransparenceItem);
- const uno::Any* pXFillFloatTransparenceNameItem = 0; GetProperty(XATTR_FILLFLOATTRANSPARENCE, MID_NAME, pXFillFloatTransparenceNameItem);
-
- const uno::Any* pXSecondaryFillColorItem = 0; GetProperty(XATTR_SECONDARYFILLCOLOR, 0, pXSecondaryFillColorItem);
- const uno::Any* pXFillBmpSizeLogItem = 0; GetProperty(XATTR_FILLBMP_SIZELOG, 0, pXFillBmpSizeLogItem);
- const uno::Any* pXFillBmpTileOffsetXItem = 0; GetProperty(XATTR_FILLBMP_TILEOFFSETX, 0, pXFillBmpTileOffsetXItem);
- const uno::Any* pXFillBmpTileOffsetYItem = 0; GetProperty(XATTR_FILLBMP_TILEOFFSETY, 0, pXFillBmpTileOffsetYItem);
- const uno::Any* pXFillBmpPosOffsetXItem = 0; GetProperty(XATTR_FILLBMP_POSOFFSETX, 0, pXFillBmpPosOffsetXItem);
- const uno::Any* pXFillBmpPosOffsetYItem = 0; GetProperty(XATTR_FILLBMP_POSOFFSETY, 0, pXFillBmpPosOffsetYItem);
- const uno::Any* pXFillBackgroundItem = 0; GetProperty(XATTR_FILLBACKGROUND, 0, pXFillBackgroundItem);
- const uno::Any* pOwnAttrFillBmpItem = 0; GetProperty(OWN_ATTR_FILLBMP_MODE, 0, pOwnAttrFillBmpItem);
-
- const bool bXFillStyleItemUsed(
- pXFillStyleItem ||
- pXFillColorItem ||
- pXFillGradientItem || pXFillGradientNameItem ||
- pXFillHatchItem || pXFillHatchNameItem ||
- pXFillBitmapItem || pXFillBitmapNameItem || pXFillBitmapURLItem ||
- pXFillTransparenceItem ||
- pXGradientStepCountItem ||
- pXFillBmpPosItem ||
- pXFillBmpSizeXItem ||
- pXFillBmpSizeYItem ||
- pXFillFloatTransparenceItem || pXFillFloatTransparenceNameItem ||
- pXSecondaryFillColorItem ||
- pXFillBmpSizeLogItem ||
- pXFillBmpTileOffsetXItem ||
- pXFillBmpTileOffsetYItem ||
- pXFillBmpPosOffsetXItem ||
- pXFillBmpPosOffsetYItem ||
- pXFillBackgroundItem ||
- pOwnAttrFillBmpItem);
-
- // use brush items, but *only* if no FillStyle properties are used; if both are used and when applying both
- // in the obvious order some attributes may be wrong since they are set by the 1st set, but not
- // redefined as needed by the 2nd set when they are default (and thus no tset) in the 2nd set. If
- // it is necessary for any reason to set both (it should not) a in-between step will be needed
- // that resets the items for FillAttributes in rToSet to default
- if(bSvxBrushItemPropertiesUsed && !bXFillStyleItemUsed)
- {
- //UUUU create a temporary SvxBrushItem, fill the attributes to it and use it to set
- // the corresponding FillAttributes
- SvxBrushItem aBrush(RES_BACKGROUND);
-
- if(pCol)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pCol,MID_BACK_COLOR );
- }
-
- if(pColTrans)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pColTrans, MID_BACK_COLOR_TRANSPARENCY);
- }
-
- if(pRGBCol)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pRGBCol, MID_BACK_COLOR_R_G_B);
- }
-
- if(pTrans)
- {
- // don't overwrite transparency with a non-transparence flag
- if(!pColTrans || Any2Bool( *pTrans ))
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pTrans, MID_GRAPHIC_TRANSPARENT);
- }
-
- if(pGrURL)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrURL, MID_GRAPHIC_URL);
- }
-
- if(pGrFilter)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrFilter, MID_GRAPHIC_FILTER);
- }
-
- if(pGrLoc)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrLoc, MID_GRAPHIC_POSITION);
- }
-
- if(pGrTranparency)
- {
- bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrTranparency, MID_GRAPHIC_TRANSPARENCY);
- }
-
- sw::setSvxBrushItemAsFillAttributesToTargetSet(aBrush, rToSet);
- }
-
- if(bXFillStyleItemUsed)
{
- XFillStyleItem aXFillStyleItem;
- SvxBrushItem aBrush(RES_BACKGROUND);
-
- if(pXFillStyleItem)
- {
- aXFillStyleItem.PutValue(*pXFillStyleItem);
- rToSet.Put(aXFillStyleItem);
- }
-
- if(pXFillColorItem)
- {
- const Color aNullCol(COL_DEFAULT_SHAPE_FILLING);
- XFillColorItem aXFillColorItem(OUString(), aNullCol);
-
- aXFillColorItem.PutValue(*pXFillColorItem);
- rToSet.Put(aXFillColorItem);
- }
- else if (aXFillStyleItem.GetValue() == XFILL_SOLID && pCol)
- {
- // Fill style is set to solid, but no fill color is given.
- // On the other hand, we have a BackColor, so use that.
- aBrush.PutValue(*pCol, MID_BACK_COLOR);
- sw::setSvxBrushItemAsFillAttributesToTargetSet(aBrush, rToSet);
- }
-
- if(pXFillGradientItem || pXFillGradientNameItem)
- {
- if(pXFillGradientItem)
- {
- const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
- XFillGradientItem aXFillGradientItem(aNullGrad);
-
- aXFillGradientItem.PutValue(*pXFillGradientItem, MID_FILLGRADIENT);
- rToSet.Put(aXFillGradientItem);
- }
-
- if(pXFillGradientNameItem)
- {
- OUString aTempName;
-
- if(!(*pXFillGradientNameItem >>= aTempName ))
- {
- throw lang::IllegalArgumentException();
- }
-
- bRet &= SvxShape::SetFillAttribute(XATTR_FILLGRADIENT, aTempName, rToSet);
- }
- }
-
- if(pXFillHatchItem || pXFillHatchNameItem)
- {
- if(pXFillHatchItem)
- {
- const Color aNullCol(COL_DEFAULT_SHAPE_STROKE);
- const XHatch aNullHatch(aNullCol);
- XFillHatchItem aXFillHatchItem(rToSet.GetPool(), aNullHatch);
-
- aXFillHatchItem.PutValue(*pXFillHatchItem, MID_FILLHATCH);
- rToSet.Put(aXFillHatchItem);
- }
-
- if(pXFillHatchNameItem)
- {
- OUString aTempName;
-
- if(!(*pXFillHatchNameItem >>= aTempName ))
+ const ::uno::Any* pCol = 0;
+ GetProperty(RES_BACKGROUND, MID_BACK_COLOR, pCol );
+ const ::uno::Any* pRGBCol = 0;
+ GetProperty(RES_BACKGROUND, MID_BACK_COLOR_R_G_B, pRGBCol );
+ const ::uno::Any* pColTrans = 0;
+ GetProperty(RES_BACKGROUND, MID_BACK_COLOR_TRANSPARENCY, pColTrans);
+ const ::uno::Any* pTrans = 0;
+ GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENT, pTrans );
+ const ::uno::Any* pGrLoc = 0;
+ GetProperty(RES_BACKGROUND, MID_GRAPHIC_POSITION, pGrLoc );
+ const ::uno::Any* pGrURL = 0;
+ GetProperty(RES_BACKGROUND, MID_GRAPHIC_URL, pGrURL );
+ const ::uno::Any* pGrFilter = 0;
+ GetProperty(RES_BACKGROUND, MID_GRAPHIC_FILTER, pGrFilter );
+ const ::uno::Any* pGrTranparency = 0;
+ GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENCY, pGrTranparency );
+
+ if(pCol || pTrans || pGrURL || pGrFilter || pGrLoc ||
+ pGrTranparency || pColTrans || pRGBCol)
+ {
+ SvxBrushItem aBrush ( static_cast < const :: SvxBrushItem & > ( rFromSet.Get ( RES_BACKGROUND ) ) );
+ if(pCol )
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pCol,MID_BACK_COLOR );
+ if(pColTrans)
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pColTrans, MID_BACK_COLOR_TRANSPARENCY);
+ if(pRGBCol)
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pRGBCol, MID_BACK_COLOR_R_G_B);
+ if(pTrans)
+ {
+ // don't overwrite transparency with a non-transparence flag
+ if(!pColTrans || Any2Bool( *pTrans ))
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pTrans, MID_GRAPHIC_TRANSPARENT);
+ }
+ if(pGrURL)
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrURL, MID_GRAPHIC_URL);
+ if(pGrFilter)
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrFilter, MID_GRAPHIC_FILTER);
+ if(pGrLoc)
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrLoc, MID_GRAPHIC_POSITION);
+ if(pGrTranparency)
+ bRet &= ((SfxPoolItem&)aBrush).PutValue(*pGrTranparency, MID_GRAPHIC_TRANSPARENCY);
+
+ rToSet.Put(aBrush);
+ }
+ }
+ {
+ const ::uno::Any* pFillStyle = 0;
+ GetProperty(RES_FILL_STYLE, 0, pFillStyle);
+ if (pFillStyle)
+ {
+ XFillStyleItem aFillStyle( static_cast <const :: XFillStyleItem & > ( rFromSet.Get ( RES_FILL_STYLE ) ) );
+ bRet &= ((SfxPoolItem&)aFillStyle).PutValue(*pFillStyle);
+ rToSet.Put(aFillStyle);
+ }
+ }
+ {
+ const ::uno::Any* pFillGradient = 0;
+ GetProperty(RES_FILL_GRADIENT, MID_FILLGRADIENT, pFillGradient);
+ const ::uno::Any* pName = 0;
+ GetProperty(RES_FILL_GRADIENT, MID_NAME, pName);
+ if (pFillGradient || pName)
+ {
+ XFillGradientItem aFillGradient( static_cast <const :: XFillGradientItem & > ( rFromSet.Get ( RES_FILL_GRADIENT ) ) );
+ XFillGradientItem* pItem = &aFillGradient;
+ if (pFillGradient)
+ {
+ bRet &= ((SfxPoolItem*)pItem)->PutValue(*pFillGradient, MID_FILLGRADIENT);
+ // If gradient is set directly, we always generate an associated style name for it.
+ SdrModel* pModel = pDoc->GetDrawModel();
+ pItem = pItem->checkForUniqueItem( pModel );
+ }
+ if (pName)
+ {
+ bRet &= ((SfxPoolItem*)pItem)->PutValue(*pName, MID_NAME);
+ // Look up the associated style name.
+ SfxItemPool& rPool = pDoc->GetDrawModel()->GetItemPool();
+ const sal_uInt32 nCount = rPool.GetItemCount2(XATTR_FILLGRADIENT);
+ const XFillGradientItem* pStyleItem;
+ for (sal_uInt32 i = 0; i < nCount; ++i)
{
- throw lang::IllegalArgumentException();
+ pStyleItem = (XFillGradientItem*)rPool.GetItem2(XATTR_FILLGRADIENT, i);
+ if (pStyleItem && pStyleItem->GetName() == pItem->GetName())
+ {
+ pItem->SetGradientValue(pStyleItem->GetGradientValue());
+ break;
+ }
}
-
- bRet &= SvxShape::SetFillAttribute(XATTR_FILLHATCH, aTempName, rToSet);
}
- }
-
- if(pXFillBitmapItem || pXFillBitmapNameItem || pXFillBitmapURLItem)
- {
- if(pXFillBitmapItem)
+ if (pItem)
{
- const Graphic aNullGraphic;
- XFillBitmapItem aXFillBitmapItem(rToSet.GetPool(), aNullGraphic);
-
- aXFillBitmapItem.PutValue(*pXFillBitmapItem, MID_BITMAP);
- rToSet.Put(aXFillBitmapItem);
- }
-
- if(pXFillBitmapNameItem)
- {
- OUString aTempName;
-
- if(!(*pXFillBitmapNameItem >>= aTempName ))
+ rToSet.Put(*pItem);
+ if(pItem != &aFillGradient)
{
- throw lang::IllegalArgumentException();
- }
-
- bRet &= SvxShape::SetFillAttribute(XATTR_FILLBITMAP, aTempName, rToSet);
- }
-
- if(pXFillBitmapURLItem)
- {
- const Graphic aNullGraphic;
- XFillBitmapItem aXFillBitmapItem(rToSet.GetPool(), aNullGraphic);
-
- aXFillBitmapItem.PutValue(*pXFillBitmapURLItem, MID_GRAFURL);
- rToSet.Put(aXFillBitmapItem);
- }
- }
-
- if(pXFillTransparenceItem)
- {
- const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
- XFillTransparenceItem aXFillTransparenceItem;
-
- aXFillTransparenceItem.PutValue(*pXFillTransparenceItem);
- rToSet.Put(aXFillTransparenceItem);
- }
- else if (aXFillStyleItem.GetValue() == XFILL_SOLID && pColTrans)
- {
- // Fill style is set to solid, but no fill transparency is given.
- // On the other hand, we have a BackColorTransparency, so use that.
- aBrush.PutValue(*pColTrans, MID_BACK_COLOR_TRANSPARENCY);
- sw::setSvxBrushItemAsFillAttributesToTargetSet(aBrush, rToSet);
- }
-
- if(pXGradientStepCountItem)
- {
- XGradientStepCountItem aXGradientStepCountItem;
-
- aXGradientStepCountItem.PutValue(*pXGradientStepCountItem);
- rToSet.Put(aXGradientStepCountItem);
- }
-
- if(pXFillBmpPosItem)
- {
- XFillBmpPosItem aXFillBmpPosItem;
-
- aXFillBmpPosItem.PutValue(*pXFillBmpPosItem);
- rToSet.Put(aXFillBmpPosItem);
- }
-
- if(pXFillBmpSizeXItem)
- {
- XFillBmpSizeXItem aXFillBmpSizeXItem;
-
- aXFillBmpSizeXItem.PutValue(*pXFillBmpSizeXItem);
- rToSet.Put(aXFillBmpSizeXItem);
- }
-
- if(pXFillBmpSizeYItem)
- {
- XFillBmpSizeYItem aXFillBmpSizeYItem;
-
- aXFillBmpSizeYItem.PutValue(*pXFillBmpSizeYItem);
- rToSet.Put(aXFillBmpSizeYItem);
- }
-
- if(pXFillFloatTransparenceItem || pXFillFloatTransparenceNameItem)
- {
- if(pXFillFloatTransparenceItem)
- {
- const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
- XFillFloatTransparenceItem aXFillFloatTransparenceItem(rToSet.GetPool(), aNullGrad, false);
-
- aXFillFloatTransparenceItem.PutValue(*pXFillFloatTransparenceItem, MID_FILLGRADIENT);
- rToSet.Put(aXFillFloatTransparenceItem);
- }
-
- if(pXFillFloatTransparenceNameItem)
- {
- OUString aTempName;
-
- if(!(*pXFillFloatTransparenceNameItem >>= aTempName ))
- {
- throw lang::IllegalArgumentException();
- }
-
- bRet &= SvxShape::SetFillAttribute(XATTR_FILLFLOATTRANSPARENCE, aTempName, rToSet);
- }
- }
-
- if(pXSecondaryFillColorItem)
- {
- const Color aNullCol(COL_DEFAULT_SHAPE_FILLING);
- XSecondaryFillColorItem aXSecondaryFillColorItem(OUString(), aNullCol);
-
- aXSecondaryFillColorItem.PutValue(*pXSecondaryFillColorItem);
- rToSet.Put(aXSecondaryFillColorItem);
- }
-
- if(pXFillBmpSizeLogItem)
- {
- XFillBmpSizeLogItem aXFillBmpSizeLogItem;
-
- aXFillBmpSizeLogItem.PutValue(*pXFillBmpSizeLogItem);
- rToSet.Put(aXFillBmpSizeLogItem);
- }
-
- if(pXFillBmpTileOffsetXItem)
- {
- XFillBmpTileOffsetXItem aXFillBmpTileOffsetXItem;
-
- aXFillBmpTileOffsetXItem.PutValue(*pXFillBmpTileOffsetXItem);
- rToSet.Put(aXFillBmpTileOffsetXItem);
- }
-
- if(pXFillBmpTileOffsetYItem)
- {
- XFillBmpTileOffsetYItem aXFillBmpTileOffsetYItem;
-
- aXFillBmpTileOffsetYItem.PutValue(*pXFillBmpTileOffsetYItem);
- rToSet.Put(aXFillBmpTileOffsetYItem);
- }
-
- if(pXFillBmpPosOffsetXItem)
- {
- XFillBmpPosOffsetXItem aXFillBmpPosOffsetXItem;
-
- aXFillBmpPosOffsetXItem.PutValue(*pXFillBmpPosOffsetXItem);
- rToSet.Put(aXFillBmpPosOffsetXItem);
- }
-
- if(pXFillBmpPosOffsetYItem)
- {
- XFillBmpPosOffsetYItem aXFillBmpPosOffsetYItem;
-
- aXFillBmpPosOffsetYItem.PutValue(*pXFillBmpPosOffsetYItem);
- rToSet.Put(aXFillBmpPosOffsetYItem);
- }
-
- if(pXFillBackgroundItem)
- {
- XFillBackgroundItem aXFillBackgroundItem;
-
- aXFillBackgroundItem.PutValue(*pXFillBackgroundItem);
- rToSet.Put(aXFillBackgroundItem);
- }
-
- if(pOwnAttrFillBmpItem)
- {
- drawing::BitmapMode eMode;
-
- if(!(*pOwnAttrFillBmpItem >>= eMode))
- {
- sal_Int32 nMode = 0;
+ // New name was generated? Then insert it to the drawinglayer style table.
+ uno::Reference<frame::XModel> xModel(pDoc->GetDocShell()->GetModel());
+ uno::Reference<lang::XMultiServiceFactory> xServiceFact(xModel, uno::UNO_QUERY);
+ uno::Reference< container::XNameContainer > xGradients(xServiceFact->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY);
+ if (!xGradients->hasByName(pItem->GetName()))
+ {
+ xGradients->insertByName(pItem->GetName(), *pFillGradient);
+ }
- if(!(*pOwnAttrFillBmpItem >>= nMode))
- {
- throw lang::IllegalArgumentException();
+ delete pItem;
}
-
- eMode = (drawing::BitmapMode)nMode;
}
-
- rToSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode));
- rToSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
}
}
{
@@ -954,13 +649,13 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem
{
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *pStyle ) );
const :: SfxItemSet *pItemSet = &xStyle->GetItemSet();
- bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound );
+ bRet = FillBaseProperties( pDoc, rSet, *pItemSet, rSizeFound );
lcl_FillCol ( rSet, *pItemSet, pColumns );
}
else
{
const :: SfxItemSet *pItemSet = &pDoc->GetFrmFmtFromPool( RES_POOLFRM_FRAME )->GetAttrSet();
- bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound );
+ bRet = FillBaseProperties( pDoc, rSet, *pItemSet, rSizeFound );
lcl_FillCol ( rSet, *pItemSet, pColumns );
}
const ::uno::Any* pEdit;
@@ -1033,13 +728,13 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
{
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet(*pStyle) );
const :: SfxItemSet *pItemSet = &xStyle->GetItemSet();
- bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound);
+ bRet = FillBaseProperties(pDoc, rFrmSet, *pItemSet, rSizeFound);
lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
}
else
{
const :: SfxItemSet *pItemSet = &pDoc->GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC )->GetAttrSet();
- bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound);
+ bRet = FillBaseProperties(pDoc, rFrmSet, *pItemSet, rSizeFound);
lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet );
}
@@ -1333,7 +1028,7 @@ static SwFrmFmt *lcl_GetFrmFmt( const :: uno::Any& rValue, SwDoc *pDoc )
return pRet;
}
-void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::Any& _rValue)
+void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
@@ -1343,40 +1038,6 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if (!pEntry)
throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- //UUUU
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
- uno::Any aValue(_rValue);
-
- //UUUU check for needed metric translation
- if(pEntry->nMemberId & SFX_METRIC_ITEM)
- {
- bool bDoIt(true);
-
- if(XATTR_FILLBMP_SIZEX == pEntry->nWID || XATTR_FILLBMP_SIZEY == pEntry->nWID)
- {
- // exception: If these ItemTypes are used, do not convert when these are negative
- // since this means they are intended as percent values
- sal_Int32 nValue = 0;
-
- if(aValue >>= nValue)
- {
- bDoIt = nValue > 0;
- }
- }
-
- if(bDoIt)
- {
- const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrmFmt()->GetDoc());
- const SfxItemPool& rPool = pDoc->GetAttrPool();
- const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
-
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- SvxUnoConvertFromMM(eMapUnit, aValue);
- }
- }
- }
-
if(pFmt)
{
bool bNextFrame = false;
@@ -1689,7 +1350,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
SetObjectOrdNum(pObject->GetOrdNum(), nZOrder);
}
}
- else if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORFRAME == nMemberId)
+ else if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORFRAME == pEntry->nMemberId)
{
bool bDone = false;
uno::Reference<text::XTextFrame> xFrame;
@@ -1718,124 +1379,15 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
throw lang::IllegalArgumentException();
}
else
- { //UUUU
- // standard UNO API write attributes
- // adapt former attr from SvxBrushItem::PutValue to new items XATTR_FILL_FIRST, XATTR_FILL_LAST
+ {
SfxItemSet aSet( pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
0L);
- bool bDone(false);
aSet.SetParent(&pFmt->GetAttrSet());
-
- if(RES_BACKGROUND == pEntry->nWID)
- {
- const SwAttrSet& rSet = pFmt->GetAttrSet();
- const SvxBrushItem aOriginalBrushItem(sw::getSvxBrushItemFromSourceSet(rSet));
- SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
-
- aChangedBrushItem.PutValue(aValue, nMemberId);
-
- if(!(aChangedBrushItem == aOriginalBrushItem))
- {
- sw::setSvxBrushItemAsFillAttributesToTargetSet(aChangedBrushItem, aSet);
- pFmt->GetDoc()->SetFlyFrmAttr( *pFmt, aSet );
- }
-
- bDone = true;
- }
- else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
- {
- //UUUU
- drawing::BitmapMode eMode;
-
- if(!(aValue >>= eMode))
- {
- sal_Int32 nMode = 0;
-
- if(!(aValue >>= nMode))
- {
- throw lang::IllegalArgumentException();
- }
-
- eMode = (drawing::BitmapMode)nMode;
- }
-
- aSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode));
- aSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
- pFmt->GetDoc()->SetFlyFrmAttr( *pFmt, aSet );
- bDone = true;
- }
-
- switch(nMemberId)
- {
- case MID_NAME:
- {
- //UUUU when named items get set, replace these with the NameOrIndex items
- // which exist already in the pool
- switch(pEntry->nWID)
- {
- case XATTR_FILLGRADIENT:
- case XATTR_FILLHATCH:
- case XATTR_FILLBITMAP:
- case XATTR_FILLFLOATTRANSPARENCE:
- {
- OUString aTempName;
-
- if(!(aValue >>= aTempName ))
- {
- throw lang::IllegalArgumentException();
- }
-
- bDone = SvxShape::SetFillAttribute(pEntry->nWID, aTempName, aSet);
- break;
- }
- default:
- {
- break;
- }
- }
- break;
- }
- case MID_GRAFURL:
- {
- //UUUU Bitmap also has the MID_GRAFURL mode where a Bitmap URL is used
- switch(pEntry->nWID)
- {
- case XATTR_FILLBITMAP:
- {
- const Graphic aNullGraphic;
- XFillBitmapItem aXFillBitmapItem(aSet.GetPool(), aNullGraphic);
-
- aXFillBitmapItem.PutValue(aValue, nMemberId);
- aSet.Put(aXFillBitmapItem);
- bDone = true;
- break;
- }
- default:
- {
- break;
- }
- }
- break;
- }
- default:
- {
- break;
- }
- }
-
- if(!bDone)
- {
- m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
- }
-
- if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == nMemberId)
+ m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
+ if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == pEntry->nMemberId)
{
SwFmtAnchor aAnchor = (const :: SwFmtAnchor&)aSet.Get(pEntry->nWID);
if(aAnchor.GetAnchorId() == FLY_AT_FLY)
@@ -1896,14 +1448,12 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
throw lang::IllegalArgumentException();
}
else
- {
pFmt->SetFmtAttr(aSet);
- }
}
}
else if(IsDescriptor())
{
- pProps->SetProperty(pEntry->nWID, nMemberId, aValue);
+ pProps->SetProperty(pEntry->nWID, pEntry->nMemberId, aValue);
if( FN_UNO_FRAME_STYLE_NAME == pEntry->nWID )
{
OUString sStyleName;
@@ -1938,9 +1488,6 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if (!pEntry)
throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- //UUUU
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
-
if(FN_UNO_ANCHOR_TYPES == pEntry->nWID)
{
uno::Sequence<text::TextContentAnchorType> aTypes(5);
@@ -2219,50 +1766,9 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
}
else
- { //UUUU
- // standard UNO API read attributes
- // adapt former attr from SvxBrushItem::PutValue to new items XATTR_FILL_FIRST, XATTR_FILL_LAST
+ {
const SwAttrSet& rSet = pFmt->GetAttrSet();
- bool bDone(false);
-
- if(RES_BACKGROUND == pEntry->nWID)
- {
- //UUUU
- const SvxBrushItem aOriginalBrushItem(sw::getSvxBrushItemFromSourceSet(rSet));
-
- if(!aOriginalBrushItem.QueryValue(aAny, nMemberId))
- {
- OSL_ENSURE(false, "Error getting attribute from RES_BACKGROUND (!)");
- }
-
- bDone = true;
- }
- else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
- {
- //UUUU
- const XFillBmpStretchItem* pStretchItem = dynamic_cast< const XFillBmpStretchItem* >(&rSet.Get(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = dynamic_cast< const XFillBmpTileItem* >(&rSet.Get(XATTR_FILLBMP_TILE));
-
- if( pTileItem && pTileItem->GetValue() )
- {
- aAny <<= drawing::BitmapMode_REPEAT;
- }
- else if( pStretchItem && pStretchItem->GetValue() )
- {
- aAny <<= drawing::BitmapMode_STRETCH;
- }
- else
- {
- aAny <<= drawing::BitmapMode_NO_REPEAT;
- }
-
- bDone = true;
- }
-
- if(!bDone)
- {
- m_pPropSet->getPropertyValue(*pEntry, rSet, aAny);
- }
+ m_pPropSet->getPropertyValue(*pEntry, rSet, aAny);
}
}
else if(IsDescriptor())
@@ -2272,7 +1778,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if(WID_LAYOUT_SIZE != pEntry->nWID) // there is no LayoutSize in a descriptor
{
const uno::Any* pAny = 0;
- if( !pProps->GetProperty( pEntry->nWID, nMemberId, pAny ) )
+ if( !pProps->GetProperty( pEntry->nWID, pEntry->nMemberId, pAny ) )
aAny = mxStyleData->getPropertyValue( rPropertyName );
else if ( pAny )
aAny = *pAny;
@@ -2280,46 +1786,6 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else
throw uno::RuntimeException();
-
- //UUUU
- if(pEntry && pEntry->aType == ::cppu::UnoType<sal_Int16>::get() && pEntry->aType != aAny.getValueType())
- {
- // since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
- sal_Int32 nValue = 0;
- aAny >>= nValue;
- aAny <<= (sal_Int16)nValue;
- }
-
- //UUUU check for needed metric translation
- if(pEntry->nMemberId & SFX_METRIC_ITEM)
- {
- bool bDoIt(true);
-
- if(XATTR_FILLBMP_SIZEX == pEntry->nWID || XATTR_FILLBMP_SIZEY == pEntry->nWID)
- {
- // exception: If these ItemTypes are used, do not convert when these are negative
- // since this means they are intended as percent values
- sal_Int32 nValue = 0;
-
- if(aAny >>= nValue)
- {
- bDoIt = nValue > 0;
- }
- }
-
- if(bDoIt)
- {
- const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrmFmt()->GetDoc());
- const SfxItemPool& rPool = pDoc->GetAttrPool();
- const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
-
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- SvxUnoConvertToMM(eMapUnit, aAny);
- }
- }
- }
-
return aAny;
}
@@ -2362,42 +1828,6 @@ beans::PropertyState SwXFrame::getPropertyState( const OUString& rPropertyName )
return aStates.getConstArray()[0];
}
-//UUUU
-bool SwXFrame::needToMapFillItemsToSvxBrushItemTypes() const
-{
- SwFrmFmt* pFmt = GetFrmFmt();
-
- if(!pFmt)
- {
- return false;
- }
-
- const SwAttrSet& rFmtSet = pFmt->GetAttrSet();
- const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFmtSet.GetItem(XATTR_FILLSTYLE, false)));
-
- if(!pXFillStyleItem)
- {
- return false;
- }
-
- //UUUU here different FillStyles can be excluded for export; it will depend on the
- // quality these fallbacks can reach. That again is done in sw::getSvxBrushItemFromSourceSet,
- // take a look there how the superset of DrawObject FillStyles is mapped to SvxBrushItem.
- // For now, take them all - except XFILL_NONE
-
- if(XFILL_NONE != pXFillStyleItem->GetValue())
- {
- return true;
- }
-
- //if(XFILL_SOLID == pXFillStyleItem->GetValue() || XFILL_BITMAP == pXFillStyleItem->GetValue())
- //{
- // return true;
- //}
-
- return false;
-}
-
uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
const uno::Sequence< OUString >& aPropertyNames )
throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
@@ -2426,27 +1856,6 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
- else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
- {
- //UUUU
- if(SFX_ITEM_SET == rFmtSet.GetItemState(XATTR_FILLBMP_STRETCH, false)
- || SFX_ITEM_SET == rFmtSet.GetItemState(XATTR_FILLBMP_TILE, false))
- {
- pStates[i] = beans::PropertyState_DIRECT_VALUE;
- }
- else
- {
- pStates[i] = beans::PropertyState_AMBIGUOUS_VALUE;
- }
- }
- //UUUU for FlyFrames we need to mark all properties from type RES_BACKGROUND
- // as beans::PropertyState_DIRECT_VALUE to let users of this property call
- // getPropertyValue where the member properties will be mapped from the
- // fill attributes to the according SvxBrushItem entries
- else if(RES_BACKGROUND == pEntry->nWID && needToMapFillItemsToSvxBrushItemTypes())
- {
- pStates[i] = beans::PropertyState_DIRECT_VALUE;
- }
else
{
if ((eType == FLYCNTTYPE_GRF) &&
@@ -2497,19 +1906,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
throw uno::RuntimeException("setPropertyToDefault: property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
bool bNextFrame;
- if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
- {
- //UUUU
- SwDoc* pDoc = pFmt->GetDoc();
- SfxItemSet aSet(pDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
- aSet.SetParent(&pFmt->GetAttrSet());
-
- aSet.ClearItem(XATTR_FILLBMP_STRETCH);
- aSet.ClearItem(XATTR_FILLBMP_TILE);
-
- pFmt->SetFmtAttr(aSet);
- }
- else if( pEntry->nWID &&
+ if( pEntry->nWID &&
pEntry->nWID != FN_UNO_ANCHOR_TYPES &&
pEntry->nWID != FN_PARAM_LINK_DISPLAY_NAME)
{
@@ -2606,10 +2003,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
{
const SfxPoolItem& rDefItem =
pFmt->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
- //UUUU
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
-
- rDefItem.QueryValue(aRet, nMemberId);
+ rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
}
else
@@ -2738,12 +2132,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
static sal_uInt16 const aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
-
- //UUUU FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
0
};
static sal_uInt16 const aGrAttrRange[] =
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index b2fb90775001..82b9c5128a41 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -30,13 +30,10 @@
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
-#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/drawing/ColorMode.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
-#include <com/sun/star/drawing/Hatch.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
-#include <com/sun/star/drawing/RectanglePoint.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -84,9 +81,6 @@
#include <cmdid.h>
#include <unofldmid.h>
#include <editeng/memberids.hrc>
-#include <editeng/unoipset.hxx>
-#include <editeng/unoprnms.hxx>
-#include <svx/xdef.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -337,9 +331,6 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
#define ANCHOR_TYPES_PROPERTY { OUString(UNO_NAME_ANCHOR_TYPES), FN_UNO_ANCHOR_TYPES, cppu::UnoType< cppu::UnoSequenceType<css::text::TextContentAnchorType> >::get(),PropertyAttribute::READONLY, 0xff},
// #i18732# #i28701# #i73249#
-//UUUU all users of COMMON_FRAME_PROPERTIES add the new XATTR_FILL_FIRST, XATTR_FILL_LAST FillStyle,
-// thus it may be possible to remove the RES_BACKGROUND entries from SvxBrushItem completely (this includes
-// all using UNO_NAME_BACK_* slots) in the future
#define COMMON_FRAME_PROPERTIES \
{ OUString(UNO_NAME_ANCHOR_PAGE_NO), RES_ANCHOR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, MID_ANCHOR_PAGENUM }, \
{ OUString(UNO_NAME_ANCHOR_TYPE), RES_ANCHOR, cppu::UnoType<css::text::TextContentAnchorType>::get(), PROPERTY_NONE, MID_ANCHOR_ANCHORTYPE}, \
@@ -348,6 +339,9 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{ OUString(UNO_NAME_BACK_COLOR), RES_BACKGROUND, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE ,MID_BACK_COLOR }, \
{ OUString(UNO_NAME_BACK_COLOR_R_G_B), RES_BACKGROUND, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE ,MID_BACK_COLOR_R_G_B}, \
{ OUString(UNO_NAME_BACK_COLOR_TRANSPARENCY), RES_BACKGROUND, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE ,MID_BACK_COLOR_TRANSPARENCY}, \
+ { OUString(UNO_NAME_FILL_STYLE), RES_FILL_STYLE, cppu::UnoType<css::drawing::FillStyle>::get(), PROPERTY_NONE ,0}, \
+ { OUString(UNO_NAME_FILL_GRADIENT), RES_FILL_GRADIENT, cppu::UnoType<css::awt::Gradient>::get(), PROPERTY_NONE ,MID_FILLGRADIENT}, \
+ { OUString(UNO_NAME_FILL_GRADIENT_NAME), RES_FILL_GRADIENT, cppu::UnoType<OUString>::get(), PROPERTY_NONE ,MID_NAME}, \
{ OUString(UNO_NAME_FRAME_INTEROP_GRAB_BAG), RES_FRMATR_GRABBAG, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PROPERTY_NONE, 0}, \
{ OUString(UNO_NAME_CONTENT_PROTECTED), RES_PROTECT, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_PROTECT_CONTENT }, \
{ OUString(UNO_NAME_FRAME_STYLE_NAME), FN_UNO_FRAME_STYLE_NAME,cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0}, \
@@ -565,43 +559,6 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{ OUString(UNO_NAME_PARA_RIGHT_MARGIN), RES_LR_SPACE, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::MAYBEVOID, MID_R_MARGIN|CONVERT_TWIPS}, \
{ OUString(UNO_NAME_TABSTOPS), RES_PARATR_TABSTOP, cppu::UnoType< cppu::UnoSequenceType<css::style::TabStop> >::get(), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
-//UUUU
-#define FILL_PROPERTIES_SW_BMP \
- { OUString(UNO_NAME_SW_FILLBMP_LOGICAL_SIZE), XATTR_FILLBMP_SIZELOG, cppu::UnoType<float>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_OFFSET_X), XATTR_FILLBMP_TILEOFFSETX, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_OFFSET_Y), XATTR_FILLBMP_TILEOFFSETY, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_POSITION_OFFSET_X), XATTR_FILLBMP_POSOFFSETX, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_POSITION_OFFSET_Y), XATTR_FILLBMP_POSOFFSETY, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_RECTANGLE_POINT), XATTR_FILLBMP_POS, cppu::UnoType<css::drawing::RectanglePoint>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, \
- { OUString(UNO_NAME_SW_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, \
- { OUString(UNO_NAME_SW_FILLBMP_STRETCH), XATTR_FILLBMP_STRETCH, cppu::UnoType<float>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_TILE), XATTR_FILLBMP_TILE, cppu::UnoType<float>::get(), 0, 0},\
- { OUString(UNO_NAME_SW_FILLBMP_MODE), OWN_ATTR_FILLBMP_MODE, cppu::UnoType<drawing::BitmapMode>::get(), 0, 0}, \
-
-//UUUU
-#define FILL_PROPERTIES_SW_DEFAULTS \
- { OUString(UNO_NAME_SW_FILLCOLOR), XATTR_FILLCOLOR, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
-
-//UUUU
-#define FILL_PROPERTIES_SW \
- FILL_PROPERTIES_SW_BMP \
- FILL_PROPERTIES_SW_DEFAULTS \
- { OUString(UNO_NAME_SW_FILLBACKGROUND), XATTR_FILLBACKGROUND, cppu::UnoType<bool>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBITMAP), XATTR_FILLBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), 0, MID_BITMAP}, \
- { OUString(UNO_NAME_SW_FILLBITMAPNAME), XATTR_FILLBITMAP, cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_SW_FILLBITMAPURL), XATTR_FILLBITMAP, cppu::UnoType<OUString>::get(), 0, MID_GRAFURL }, \
- { OUString(UNO_NAME_SW_FILLGRADIENTSTEPCOUNT), XATTR_GRADIENTSTEPCOUNT, cppu::UnoType<sal_Int16>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLGRADIENT), XATTR_FILLGRADIENT, cppu::UnoType<css::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \
- { OUString(UNO_NAME_SW_FILLGRADIENTNAME), XATTR_FILLGRADIENT, cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_SW_FILLHATCH), XATTR_FILLHATCH, cppu::UnoType<css::drawing::Hatch>::get(), 0, MID_FILLHATCH}, \
- { OUString(UNO_NAME_SW_FILLHATCHNAME), XATTR_FILLHATCH, cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_SW_FILLSTYLE), XATTR_FILLSTYLE, cppu::UnoType<css::drawing::FillStyle>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILL_TRANSPARENCE), XATTR_FILLTRANSPARENCE, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLTRANSPARENCEGRADIENT), XATTR_FILLFLOATTRANSPARENCE, cppu::UnoType<css::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \
- { OUString(UNO_NAME_SW_FILLTRANSPARENCEGRADIENTNAME), XATTR_FILLFLOATTRANSPARENCE, cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
- { OUString(UNO_NAME_SW_FILLCOLOR_2), XATTR_SECONDARYFILLCOLOR, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
-
const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(sal_uInt16 nPropertyId)
{
OSL_ENSURE(nPropertyId < PROPERTY_MAP_END, "Id ?" );
@@ -830,6 +787,9 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_BACK_COLOR), RES_BACKGROUND, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE ,MID_BACK_COLOR },
{ OUString(UNO_NAME_BACK_COLOR_R_G_B), RES_BACKGROUND, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE ,MID_BACK_COLOR_R_G_B},
{ OUString(UNO_NAME_BACK_COLOR_TRANSPARENCY), RES_BACKGROUND, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE ,MID_BACK_COLOR_TRANSPARENCY},
+ { OUString(UNO_NAME_FILL_STYLE), RES_FILL_STYLE, cppu::UnoType<css::drawing::FillStyle>::get(), PROPERTY_NONE ,0},
+ { OUString(UNO_NAME_FILL_GRADIENT), RES_FILL_GRADIENT, cppu::UnoType<css::awt::Gradient>::get(), PROPERTY_NONE ,MID_FILLGRADIENT},
+ { OUString(UNO_NAME_FILL_GRADIENT_NAME), RES_FILL_GRADIENT, cppu::UnoType<OUString>::get(), PROPERTY_NONE ,MID_NAME},
{ OUString(UNO_NAME_FRAME_INTEROP_GRAB_BAG), RES_FRMATR_GRABBAG, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PROPERTY_NONE, 0},
// { OUString(UNO_NAME_CHAIN_NEXT_NAME), RES_CHAIN, cppu::UnoType<OUString>::get(), PROPERTY_NONE ,MID_CHAIN_NEXTNAME},
// { OUString(UNO_NAME_CHAIN_PREV_NAME), RES_CHAIN, cppu::UnoType<OUString>::get(), PROPERTY_NONE ,MID_CHAIN_PREVNAME},
@@ -903,13 +863,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
{ OUString(UNO_NAME_HIDDEN), FN_UNO_HIDDEN, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_TEXT_VERT_ADJUST), RES_TEXT_VERT_ADJUST, cppu::UnoType<css::drawing::TextVerticalAdjust>::get(), PROPERTY_NONE ,0},
-
- //UUUU added FillProperties for SW, same as FILL_PROPERTIES in svx
- // but need own defines in Writer due to later association of strings
- // and uno types (see loop at end of this method and definition of SW_PROP_NMID)
- // This entry is for adding that properties to style import/export
- FILL_PROPERTIES_SW
-
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
aMapEntriesArr[nPropertyId] = aFrameStyleMap;
@@ -1233,10 +1186,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
case PROPERTY_MAP_TEXT_FRAME:
{
static SfxItemPropertyMapEntry const aFramePropertyMap_Impl[] =
- { //UUUU
- // evtl. completely remove SvxBrushItem stuff ()
- // add support for XATTR_FILL_FIRST, XATTR_FILL_LAST
- // COMMON_FRAME_PROPERTIES currently hosts the RES_BACKGROUND entries from SvxBrushItem
+ {
COMMON_FRAME_PROPERTIES
_REDLINE_NODE_PROPERTIES
{ OUString(UNO_NAME_CHAIN_NEXT_NAME), RES_CHAIN, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID ,MID_CHAIN_NEXTNAME},
@@ -1253,13 +1203,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_SIZE_TYPE), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, MID_FRMSIZE_SIZE_TYPE },
{ OUString(UNO_NAME_WIDTH_TYPE), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, MID_FRMSIZE_WIDTH_TYPE },
{ OUString(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
-
- //UUUU added FillProperties for SW, same as FILL_PROPERTIES in svx
- // but need own defines in Writer due to later association of strings
- // and uno types (see loop at end of this method and definition of SW_PROP_NMID)
- // This entry is for adding that properties to FlyFrame import/export
- FILL_PROPERTIES_SW
-
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
aMapEntriesArr[nPropertyId] = aFramePropertyMap_Impl;
@@ -1268,10 +1211,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
case PROPERTY_MAP_TEXT_GRAPHIC:
{
static SfxItemPropertyMapEntry const aGraphicPropertyMap_Impl[] =
- { //UUUU
- // evtl. completely remove SvxBrushItem stuff ()
- // add support for XATTR_FILL_FIRST, XATTR_FILL_LAST
- // COMMON_FRAME_PROPERTIES currently hosts the RES_BACKGROUND entries from SvxBrushItem
+ {
COMMON_FRAME_PROPERTIES
{ OUString(UNO_NAME_SURROUND_CONTOUR), RES_SURROUND, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_SURROUND_CONTOUR },
{ OUString(UNO_NAME_CONTOUR_OUTSIDE), RES_SURROUND, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_SURROUND_CONTOUROUTSIDE },
@@ -1297,13 +1237,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_GRAPHIC_IS_INVERTED), RES_GRFATR_INVERT, cppu::UnoType<bool>::get(), 0, 0},
{ OUString(UNO_NAME_TRANSPARENCY), RES_GRFATR_TRANSPARENCY, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_GRAPHIC_COLOR_MODE), RES_GRFATR_DRAWMODE, cppu::UnoType<css::drawing::ColorMode>::get(), 0, 0},
-
- //UUUU added FillProperties for SW, same as FILL_PROPERTIES in svx
- // but need own defines in Writer due to later association of strings
- // and uno types (see loop at end of this method and definition of SW_PROP_NMID)
- // This entry is for adding that properties to Writer GraphicObject import/export
- FILL_PROPERTIES_SW
-
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
aMapEntriesArr[nPropertyId] = aGraphicPropertyMap_Impl;
@@ -1312,10 +1245,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
case PROPERTY_MAP_EMBEDDED_OBJECT:
{
static SfxItemPropertyMapEntry const aEmbeddedPropertyMap_Impl[] =
- { //UUUU
- // evtl. completely remove SvxBrushItem stuff ()
- // add support for XATTR_FILL_FIRST, XATTR_FILL_LAST
- // COMMON_FRAME_PROPERTIES currently hosts the RES_BACKGROUND entries from SvxBrushItem
+ {
COMMON_FRAME_PROPERTIES
{ OUString(UNO_NAME_SURROUND_CONTOUR), RES_SURROUND, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_SURROUND_CONTOUR },
{ OUString(UNO_NAME_CONTOUR_OUTSIDE), RES_SURROUND, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_SURROUND_CONTOUROUTSIDE},
@@ -1329,12 +1259,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_GRAPHIC), FN_UNO_REPLACEMENT_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString(UNO_NAME_COMPONENT),FN_UNO_COMPONENT, cppu::UnoType<css::lang::XComponent>::get(), PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_EMBEDDED_OBJECT),FN_EMBEDDED_OBJECT, cppu::UnoType<css::embed::XEmbeddedObject>::get(), PROPERTY_NONE, 0},
- //UUUU added FillProperties for SW, same as FILL_PROPERTIES in svx
- // but need own defines in Writer due to later association of strings
- // and uno types (see loop at end of this method and definition of SW_PROP_NMID)
- // This entry is for adding that properties to OLE/EmbeddedObject import/export
- FILL_PROPERTIES_SW
-
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
aMapEntriesArr[nPropertyId] = aEmbeddedPropertyMap_Impl;
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index ae28998bcb11..5c24b91886c8 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -61,7 +61,6 @@
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/drawing/BitmapMode.hpp>
#include <istyleaccess.hxx>
#include <GetMetricVal.hxx>
#include <fmtfsize.hxx>
@@ -71,14 +70,6 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequenceasvector.hxx>
-//UUUU
-#include <unobrushitemhelper.hxx>
-#include <editeng/unoipset.hxx>
-#include <editeng/memberids.hrc>
-#include <svx/unoshape.hxx>
-#include <svx/xflbstit.hxx>
-#include <svx/xflbmtit.hxx>
-
#include <boost/shared_ptr.hpp>
#include "ccoll.hxx"
@@ -1653,43 +1644,6 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
lang::WrappedTargetException, uno::RuntimeException)
{
- //UUUU adapted switch logic to a more readable state; removed goto's and made
- // execution of standard setting of proerty in ItemSet dependent of this variable
- bool bDone(false);
-
- //UUUU
- const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
- uno::Any aValue(rValue);
-
- //UUUU check for needed metric translation
- if(rEntry.nMemberId & SFX_METRIC_ITEM)
- {
- bool bDoIt(true);
-
- if(XATTR_FILLBMP_SIZEX == rEntry.nWID || XATTR_FILLBMP_SIZEY == rEntry.nWID)
- {
- // exception: If these ItemTypes are used, do not convert when these are negative
- // since this means they are intended as percent values
- sal_Int32 nValue = 0;
-
- if(aValue >>= nValue)
- {
- bDoIt = nValue > 0;
- }
- }
-
- if(bDoIt && pDoc)
- {
- const SfxItemPool& rPool = pDoc->GetAttrPool();
- const SfxMapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
-
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- SvxUnoConvertFromMM(eMapUnit, aValue);
- }
- }
- }
-
switch(rEntry.nWID)
{
case FN_UNO_HIDDEN:
@@ -1711,87 +1665,12 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
break;
- case XATTR_FILLBITMAP:
- case XATTR_FILLGRADIENT:
- case XATTR_FILLHATCH:
- case XATTR_FILLFLOATTRANSPARENCE:
- // not yet needed; activate when LineStyle support may be added
- // case XATTR_LINESTART:
- // case XATTR_LINEEND:
- // case XATTR_LINEDASH:
- {
- //UUUU add set commands for FillName items
- if(MID_NAME == nMemberId)
- {
- OUString aTempName;
- SfxItemSet& rStyleSet = rBase.GetItemSet();
-
- if(!(aValue >>= aTempName))
- {
- throw lang::IllegalArgumentException();
- }
-
- SvxShape::SetFillAttribute(rEntry.nWID, aTempName, rStyleSet);
- bDone = true;
- }
-
- break;
- }
- case RES_BACKGROUND:
- {
- //UUUU No new FillStyle for PageBackground; need to remove again when we want
- // to support that, too. Add a break to *not* set bDone to true
- if(SFX_STYLE_FAMILY_PAGE == eFamily)
- {
- break;
- }
-
- //UUUU
- SfxItemSet& rStyleSet = rBase.GetItemSet();
- const SvxBrushItem aOriginalBrushItem(sw::getSvxBrushItemFromSourceSet(rStyleSet));
- SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
-
- aChangedBrushItem.PutValue(aValue, nMemberId);
-
- if(!(aChangedBrushItem == aOriginalBrushItem))
- {
- sw::setSvxBrushItemAsFillAttributesToTargetSet(aChangedBrushItem, rStyleSet);
- }
-
- bDone = true;
- break;
- }
- case OWN_ATTR_FILLBMP_MODE:
- {
- //UUUU
- drawing::BitmapMode eMode;
-
- if(!(aValue >>= eMode))
- {
- sal_Int32 nMode = 0;
-
- if(!(aValue >>= nMode))
- {
- throw lang::IllegalArgumentException();
- }
-
- eMode = (drawing::BitmapMode)nMode;
- }
-
- SfxItemSet& rStyleSet = rBase.GetItemSet();
-
- rStyleSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode));
- rStyleSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
-
- bDone = true;
- break;
- }
case RES_PAPER_BIN:
{
SfxPrinter *pPrinter = pDoc->getPrinter( true );
OUString sTmp;
sal_uInt16 nBin = USHRT_MAX;
- if ( !( aValue >>= sTmp ) )
+ if ( !( rValue >>= sTmp ) )
throw lang::IllegalArgumentException();
if ( sTmp == "[From printer settings]" )
nBin = USHRT_MAX-1;
@@ -1816,16 +1695,14 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
rPropSet.setPropertyValue(rEntry, uno::makeAny ( static_cast < sal_Int8 > ( nBin == USHRT_MAX-1 ? -1 : nBin ) ), aSet);
rStyleSet.Put(aSet);
}
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_NUM_RULES: //Sonderbehandlung fuer das SvxNumRuleItem:
{
- if(aValue.getValueType() == cppu::UnoType<container::XIndexReplace>::get())
+ if(rValue.getValueType() == cppu::UnoType<container::XIndexReplace>::get() )
{
uno::Reference< container::XIndexReplace > * pxRulesRef =
- (uno::Reference< container::XIndexReplace > *)aValue.getValue();
+ (uno::Reference< container::XIndexReplace > *)rValue.getValue();
uno::Reference<lang::XUnoTunnel> xNumberTunnel( *pxRulesRef, uno::UNO_QUERY);
@@ -1900,37 +1777,31 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
else
throw lang::IllegalArgumentException();
-
- bDone = true;
- break;
}
+ break;
case RES_PARATR_OUTLINELEVEL:
{
sal_Int16 nLevel = 0;
- aValue >>= nLevel;
+ rValue >>= nLevel;
if( 0 <= nLevel && nLevel <= MAXLEVEL)
rBase.mxNewBase->GetCollection()->SetAttrOutlineLevel( nLevel );
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_FOLLOW_STYLE:
{
OUString sTmp;
- aValue >>= sTmp;
+ rValue >>= sTmp;
OUString aString;
SwStyleNameMapper::FillUIName(sTmp, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true ) ;
rBase.mxNewBase->SetFollow( aString );
-
- bDone = true;
- break;
}
+ break;
case RES_PAGEDESC :
+ if( MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
+ goto put_itemset;
{
- if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
- break;
- // special handling for RES_PAGEDESC
- if(aValue.getValueType() != ::cppu::UnoType<OUString>::get())
+ // Sonderbehandlung RES_PAGEDESC
+ if(rValue.getValueType() != ::cppu::UnoType<OUString>::get())
throw lang::IllegalArgumentException();
SfxItemSet& rStyleSet = rBase.GetItemSet();
@@ -1943,7 +1814,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(!pNewDesc)
pNewDesc = new SwFmtPageDesc();
OUString uDescName;
- aValue >>= uDescName;
+ rValue >>= uDescName;
OUString sDescName;
SwStyleNameMapper::FillUIName(uDescName, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
if(!pNewDesc->GetPageDesc() || pNewDesc->GetPageDesc()->GetName() != sDescName)
@@ -1969,27 +1840,23 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
else
rStyleSet.Put(*pNewDesc);
-
}
delete pNewDesc;
- bDone = true;
- break;
}
+ break;
case FN_UNO_IS_AUTO_UPDATE:
{
- bool bAuto = *(sal_Bool*)aValue.getValue();
+ bool bAuto = *(sal_Bool*)rValue.getValue();
if(SFX_STYLE_FAMILY_PARA == eFamily)
rBase.mxNewBase->GetCollection()->SetAutoUpdateFmt(bAuto);
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
rBase.mxNewBase->GetFrmFmt()->SetAutoUpdateFmt(bAuto);
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_PARA_STYLE_CONDITIONS:
{
uno::Sequence< beans::NamedValue > aSeq;
- if (!(aValue >>= aSeq))
+ if (!(rValue >>= aSeq))
throw lang::IllegalArgumentException();
OSL_ENSURE(COND_COMMAND_COUNT == 28,
@@ -2037,15 +1904,14 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if (bFailed)
throw lang::IllegalArgumentException();
rBase.GetItemSet().Put( aCondItem );
- bDone = true;
- break;
}
+ break;
case FN_UNO_CATEGORY:
{
if(!rBase.mxNewBase->IsUserDefined())
throw lang::IllegalArgumentException();
short nSet = 0;
- aValue >>= nSet;
+ rValue >>= nSet;
sal_uInt16 nId;
switch( nSet )
@@ -2070,15 +1936,13 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
default: throw lang::IllegalArgumentException();
}
-
rBase.mxNewBase->SetMask( nId|SFXSTYLEBIT_USERDEF );
- bDone = true;
- break;
}
+ break;
case SID_SWREGISTER_COLLECTION:
{
OUString sName;
- aValue >>= sName;
+ rValue >>= sName;
SwRegisterItem aReg( !sName.isEmpty() );
aReg.SetWhich(SID_SWREGISTER_MODE);
rBase.GetItemSet().Put(aReg);
@@ -2086,15 +1950,13 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
rBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
- bDone = true;
- break;
}
+ break;
case RES_TXTATR_CJK_RUBY:
- {
- if(MID_RUBY_CHARSTYLE == nMemberId )
+ if(MID_RUBY_CHARSTYLE == rEntry.nMemberId )
{
OUString sTmp;
- if(aValue >>= sTmp)
+ if(rValue >>= sTmp)
{
SfxItemSet& rStyleSet = rBase.GetItemSet();
SwFmtRuby* pRuby = 0;
@@ -2118,13 +1980,12 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
else
throw lang::IllegalArgumentException();
}
- break;
- }
+ goto put_itemset;
case RES_PARATR_DROP:
{
- if( MID_DROPCAP_CHAR_STYLE_NAME == nMemberId)
+ if( MID_DROPCAP_CHAR_STYLE_NAME == rEntry.nMemberId)
{
- if(aValue.getValueType() == ::cppu::UnoType<OUString>::get())
+ if(rValue.getValueType() == ::cppu::UnoType<OUString>::get())
{
SfxItemSet& rStyleSet = rBase.GetItemSet();
@@ -2135,7 +1996,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(!pDrop)
pDrop = new SwFmtDrop();
OUString uStyle;
- aValue >>= uStyle;
+ rValue >>= uStyle;
OUString sStyle;
SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
SwDocStyleSheet* pStyle =
@@ -2149,40 +2010,32 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
else
throw lang::IllegalArgumentException();
-
- bDone = true;
+ break;
}
- break;
}
+ //no break!
default:
+put_itemset:
{
- // nothing to do
- break;
- }
- }
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+ SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
+ aSet.SetParent(&rStyleSet);
+ rPropSet.setPropertyValue(rEntry, rValue, aSet);
+ rStyleSet.Put(aSet);
+ // #i70223#
+ if ( SFX_STYLE_FAMILY_PARA == eFamily &&
+ rEntry.nWID == RES_PARATR_NUMRULE &&
+ rBase.mxNewBase.is() && rBase.mxNewBase->GetCollection() &&
+ rBase.mxNewBase->GetCollection()->IsAssignedToListLevelOfOutlineStyle() )
- if(!bDone)
- {
- // default ItemSet handling
- SfxItemSet& rStyleSet = rBase.GetItemSet();
- SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
- aSet.SetParent(&rStyleSet);
- rPropSet.setPropertyValue(rEntry, aValue, aSet);
- rStyleSet.Put(aSet);
-
- // --> OD 2006-10-18 #i70223#
- if ( SFX_STYLE_FAMILY_PARA == eFamily &&
- rEntry.nWID == RES_PARATR_NUMRULE &&
- rBase.mxNewBase.is() && rBase.mxNewBase->GetCollection() &&
- //rBase.mxNewBase->GetCollection()->GetOutlineLevel() < MAXLEVEL /* assigned to list level of outline style */) //#outline level,removed by zhaojianwei
- rBase.mxNewBase->GetCollection()->IsAssignedToListLevelOfOutlineStyle() ) ////<-end,add by zhaojianwei
- {
- OUString sNewNumberingRuleName;
- aValue >>= sNewNumberingRuleName;
- OUString sTmp( sNewNumberingRuleName );
- if ( sNewNumberingRuleName.getLength() == 0 || sTmp != pDoc->GetOutlineNumRule()->GetName() )
{
- rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
+ OUString sNewNumberingRuleName;
+ rValue >>= sNewNumberingRuleName;
+ if ( sNewNumberingRuleName.isEmpty() ||
+ sNewNumberingRuleName != pDoc->GetOutlineNumRule()->GetName() )
+ {
+ rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
+ }
}
}
}
@@ -2287,7 +2140,6 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwDoc *pDoc) throw(uno::RuntimeException)
{
uno::Any aRet;
-
if(FN_UNO_IS_PHYSICAL == rEntry.nWID)
{
sal_Bool bPhys = pBase != 0;
@@ -2323,17 +2175,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
else if(pBase)
{
if(!rBase.mxNewBase.is())
- {
rBase.mxNewBase = new SwDocStyleSheet( *(SwDocStyleSheet*)pBase );
- }
-
- //UUUU
- const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
-
- //UUUU adapted switch logic to a more readable state; removed goto's and made
- // execution of standard setting of proerty in ItemSet dependent of this variable
- bool bDone(false);
-
switch(rEntry.nWID)
{
case RES_PAPER_BIN:
@@ -2352,40 +2194,35 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sTmp = pPrinter->GetPaperBinName ( nBin );
aRet <<= sTmp;
}
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_NUM_RULES: //Sonderbehandlung fuer das SvxNumRuleItem:
{
const SwNumRule* pRule = rBase.mxNewBase->GetNumRule();
OSL_ENSURE(pRule, "Wo ist die NumRule?");
uno::Reference< container::XIndexReplace > xRules = new SwXNumberingRules(*pRule, pDoc);
-
aRet.setValue(&xRules, cppu::UnoType<container::XIndexReplace>::get());
- bDone = true;
- break;
}
break;
case RES_PARATR_OUTLINELEVEL:
{
OSL_ENSURE( SFX_STYLE_FAMILY_PARA == eFamily, "only paras" );
int nLevel = rBase.mxNewBase->GetCollection()->GetAttrOutlineLevel();
- aRet <<= static_cast<sal_Int16>( nLevel );
- bDone = true;
- break;
+ aRet <<= static_cast<sal_Int16>( nLevel );
}
+ break;
case FN_UNO_FOLLOW_STYLE:
{
OUString aString;
SwStyleNameMapper::FillProgName(rBase.mxNewBase->GetFollow(), aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true);
aRet <<= aString;
- bDone = true;
- break;
}
+ break;
case RES_PAGEDESC :
+ if( MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
+ goto query_itemset;
{
- if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
+ if (MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
break;
// special handling for RES_PAGEDESC
const SfxPoolItem* pItem;
@@ -2398,11 +2235,9 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
aRet <<= aString;
}
-
}
- bDone = true;
- break;
}
+ break;
case FN_UNO_IS_AUTO_UPDATE:
{
sal_Bool bAuto = sal_False;
@@ -2411,18 +2246,14 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
bAuto = rBase.mxNewBase->GetFrmFmt()->IsAutoUpdateFmt();
aRet.setValue(&bAuto, ::getBooleanCppuType());
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_DISPLAY_NAME:
{
OUString sName(rBase.mxNewBase->GetDisplayName());
aRet <<= sName;
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_PARA_STYLE_CONDITIONS:
{
OSL_ENSURE(COND_COMMAND_COUNT == 28,
@@ -2451,15 +2282,12 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
pSeq[n].Value <<= aStyleName;
}
aRet <<= aSeq;
-
- bDone = true;
- break;
}
+ break;
case FN_UNO_CATEGORY:
{
sal_uInt16 nPoolId = rBase.mxNewBase->GetCollection()->GetPoolFmtId();
short nRet = -1;
-
switch ( COLL_GET_RANGE_BITS & nPoolId )
{
case COLL_TEXT_BITS:
@@ -2481,11 +2309,9 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
nRet = style::ParagraphStyleCategory::HTML;
break;
}
-
aRet <<= nRet;
- bDone = true;
- break;
}
+ break;
case SID_SWREGISTER_COLLECTION:
{
const SwPageDesc *pPageDesc = rBase.mxNewBase->GetPageDesc();
@@ -2497,109 +2323,18 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwStyleNameMapper::FillProgName(
pCol->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
aRet <<= aString;
- bDone = true;
- break;
- }
- case RES_BACKGROUND:
- {
- //UUUU No new FillStyle for PageBackground; need to remove again when we want
- // to support that, too. Add a break to *not* set bDone to true
- if(SFX_STYLE_FAMILY_PAGE == eFamily)
- {
- break;
- }
-
- //UUUU
- const SfxItemSet& rSet = rBase.GetItemSet();
- const SvxBrushItem aOriginalBrushItem(sw::getSvxBrushItemFromSourceSet(rSet));
-
- if(!aOriginalBrushItem.QueryValue(aRet, nMemberId))
- {
- OSL_ENSURE(false, "Error getting attribute from RES_BACKGROUND (!)");
- }
-
- bDone = true;
- break;
- }
- case OWN_ATTR_FILLBMP_MODE:
- {
- //UUUU
- const SfxItemSet& rSet = rBase.GetItemSet();
- const XFillBmpStretchItem* pStretchItem = dynamic_cast< const XFillBmpStretchItem* >(&rSet.Get(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = dynamic_cast< const XFillBmpTileItem* >(&rSet.Get(XATTR_FILLBMP_TILE));
-
- if( pTileItem && pTileItem->GetValue() )
- {
- aRet <<= drawing::BitmapMode_REPEAT;
- }
- else if( pStretchItem && pStretchItem->GetValue() )
- {
- aRet <<= drawing::BitmapMode_STRETCH;
- }
- else
- {
- aRet <<= drawing::BitmapMode_NO_REPEAT;
- }
-
- bDone = true;
- break;
}
+ break;
default:
+query_itemset:
{
- // nothing to do as default
- break;
- }
- }
-
- if(!bDone)
- {
- SfxItemSet& rSet = rBase.GetItemSet();
- rPropSet.getPropertyValue(rEntry, rSet, aRet);
-
- //UUUU
- if(rEntry.aType == ::cppu::UnoType<sal_Int16>::get() && rEntry.aType != aRet.getValueType())
- {
- // since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
- sal_Int32 nValue = 0;
- if (aRet >>= nValue)
- aRet <<= (sal_Int16)nValue;
- }
-
- //UUUU check for needed metric translation
- if(rEntry.nMemberId & SFX_METRIC_ITEM)
- {
- bool bDoIt(true);
-
- if(XATTR_FILLBMP_SIZEX == rEntry.nWID || XATTR_FILLBMP_SIZEY == rEntry.nWID)
- {
- // exception: If these ItemTypes are used, do not convert when these are negative
- // since this means they are intended as percent values
- sal_Int32 nValue = 0;
-
- if(aRet >>= nValue)
- {
- bDoIt = nValue > 0;
- }
- }
-
- if(bDoIt && pDoc)
- {
- const SfxItemPool& rPool = pDoc->GetAttrPool();
- const SfxMapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
-
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- SvxUnoConvertToMM(eMapUnit, aRet);
- }
- }
+ SfxItemSet& rSet = rBase.GetItemSet();
+ rPropSet.getPropertyValue(rEntry, rSet, aRet);
}
}
}
else
- {
throw uno::RuntimeException();
- }
-
return aRet;
}
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 2a9f96916ecd..d16582b81031 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3615,6 +3615,8 @@ SwAttrFnTab aCSS1AttrFnTab = {
/* RES_AUTO_STYLE */ 0,
/* RES_FRMATR_STYLE_NAME */ 0,
/* RES_FRMATR_CONDITIONAL_STYLE_NAME */ 0,
+/* RES_FILL_STYLE */ 0,
+/* RES_FILL_GRADIENT */ 0,
/* RES_FRMATR_GRABBAG */ 0,
/* RES_TEXT_VERT_ADJUST */ 0,
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 5d164582668d..373db7241afe 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -3327,6 +3327,8 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_AUTO_STYLE */ 0,
/* RES_FRMATR_STYLE_NAME */ 0,
/* RES_FRMATR_CONDITIONAL_STYLE_NAME */ 0,
+/* RES_FILL_STYLE */ 0,
+/* RES_FILL_GRADIENT */ 0,
/* RES_FRMATR_GRABBAG */ 0,
/* RES_TEXT_VERT_ADJUST */ 0,
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index dd7631751451..edcd130e1d90 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6765,7 +6765,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
else if (m_rExport.SdrExporter().getDMLTextFrameSyntax())
{
bool bImageBackground = false;
- const SfxPoolItem* pItem = GetExport().HasItem(XATTR_FILLSTYLE);
+ const SfxPoolItem* pItem = GetExport().HasItem(RES_FILL_STYLE);
if (pItem)
{
const XFillStyleItem* pFillStyle = static_cast<const XFillStyleItem*>(pItem);
@@ -6880,7 +6880,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
if (m_rExport.SdrExporter().getDMLTextFrameSyntax())
{
// <a:gradFill> should be before <a:ln>.
- const SfxPoolItem* pItem = GetExport().HasItem(XATTR_FILLSTYLE);
+ const SfxPoolItem* pItem = GetExport().HasItem(RES_FILL_STYLE);
if (pItem)
{
const XFillStyleItem* pFillStyle = static_cast<const XFillStyleItem*>(pItem);
@@ -6898,7 +6898,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
- pItem = GetExport().HasItem(XATTR_FILLGRADIENT);
+ pItem = GetExport().HasItem(RES_FILL_GRADIENT);
if (pItem)
{
const XFillGradientItem* pFillGradient = static_cast<const XFillGradientItem*>(pItem);
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ed6994bc4a49..6065d1956344 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -112,8 +112,6 @@
#include <breakit.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <unotools/localedatawrapper.hxx>
-#include <unobrushitemhelper.hxx>
-#include <svx/xenum.hxx>
#include <tgrditem.hxx>
#include <flddropdown.hxx>
#include <chpfld.hxx>
@@ -296,9 +294,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
{
pItem = aI->second;
sal_uInt16 nWhich = pItem->Which();
- // Handle fill attributes just like frame attributes for now.
- if ( (nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE ) ||
- (nWhich >= XATTR_FILL_FIRST && nWhich < XATTR_FILL_LAST))
+ if ( nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE)
AttrOutput().OutputItem( *pItem );
}
}
@@ -828,9 +824,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
const SwFrmFmt &rFrmFmt = mpParentFrame->GetFrmFmt();
SfxItemSet aSet(pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END-1,
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
- 0);
+ RES_FRMATR_END-1);
aSet.Set(rFrmFmt.GetAttrSet());
// Fly als Zeichen werden bei uns zu Absatz-gebundenen
@@ -847,24 +841,6 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
if (SFX_ITEM_SET != aSet.GetItemState(RES_SURROUND))
aSet.Put(SwFmtSurround(SURROUND_NONE));
- const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFrmFmt.GetAttrSet().GetItem(XATTR_FILLSTYLE)));
- if (pXFillStyleItem)
- {
- switch (pXFillStyleItem->GetValue())
- {
- case XFILL_NONE:
- break;
- case XFILL_SOLID:
- {
- // Construct an SvxBrushItem, as expected by the exporters.
- aSet.Put(sw::getSvxBrushItemFromSourceSet(rFrmFmt.GetAttrSet()));
- break;
- }
- default:
- break;
- }
- }
-
bOutFlyFrmAttrs = true;
//script doesn't matter if not exporting chp
OutputItemSet(aSet, true, false,
@@ -5443,10 +5419,10 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
case RES_BACKGROUND:
FormatBackground( static_cast< const SvxBrushItem& >( rHt ) );
break;
- case XATTR_FILLSTYLE:
+ case RES_FILL_STYLE:
FormatFillStyle( static_cast< const XFillStyleItem& >( rHt ) );
break;
- case XATTR_FILLGRADIENT:
+ case RES_FILL_GRADIENT:
FormatFillGradient( static_cast< const XFillGradientItem& >( rHt ) );
break;
case RES_BOX:
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 823c376b1f8d..19f78216bae7 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -98,8 +98,6 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
, m_nOutlineId(0)
, m_nDropCapsId(0)
, m_nBackgroundId(0)
- , m_nAreaId(0)
- , m_nTransparenceId(0)
, m_nBorderId(0)
, m_nConditionId(0)
, m_nTypeId(0)
@@ -249,16 +247,9 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
SwWrapTabPage::GetRanges);
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
-
- //UUUU remove?
- //m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
- //OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- //OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
-
- //UUUU add Area and Transparence TabPages
- m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
- m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
-
+ m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
m_nColumnId = AddTabPage("columns", SwColumnPage::Create,
@@ -467,8 +458,6 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
((SwColumnPage&)rPage).SetFrmMode(true);
((SwColumnPage&)rPage).SetFormatUsed( true );
}
- //UUUU do not remove; many other style dialog combinations still use the SfxTabPage
- // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND)
else if (nId == m_nBackgroundId)
{
sal_Int32 nFlagType = 0;
@@ -580,29 +569,6 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
rPage.PageCreated(aSet);
}
- //UUUU inits for Area and Transparency TabPages
- // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
- // the color table) need to be added as items (e.g. SvxColorTableItem) to make
- // these pages find the needed attributes for fill style suggestions.
- // These are added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on
- // demand, but could also be directly added from the DrawModel.
- else if (nId == m_nAreaId)
- {
- SfxItemSet aNew(*aSet.GetPool(),
- SID_COLOR_TABLE, SID_BITMAP_LIST,
- SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0);
-
- aNew.Put(GetStyleSheet().GetItemSet());
-
- // add flag for direct graphic content selection
- aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
-
- rPage.PageCreated(aNew);
- }
- else if (nId == m_nTransparenceId)
- {
- rPage.PageCreated(GetStyleSheet().GetItemSet());
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index c6ee60133c98..40e0c8767989 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -71,9 +71,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
, m_nPictureId(0)
, m_nCropId(0)
, m_nColumnId(0)
- //, m_nBackgroundId(0)
- , m_nAreaId(0)
- , m_nTransparenceId(0)
+ , m_nBackgroundId(0)
, m_nMacroId(0)
, m_nBorderId(0)
{
@@ -102,14 +100,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
-
- //UUUU remove?
- // m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
-
- //UUUU add Area and Transparence TabPages
- m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
- m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
-
+ m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
m_nMacroId = AddTabPage("macro", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0);
@@ -125,11 +116,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
else if (m_sDlgType == "PictureDialog")
RemoveTabPage("crop");
if( m_sDlgType != "FrameDialog" )
- {
- //UUUU RemoveTabPage("background");
- RemoveTabPage("area");
- RemoveTabPage("transparence");
- }
+ RemoveTabPage("background");
}
if (m_bNew)
@@ -183,43 +170,29 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() );
rPage.PageCreated(aNewSet);
}
- //UUUU
- //else if (nId == m_nBackgroundId && m_sDlgType == "FrameDialog")
- //{
- // sal_Int32 nFlagType = SVX_SHOW_SELECTOR;
- // if (!m_bHTMLMode)
- // nFlagType |= SVX_ENABLE_TRANSPARENCY;
- // aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType));
- //
- // rPage.PageCreated(aSet);
- //}
- else if (nId == m_nBorderId)
+ else if (nId == m_nBackgroundId && m_sDlgType == "FrameDialog")
{
- aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_FRAME));
- rPage.PageCreated(aSet);
- }
- //UUUU inits for Area and Transparency TabPages
- // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
- // the color table) need to be added as items (e.g. SvxColorListItem) to make
- // these pages find the needed attributes for fill style suggestions.
- // These are set in preparation to trigger this dialog (FN_FORMAT_FRAME_DLG and
- // FN_DRAW_WRAP_DLG), but could also be directly added from the DrawModel.
- else if (nId == m_nAreaId)
- {
- SfxItemSet aNew(*GetInputSetImpl()->GetPool(),
- SID_COLOR_TABLE, SID_BITMAP_LIST,
- SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0);
+ sal_Int32 nFlagType = SVX_SHOW_SELECTOR;
+ if (!m_bHTMLMode)
+ nFlagType |= SVX_ENABLE_TRANSPARENCY;
+ aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType));
- aNew.Put(m_rSet);
+ SvxGradientListItem aGradientListItem(m_pWrtShell->GetDoc()->GetOrCreateDrawModel()->GetGradientList(), SID_GRADIENT_LIST);
+ aSet.Put(aGradientListItem);
- // add flag for direct graphic content selection
- aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
+ XFillStyleItem aFillStyleItem(((const XFillStyleItem&)m_rSet.Get(RES_FILL_STYLE)).GetValue(), SID_SW_ATTR_FILL_STYLE);
+ aSet.Put(aFillStyleItem);
- rPage.PageCreated(aNew);
+ const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)m_rSet.Get(RES_FILL_GRADIENT);
+ XFillGradientItem aFillGradientItem(rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue(), SID_SW_ATTR_FILL_GRADIENT);
+ aSet.Put(aFillGradientItem);
+
+ rPage.PageCreated(aSet);
}
- else if (nId == m_nTransparenceId)
+ else if (nId == m_nBorderId)
{
- rPage.PageCreated(m_rSet);
+ aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_FRAME));
+ rPage.PageCreated(aSet);
}
}
diff --git a/sw/uiconfig/swriter/ui/framedialog.ui b/sw/uiconfig/swriter/ui/framedialog.ui
index 49d980281298..a010245889e7 100644
--- a/sw/uiconfig/swriter/ui/framedialog.ui
+++ b/sw/uiconfig/swriter/ui/framedialog.ui
@@ -160,10 +160,10 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="area">
+ <object class="GtkLabel" id="background">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Area</property>
+ <property name="label" translatable="yes">Background</property>
</object>
<packing>
<property name="position">5</property>
@@ -174,27 +174,13 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="transparence">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Transparency</property>
- </object>
- <packing>
- <property name="position">6</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
<object class="GtkLabel" id="columns">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Columns</property>
</object>
<packing>
- <property name="position">7</property>
+ <property name="position">6</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -208,7 +194,7 @@
<property name="label" translatable="yes">Macro</property>
</object>
<packing>
- <property name="position">8</property>
+ <property name="position">7</property>
<property name="tab_fill">False</property>
</packing>
</child>
diff --git a/sw/uiconfig/swriter/ui/templatedialog4.ui b/sw/uiconfig/swriter/ui/templatedialog4.ui
index 546d45b7a817..5559c82da4a6 100644
--- a/sw/uiconfig/swriter/ui/templatedialog4.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog4.ui
@@ -176,10 +176,10 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="area">
+ <object class="GtkLabel" id="background">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Area</property>
+ <property name="label" translatable="yes">Background</property>
</object>
<packing>
<property name="position">4</property>
@@ -190,27 +190,13 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="transparence">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Transparency</property>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
<object class="GtkLabel" id="borders">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Borders</property>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -224,7 +210,7 @@
<property name="label" translatable="yes">Columns</property>
</object>
<packing>
- <property name="position">7</property>
+ <property name="position">6</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -238,7 +224,7 @@
<property name="label" translatable="yes">Macro</property>
</object>
<packing>
- <property name="position">8</property>
+ <property name="position">7</property>
<property name="tab_fill">False</property>
</packing>
</child>
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index ff8c044c9650..d734ad0d5bc9 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -708,22 +708,22 @@ void ImpGraphic::ImplSetPrefSize( const Size& rPrefSize )
case( GRAPHIC_BITMAP ):
{
- //UUUU used when importing a writer FlyFrame with SVG as graphic, added conversion
- // to allow setting the PrefSize at the BitmapEx to hold it
- if(maSvgData.get() && maEx.IsEmpty())
- {
- // use maEx as local buffer for rendered svg
- const_cast< ImpGraphic* >(this)->maEx = maSvgData->getReplacement();
- }
-
// #108077# Push through pref size to animation object,
// will be lost on copy otherwise
- if( ImplIsAnimated() )
+ if(maSvgData.get())
{
- const_cast< BitmapEx& >(mpAnimation->GetBitmapEx()).SetPrefSize( rPrefSize );
+ // ignore for Svg. If this is really used (except the grfcache)
+ // it can be extended by using maEx as buffer for maSvgData->getReplacement()
}
+ else
+ {
+ if( ImplIsAnimated() )
+ {
+ const_cast< BitmapEx& >(mpAnimation->GetBitmapEx()).SetPrefSize( rPrefSize );
+ }
- maEx.SetPrefSize( rPrefSize );
+ maEx.SetPrefSize( rPrefSize );
+ }
}
break;
diff --git a/writerfilter/source/dmapper/TablePositionHandler.cxx b/writerfilter/source/dmapper/TablePositionHandler.cxx
index ca2087589bb2..6909f715defd 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.cxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.cxx
@@ -93,7 +93,7 @@ void TablePositionHandler::lcl_sprm(Sprm& /*rSprm*/)
uno::Sequence<beans::PropertyValue> TablePositionHandler::getTablePosition() const
{
- uno::Sequence< beans::PropertyValue > aFrameProperties(19);
+ uno::Sequence< beans::PropertyValue > aFrameProperties(18);
beans::PropertyValue* pFrameProperties = aFrameProperties.getArray();
pFrameProperties[0].Name = "LeftBorderDistance";
@@ -178,8 +178,6 @@ uno::Sequence<beans::PropertyValue> TablePositionHandler::getTablePosition() con
pFrameProperties[16].Value <<= nVertOrientRelation;
pFrameProperties[17].Name = "VertOrientPosition";
pFrameProperties[17].Value <<= ConversionHelper::convertTwipToMM100(m_nY);
- pFrameProperties[18].Name = "FillTransparence";
- pFrameProperties[18].Value <<= sal_Int32(100);
return aFrameProperties;
}
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 4dbafca44003..c6b03ee4b1dc 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmlnumi.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -37,7 +36,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::drawing;
using ::xmloff::token::IsXMLToken;
using ::xmloff::token::XML_TEXT_PROPERTIES;
using ::xmloff::token::XML_GRAPHIC_PROPERTIES;
@@ -53,8 +51,7 @@ XMLShapeStyleContext::XMLShapeStyleContext(
SvXMLStylesContext& rStyles,
sal_uInt16 nFamily)
: XMLPropStyleContext(rImport, nPrfx, rLName, xAttrList, rStyles, nFamily ),
- m_bIsNumRuleAlreadyConverted( false ),
- m_bIsFillStyleAlreadyConverted( false ) //UUUU
+ m_bIsNumRuleAlreadyConverted( false )
{
}
@@ -186,82 +183,6 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
}
}
- if(!m_bIsFillStyleAlreadyConverted && GetProperties().size())
- {
- const UniReference< XMLPropertySetMapper >&rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
- ::std::vector< XMLPropertyState >& rProperties = GetProperties();
- ::std::vector< XMLPropertyState >::iterator a;
- FillStyle eFS(FillStyle_NONE);
- static ::rtl::OUString s_FillStyle(RTL_CONSTASCII_USTRINGPARAM("FillStyle"));
-
- // try to find a FillStyle entry and a value from it
- for(a = rProperties.begin(); a != rProperties.end(); ++a)
- {
- if(a->mnIndex != -1)
- {
- const OUString& rPropName = rMapper->GetEntryAPIName(a->mnIndex);
-
- if(rPropName == s_FillStyle)
- {
- if(a->maValue >>= eFS)
- {
- // okay, type was good, eFS is set
- }
- else
- {
- // also try an int (see XFillStyleItem::PutValue)
- sal_Int32 nFS = 0;
-
- if(a->maValue >>= nFS)
- {
- eFS = (FillStyle)nFS;
- }
- }
-
- // exit loop, we found out what we needed to know
- break;
- }
- }
- }
-
- if(FillStyle_NONE != eFS)
- {
- //UUUU a FillStyle was found, thus the new [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
- // description for the Fill definitions is used. All formally used props based
- // on RES_BACKGROUND need to be deleted to get no conflicts between the two
- // sets of properties; old files will keep these and adapt accordingly
- static ::rtl::OUString s_BackColorRGB(RTL_CONSTASCII_USTRINGPARAM("BackColorRGB"));
- static ::rtl::OUString s_BackTransparent(RTL_CONSTASCII_USTRINGPARAM("BackTransparent"));
- static ::rtl::OUString s_BackColorTransparency(RTL_CONSTASCII_USTRINGPARAM("BackColorTransparency"));
- static ::rtl::OUString s_BackGraphicURL(RTL_CONSTASCII_USTRINGPARAM("BackGraphicURL"));
- static ::rtl::OUString s_BackGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("BackGraphicFilter"));
- static ::rtl::OUString s_BackGraphicLocation(RTL_CONSTASCII_USTRINGPARAM("BackGraphicLocation"));
- static ::rtl::OUString s_BackGraphicTransparency(RTL_CONSTASCII_USTRINGPARAM("BackGraphicTransparency"));
-
- for(a = rProperties.begin(); a != rProperties.end(); ++a)
- {
- if(a->mnIndex != -1)
- {
- const OUString& rPropName = rMapper->GetEntryAPIName(a->mnIndex);
-
- if(s_BackColorRGB == rPropName
- || s_BackTransparent == rPropName
- || s_BackColorTransparency == rPropName
- || s_BackGraphicURL == rPropName
- || s_BackGraphicFilter == rPropName
- || s_BackGraphicLocation == rPropName
- || s_BackGraphicTransparency== rPropName)
- {
- // mark entry as inactive
- a->mnIndex = -1;
- }
- }
- }
- }
-
- m_bIsFillStyleAlreadyConverted = true;
- }
-
struct _ContextID_Index_Pair aContextIDs[] =
{
{ CTF_DASHNAME , -1 },
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index c572e68defbd..c13916f9e589 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -392,7 +392,7 @@ static SvXMLEnumMapEntry const aXML_LineCap_EnumMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-SvXMLEnumMapEntry aXML_FillStyle_EnumMap[] =
+static SvXMLEnumMapEntry const aXML_FillStyle_EnumMap[] =
{
{ XML_NONE, drawing::FillStyle_NONE },
{ XML_SOLID, drawing::FillStyle_SOLID },
@@ -489,7 +489,7 @@ SvXMLEnumMapEntry const aXML_ConnectionKind_EnumMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[] =
+static SvXMLEnumMapEntry const aXML_BitmapMode_EnumMap[] =
{
{ XML_REPEAT, drawing::BitmapMode_REPEAT },
{ XML_STRETCH, drawing::BitmapMode_STRETCH },
@@ -538,7 +538,7 @@ static SvXMLEnumMapEntry const aXML_TexMode_EnumMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-SvXMLEnumMapEntry aXML_RefPoint_EnumMap[] =
+static SvXMLEnumMapEntry const aXML_RefPoint_EnumMap[] =
{
{ XML_TOP_LEFT, drawing::RectanglePoint_LEFT_TOP },
{ XML_TOP, drawing::RectanglePoint_MIDDLE_TOP },
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 1c7ac7ef8248..9c41df7bfd96 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -653,11 +653,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
XMLPropertyState* pAllParaMargin = NULL;
XMLPropertyState* pAllMargin = NULL;
- //UUUU
- XMLPropertyState* pRepeatOffsetX = NULL;
- XMLPropertyState* pRepeatOffsetY = NULL;
-
- bool bNeedsAnchor = false;
+ bool bNeedsAnchor = sal_False;
for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
aIter != rProperties.end();
@@ -793,41 +789,9 @@ void XMLTextExportPropertySetMapper::ContextFilter(
case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
case CTF_MARGINALL: pAllMargin = propertie; break;
-
- //UUUU
- case CTF_SW_REPEAT_OFFSET_X:
- pRepeatOffsetX = propertie;
- break;
-
- //UUUU
- case CTF_SW_REPEAT_OFFSET_Y:
- pRepeatOffsetY = propertie;
- break;
-
- //UUUU
- case CTF_SW_FILLGRADIENTNAME:
- case CTF_SW_FILLHATCHNAME:
- case CTF_SW_FILLBITMAPNAME:
- case CTF_SW_FILLTRANSNAME:
- {
- OUString aStr;
- if( (propertie->maValue >>= aStr) && 0 == aStr.getLength() )
- propertie->mnIndex = -1;
- }
- break;
}
}
- //UUUU
- if( pRepeatOffsetX && pRepeatOffsetY )
- {
- sal_Int32 nOffset = 0;
- if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
- pRepeatOffsetX->mnIndex = -1;
- else
- pRepeatOffsetY->mnIndex = -1;
- }
-
if( pFontNameState )
ContextFontFilter( bEnableFoFontFamily, pFontNameState, pFontFamilyNameState,
pFontStyleNameState, pFontFamilyState,
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 224f35ebffbd..de5cb2a43fdb 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -51,8 +51,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::text;
using namespace ::xmloff::token;
-//UUUU
-using namespace ::com::sun::star::drawing;
static SvXMLEnumMapEntry const pXML_HoriPos_Enum[] =
{
@@ -242,6 +240,16 @@ static SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] =
{ XML_TOKEN_INVALID, 0 }
};
+static SvXMLEnumMapEntry const pXML_FillStyle_Enum[] =
+{
+ { XML_NONE, drawing::FillStyle_NONE },
+ { XML_SOLID, drawing::FillStyle_SOLID },
+ { XML_BITMAP, drawing::FillStyle_BITMAP },
+ { XML_GRADIENT, drawing::FillStyle_GRADIENT },
+ { XML_HATCH, drawing::FillStyle_HATCH },
+ { XML_TOKEN_INVALID, 0 }
+};
+
class XMLDropCapPropHdl_Impl : public XMLPropertyHandler
{
public:
@@ -1213,18 +1221,6 @@ public:
~XMLTextPropertyHandlerFactory_Impl();
};
-//UUUU
-#include <xmloff/EnumPropertyHdl.hxx>
-#include <com/sun/star/drawing/FillStyle.hpp>
-#include "XMLFillBitmapSizePropertyHandler.hxx"
-#include "XMLBitmapLogicalSizePropertyHandler.hxx"
-#include <com/sun/star/drawing/RectanglePoint.hpp>
-#include <com/sun/star/drawing/BitmapMode.hpp>
-#include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
-extern SvXMLEnumMapEntry aXML_FillStyle_EnumMap[];
-extern SvXMLEnumMapEntry aXML_RefPoint_EnumMap[];
-extern SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[];
-
const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
( sal_Int32 nType ) const
{
@@ -1393,31 +1389,12 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
case XML_TYPE_TEXT_NUMBER8_ONE_BASED:
pHdl = new XMLNumber8OneBasedHdl();
break;
+ case XML_TYPE_FILLSTYLE:
+ pHdl = new XMLConstantsPropertyHandler( pXML_FillStyle_Enum, XML_TOKEN_INVALID );
+ break;
case XML_TYPE_VERTICAL_ALIGN:
pHdl = new XMLConstantsPropertyHandler( pXML_VerticalAlign_Enum, XML_TOKEN_INVALID );
break;
-
- //UUUU
- case XML_SW_TYPE_FILLSTYLE:
- pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, cppu::UnoType<FillStyle>::get());
- break;
- case XML_SW_TYPE_FILLBITMAPSIZE:
- pHdl = new XMLFillBitmapSizePropertyHandler();
- break;
- case XML_SW_TYPE_LOGICAL_SIZE:
- pHdl = new XMLBitmapLogicalSizePropertyHandler();
- break;
- case XML_SW_TYPE_BITMAP_REFPOINT:
- pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap, cppu::UnoType<RectanglePoint>::get());
- break;
- case XML_SW_TYPE_BITMAP_MODE:
- pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap, cppu::UnoType<BitmapMode>::get());
- break;
- case XML_SW_TYPE_BITMAPREPOFFSETX:
- case XML_SW_TYPE_BITMAPREPOFFSETY:
- pHdl = new XMLBitmapRepeatOffsetPropertyHandler(XML_SW_TYPE_BITMAPREPOFFSETX == nType);
- break;
-
}
return pHdl;
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index dba9a4f0f455..39f8e520e02d 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -77,9 +77,6 @@ using namespace ::xmloff::token;
#define M_END() \
{ NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
-//UUUU
-#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
-#define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,static_cast<sal_Int32>(type|XML_TYPE_PROP_GRAPHIC),context)
XMLPropertyMapEntry aXMLParaPropMap[] =
{
@@ -690,27 +687,11 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
MG_E( "BackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
MG_E( "BackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
- //UUUU fill attributes
- GMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SW_TYPE_FILLSTYLE, 0 ),
- GMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ),
- GMAP( "FillColor2", XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR, XML_TYPE_COLOR, 0 ),
- GMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLGRADIENTNAME ),
- GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ),
- GMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLHATCHNAME ),
- GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
- GMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLBITMAPNAME ),
- GMAP( "FillTransparence", XML_NAMESPACE_DRAW, XML_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
- GMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLTRANSNAME ),
- GMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
- GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
- GMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
- GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
- GMAP( "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SW_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
- GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
- GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
- GMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SW_TYPE_BITMAP_REFPOINT, 0 ),
- GMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_SW_REPEAT_OFFSET_X ),
- GMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_SW_REPEAT_OFFSET_Y ),
+ // RES_FILL_STYLE
+ MG_E( "FillStyle", DRAW, FILL, XML_TYPE_FILLSTYLE, 0 ),
+
+ // RES_FILL_GRADIENT
+ MG_E( "FillGradientName", DRAW, FILL_GRADIENT_NAME, XML_TYPE_STYLENAME, 0 ),
// RES_BOX
MG_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),