poly.hxx (7342c28d) | poly.hxx (d2ee8188) |
---|---|
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 --- 66 unchanged lines hidden (view full) --- 75// - PolyOptimize - 76// ---------------- 77 78class PolyOptimizeData 79{ 80private: 81 82 enum DataType { DATA_NONE = 0, DATA_ABSOLUT = 1, DATA_PERCENT = 2 }; | 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 --- 66 unchanged lines hidden (view full) --- 75// - PolyOptimize - 76// ---------------- 77 78class PolyOptimizeData 79{ 80private: 81 82 enum DataType { DATA_NONE = 0, DATA_ABSOLUT = 1, DATA_PERCENT = 2 }; |
83 DataType eType; | 83 DataType eType; // NOTE: only used for debugging |
84 union { sal_uIntPtr mnAbsolut; sal_uInt16 mnPercent; }; 85 86public: 87 88 PolyOptimizeData() : eType( DATA_NONE ) {} 89 PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {} 90 PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {} 91 | 84 union { sal_uIntPtr mnAbsolut; sal_uInt16 mnPercent; }; 85 86public: 87 88 PolyOptimizeData() : eType( DATA_NONE ) {} 89 PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {} 90 PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {} 91 |
92 sal_uIntPtr GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; } | 92 sal_uIntPtr GetAbsValue() const { (void)eType; DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; } |
93 sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } 94}; 95 96// ----------- 97// - Polygon - 98// ----------- 99 100class SvStream; --- 241 unchanged lines hidden --- | 93 sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } 94}; 95 96// ----------- 97// - Polygon - 98// ----------- 99 100class SvStream; --- 241 unchanged lines hidden --- |