xtablend.cxx (97e8a929) xtablend.cxx (a68b38df)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 108 unchanged lines hidden (view full) ---

117 if(!mpData)
118 {
119 const Point aZero(0, 0);
120 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
121
122 VirtualDevice* pVirDev = new VirtualDevice;
123 OSL_ENSURE(0 != pVirDev, "XLineEndList: no VirtualDevice created!" );
124 pVirDev->SetMapMode(MAP_100TH_MM);
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 108 unchanged lines hidden (view full) ---

117 if(!mpData)
118 {
119 const Point aZero(0, 0);
120 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
121
122 VirtualDevice* pVirDev = new VirtualDevice;
123 OSL_ENSURE(0 != pVirDev, "XLineEndList: no VirtualDevice created!" );
124 pVirDev->SetMapMode(MAP_100TH_MM);
125 const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth() * 2, getUiBitmapHeight())));
125 const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
126 const Size aSize(pVirDev->PixelToLogic(Size(rSize.Width() * 2, rSize.Height())));
126 pVirDev->SetOutputSize(aSize);
127 pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
128 ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
129 : DRAWMODE_DEFAULT);
130 pVirDev->SetBackground(rStyleSettings.GetFieldColor());
131
132 SdrModel* pSdrModel = new SdrModel();
133 OSL_ENSURE(0 != pSdrModel, "XLineEndList: no SdrModel created!" );

--- 10 unchanged lines hidden (view full) ---

144 const basegfx::B2DPoint aStart(0, aSize.Height() / 2);
145 const basegfx::B2DPoint aEnd(aSize.Width(), aSize.Height() / 2);
146 basegfx::B2DPolygon aPolygon;
147 aPolygon.append(aStart);
148 aPolygon.append(aEnd);
149 SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
150 OSL_ENSURE(0 != pLineObject, "XLineEndList: no LineObject created!" );
151 pLineObject->SetModel(pSdrModel);
127 pVirDev->SetOutputSize(aSize);
128 pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
129 ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
130 : DRAWMODE_DEFAULT);
131 pVirDev->SetBackground(rStyleSettings.GetFieldColor());
132
133 SdrModel* pSdrModel = new SdrModel();
134 OSL_ENSURE(0 != pSdrModel, "XLineEndList: no SdrModel created!" );

--- 10 unchanged lines hidden (view full) ---

145 const basegfx::B2DPoint aStart(0, aSize.Height() / 2);
146 const basegfx::B2DPoint aEnd(aSize.Width(), aSize.Height() / 2);
147 basegfx::B2DPolygon aPolygon;
148 aPolygon.append(aStart);
149 aPolygon.append(aEnd);
150 SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
151 OSL_ENSURE(0 != pLineObject, "XLineEndList: no LineObject created!" );
152 pLineObject->SetModel(pSdrModel);
152 const Size aLineWidth(pVirDev->PixelToLogic(Size(getUiBitmapLineWidth(), 0)));
153 const Size aLineWidth(pVirDev->PixelToLogic(Size(rStyleSettings.GetListBoxPreviewDefaultLineWidth(), 0)));
153 pLineObject->SetMergedItem(XLineWidthItem(aLineWidth.getWidth()));
154 const sal_uInt32 nArrowHeight((aSize.Height() * 8) / 10);
155 pLineObject->SetMergedItem(XLineStartWidthItem(nArrowHeight));
156 pLineObject->SetMergedItem(XLineEndWidthItem(nArrowHeight));
157 pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
158
159 mpData = new impXLineEndList(pVirDev, pSdrModel, pBackgroundObject, pLineObject);
160 OSL_ENSURE(0 != mpData, "XLineEndList: data creation went wrong!" );

--- 130 unchanged lines hidden ---
154 pLineObject->SetMergedItem(XLineWidthItem(aLineWidth.getWidth()));
155 const sal_uInt32 nArrowHeight((aSize.Height() * 8) / 10);
156 pLineObject->SetMergedItem(XLineStartWidthItem(nArrowHeight));
157 pLineObject->SetMergedItem(XLineEndWidthItem(nArrowHeight));
158 pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
159
160 mpData = new impXLineEndList(pVirDev, pSdrModel, pBackgroundObject, pLineObject);
161 OSL_ENSURE(0 != mpData, "XLineEndList: data creation went wrong!" );

--- 130 unchanged lines hidden ---