summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-13 16:52:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-13 16:54:25 +0100
commit9783ea516f007ce4dc46af3362b94dcece59b0dc (patch)
tree088fa125c90ca366948428da50f5f5a280d958f2
parent8ef09a9219249120a20e294dd4d987f0c5d01133 (diff)
Resolves: fdo#84930 format page background in report-builder crash
another regression from one of... commit 7d9bb549d498d6beed2c4050c402d09643febdfa Author: Armin Le Grand <alg@apache.org> Date: Mon Jun 2 15:00:50 2014 +0000 Related: #i124638# Second step of DrawingLayer FillAttributes... for Writer objects, now added support for Paragraph and PageStyle (including Header and Footer) for direct attributes and style attributes commit 4a0b5e569d070c286daefb0fdfe45c0dd15d241c Author: Armin Le Grand <alg@apache.org> Date: Thu Apr 17 16:44:58 2014 +0000 i#124638 support for DrawingLayre FillStyle for GraphicFrames and ... ... EmbeddedObjectFrames in Writer commit 6e61ecd09679a66060f932835622821d39e92f01 Author: Armin Le Grand <alg@apache.org> Date: Wed Mar 19 16:17:02 2014 +0000 This is something of a horror, and this is a suboptimal fix, but it appears to work. Change-Id: Iee7e6fdb40ca2e32beaa8e4bfea31872b8e0642e
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx98
1 files changed, 80 insertions, 18 deletions
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index f827456fbc2e..d1646b4140db 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -17,16 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#define RPTUI_ID_LRSPACE 1
-#define RPTUI_ID_ULSPACE 2
-#define RPTUI_ID_PAGE 3
-#define RPTUI_ID_SIZE 4
-#define RPTUI_ID_PAGE_MODE 5
-#define RPTUI_ID_START 6
-#define RPTUI_ID_END 7
-#define RPTUI_ID_BRUSH 8
-#define RPTUI_ID_METRIC 9
-
#include "ReportController.hxx"
#include "ReportDefinition.hxx"
#include "CondFormat.hxx"
@@ -98,6 +88,17 @@
#include <svx/svxids.hrc>
#include <svx/svdobj.hxx>
#include <svx/dataaccessdescriptor.hxx>
+#include <svx/xfillit.hxx>
+#include <svx/xflbckit.hxx>
+#include <svx/xflbmpit.hxx>
+#include <svx/xflbmsli.hxx>
+#include <svx/xflbmsxy.hxx>
+#include <svx/xflbmtit.hxx>
+#include <svx/xflboxy.hxx>
+#include <svx/xflbstit.hxx>
+#include <svx/xflbtoxy.hxx>
+#include <svx/xfltrit.hxx>
+#include <svx/xgrscit.hxx>
#include <editeng/svxenum.hxx>
#include <svx/pageitem.hxx>
#include <editeng/lrspitem.hxx>
@@ -154,6 +155,16 @@
#define MAX_ROWS_FOR_PREVIEW 20
+#define RPTUI_ID_LRSPACE XATTR_FILL_FIRST - 8
+#define RPTUI_ID_ULSPACE XATTR_FILL_FIRST - 7
+#define RPTUI_ID_PAGE XATTR_FILL_FIRST - 6
+#define RPTUI_ID_SIZE XATTR_FILL_FIRST - 5
+#define RPTUI_ID_PAGE_MODE XATTR_FILL_FIRST - 4
+#define RPTUI_ID_START XATTR_FILL_FIRST - 3
+#define RPTUI_ID_END XATTR_FILL_FIRST - 2
+#define RPTUI_ID_BRUSH XATTR_FILL_FIRST - 1
+#define RPTUI_ID_METRIC XATTR_FILL_LAST + 1
+
using namespace ::com::sun::star;
using namespace uno;
using namespace io;
@@ -2378,12 +2389,47 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
{ SID_PAPER_START, SFX_ITEM_POOLABLE },
{ SID_PAPER_END, SFX_ITEM_POOLABLE },
{ SID_ATTR_BRUSH, SFX_ITEM_POOLABLE },
- { SID_FLAG_TYPE, SFX_ITEM_POOLABLE },
+ { XATTR_FILLSTYLE, SFX_ITEM_POOLABLE },
+ { XATTR_FILLCOLOR, SFX_ITEM_POOLABLE },
+ { XATTR_FILLGRADIENT, SFX_ITEM_POOLABLE },
+ { XATTR_FILLHATCH, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBITMAP, SFX_ITEM_POOLABLE },
+ { XATTR_FILLTRANSPARENCE, SFX_ITEM_POOLABLE },
+ { XATTR_GRADIENTSTEPCOUNT, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_TILE, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_POS, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_SIZEX, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_SIZEY, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_SIZELOG, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_TILEOFFSETX, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_TILEOFFSETY, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_STRETCH, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_POSOFFSETX, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_POSOFFSETY, SFX_ITEM_POOLABLE },
+ { XATTR_FILLFLOATTRANSPARENCE, SFX_ITEM_POOLABLE },
+ { XATTR_SECONDARYFILLCOLOR, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBACKGROUND, SFX_ITEM_POOLABLE },
{ SID_ATTR_METRIC, SFX_ITEM_POOLABLE }
};
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
FieldUnit eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
+ static const sal_uInt16 pRanges[] =
+ {
+ RPTUI_ID_LRSPACE, XATTR_FILL_LAST,
+ SID_ATTR_METRIC,SID_ATTR_METRIC,
+ 0
+ };
+ SfxItemPool* pPool( new SfxItemPool(OUString("ReportPageProperties"), RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) );
+
+ const Graphic aNullGraphic;
+ const ::Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color
+ const ::Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color
+ const ::Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY));
+ const XDash aNullDash;
+ const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
+ const XHatch aNullHatch(aNullLineCol);
+
SfxPoolItem* pDefaults[] =
{
new SvxLRSpaceItem(RPTUI_ID_LRSPACE),
@@ -2394,16 +2440,32 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SfxAllEnumItem(RPTUI_ID_START,PAPER_A4),
new SfxAllEnumItem(RPTUI_ID_END,PAPER_E),
new SvxBrushItem(RPTUI_ID_BRUSH),
+ new XFillStyleItem,
+ new XFillColorItem("", aNullFillCol),
+ new XFillGradientItem(aNullGrad),
+ new XFillHatchItem(pPool, aNullHatch),
+ new XFillBitmapItem(pPool, aNullGraphic),
+ new XFillTransparenceItem,
+ new XGradientStepCountItem,
+ new XFillBmpTileItem,
+ new XFillBmpPosItem,
+ new XFillBmpSizeXItem,
+ new XFillBmpSizeYItem,
+ new XFillBmpSizeLogItem,
+ new XFillBmpTileOffsetXItem,
+ new XFillBmpTileOffsetYItem,
+ new XFillBmpStretchItem,
+ new XFillBmpPosOffsetXItem,
+ new XFillBmpPosOffsetYItem,
+ new XFillFloatTransparenceItem(pPool, aNullGrad, false),
+ new XSecondaryFillColorItem("", aNullFillCol),
+ new XFillBackgroundItem,
new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric))
};
- static const sal_uInt16 pRanges[] =
- {
- RPTUI_ID_LRSPACE,RPTUI_ID_BRUSH,
- SID_ATTR_METRIC,SID_ATTR_METRIC,
- 0
- };
- SfxItemPool* pPool( new SfxItemPool(OUString("ReportPageProperties"), RPTUI_ID_LRSPACE,RPTUI_ID_METRIC, aItemInfos, pDefaults) );
+ pPool->SetDefaults(pDefaults);
+
+
pPool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same