fillctrl.cxx (70d3707a) fillctrl.cxx (8f1fbbb1)
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

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

124 {
125 if ( SFX_ITEM_AVAILABLE == eState )
126 {
127 if( nSID == SID_ATTR_FILL_STYLE )
128 {
129 delete pStyleItem;
130 pStyleItem = (XFillStyleItem*) pState->Clone();
131 pFillTypeLB->Enable();
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

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

124 {
125 if ( SFX_ITEM_AVAILABLE == eState )
126 {
127 if( nSID == SID_ATTR_FILL_STYLE )
128 {
129 delete pStyleItem;
130 pStyleItem = (XFillStyleItem*) pState->Clone();
131 pFillTypeLB->Enable();
132
133 eLastXFS = pFillTypeLB->GetSelectEntryPos();
134 bUpdate = sal_True;
135
136 XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
137 pFillTypeLB->SelectEntryPos(
138 sal::static_int_cast< sal_uInt16 >( eXFS ) );
139 pFillAttrLB->Enable();
140 }
141 else if( pStyleItem )
142 {
143 XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
144
145 if( nSID == SID_ATTR_FILL_COLOR )
146 {
147 delete pColorItem;

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

170 {
171 delete pBitmapItem;
172 pBitmapItem = (XFillBitmapItem*) pState->Clone();
173
174 if( eXFS == XFILL_BITMAP )
175 bEnableControls = sal_True;
176 }
177 }
132 }
133 else if( pStyleItem )
134 {
135 XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
136
137 if( nSID == SID_ATTR_FILL_COLOR )
138 {
139 delete pColorItem;

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

162 {
163 delete pBitmapItem;
164 pBitmapItem = (XFillBitmapItem*) pState->Clone();
165
166 if( eXFS == XFILL_BITMAP )
167 bEnableControls = sal_True;
168 }
169 }
178 if( bEnableControls )
170
171 if( pStyleItem )
172 {
173 // ensure that the correct entry is selected in pFillTypeLB. It
174 // might have been changed by nSID == SID_ATTR_FILL_STYLE, but
175 // it might also be in an in-between state when user had started to
176 // change fillstyle, but not yet changed fillvalue for new style
177 // and when nSID == SID_ATTR_FILL_COLOR/SID_ATTR_FILL_GRADIENT/
178 // SID_ATTR_FILL_HATCH/SID_ATTR_FILL_BITMAP value change is triggered
179 eLastXFS = pFillTypeLB->GetSelectEntryPos();
180 XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
181
182 if(eLastXFS != eXFS)
183 {
184 bUpdate = sal_True;
185 pFillTypeLB->SelectEntryPos( sal::static_int_cast< sal_uInt16 >( eXFS ) );
186 }
187
188 pFillAttrLB->Enable();
189 }
190
191 if( bEnableControls )
179 {
180 //pFillTypeLB->Enable();
181 pFillAttrLB->Enable();
182
183 bUpdate = sal_True;
184 }
185
186 Update( pState );

--- 653 unchanged lines hidden ---
192 {
193 //pFillTypeLB->Enable();
194 pFillAttrLB->Enable();
195
196 bUpdate = sal_True;
197 }
198
199 Update( pState );

--- 653 unchanged lines hidden ---