xtabdash.cxx (81e4f59a) xtabdash.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

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

112 if(!mpData)
113 {
114 const Point aZero(0, 0);
115 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
116
117 VirtualDevice* pVirDev = new VirtualDevice;
118 OSL_ENSURE(0 != pVirDev, "XDashList: no VirtualDevice created!" );
119 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

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

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

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

144 basegfx::B2DPolygon aPolygon;
145 aPolygon.append(aStart);
146 aPolygon.append(aEnd);
147 SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
148 OSL_ENSURE(0 != pLineObject, "XDashList: no LineObject created!" );
149 pLineObject->SetModel(pSdrModel);
150 pLineObject->SetMergedItem(XLineStyleItem(XLINE_DASH));
151 pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
124 pVirDev->SetOutputSize(aSize);
125 pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
126 ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
127 : DRAWMODE_DEFAULT);
128 pVirDev->SetBackground(rStyleSettings.GetFieldColor());
129
130 SdrModel* pSdrModel = new SdrModel();
131 OSL_ENSURE(0 != pSdrModel, "XDashList: no SdrModel created!" );

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

145 basegfx::B2DPolygon aPolygon;
146 aPolygon.append(aStart);
147 aPolygon.append(aEnd);
148 SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
149 OSL_ENSURE(0 != pLineObject, "XDashList: no LineObject created!" );
150 pLineObject->SetModel(pSdrModel);
151 pLineObject->SetMergedItem(XLineStyleItem(XLINE_DASH));
152 pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
152 const Size aLineWidth(pVirDev->PixelToLogic(Size(getUiBitmapLineWidth(), 0)));
153 const Size aLineWidth(pVirDev->PixelToLogic(Size(rStyleSettings.GetListBoxPreviewDefaultLineWidth(), 0)));
153 pLineObject->SetMergedItem(XLineWidthItem(bUseDoubleSize ? aLineWidth.getWidth() * 2 : aLineWidth.getWidth()));
154 mpData = new impXDashList(pVirDev, pSdrModel, pBackgroundObject, pLineObject);
155 OSL_ENSURE(0 != mpData, "XDashList: data creation went wrong!" );
156 }
157}
158
159void XDashList::impDestroy()
160{

--- 175 unchanged lines hidden ---
154 pLineObject->SetMergedItem(XLineWidthItem(bUseDoubleSize ? aLineWidth.getWidth() * 2 : aLineWidth.getWidth()));
155 mpData = new impXDashList(pVirDev, pSdrModel, pBackgroundObject, pLineObject);
156 OSL_ENSURE(0 != mpData, "XDashList: data creation went wrong!" );
157 }
158}
159
160void XDashList::impDestroy()
161{

--- 175 unchanged lines hidden ---