2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36 #define HTMLSTYLE2_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle2, iface)
38 static HRESULT WINAPI HTMLStyle2_QueryInterface(IHTMLStyle2 *iface, REFIID riid, void **ppv)
40 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
42 return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
45 static ULONG WINAPI HTMLStyle2_AddRef(IHTMLStyle2 *iface)
47 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
49 return IHTMLStyle_AddRef(HTMLSTYLE(This));
52 static ULONG WINAPI HTMLStyle2_Release(IHTMLStyle2 *iface)
54 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
56 return IHTMLStyle_Release(HTMLSTYLE(This));
59 static HRESULT WINAPI HTMLStyle2_GetTypeInfoCount(IHTMLStyle2 *iface, UINT *pctinfo)
61 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
62 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
65 static HRESULT WINAPI HTMLStyle2_GetTypeInfo(IHTMLStyle2 *iface, UINT iTInfo,
66 LCID lcid, ITypeInfo **ppTInfo)
68 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
69 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
72 static HRESULT WINAPI HTMLStyle2_GetIDsOfNames(IHTMLStyle2 *iface, REFIID riid,
73 LPOLESTR *rgszNames, UINT cNames,
74 LCID lcid, DISPID *rgDispId)
76 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
77 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
81 static HRESULT WINAPI HTMLStyle2_Invoke(IHTMLStyle2 *iface, DISPID dispIdMember,
82 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
83 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
85 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
86 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
87 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
90 static HRESULT WINAPI HTMLStyle2_put_tableLayout(IHTMLStyle2 *iface, BSTR v)
92 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
93 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
97 static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p)
99 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
100 FIXME("(%p)->(%p)\n", This, p);
104 static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v)
106 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
107 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
111 static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p)
113 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
114 FIXME("(%p)->(%p)\n", This, p);
118 static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v)
120 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
121 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
125 static HRESULT WINAPI HTMLStyle2_get_direction(IHTMLStyle2 *iface, BSTR *p)
127 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
128 FIXME("(%p)->(%p)\n", This, p);
132 static HRESULT WINAPI HTMLStyle2_put_behavior(IHTMLStyle2 *iface, BSTR v)
134 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
135 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
139 static HRESULT WINAPI HTMLStyle2_get_behavior(IHTMLStyle2 *iface, BSTR *p)
141 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
142 FIXME("(%p)->(%p)\n", This, p);
146 static HRESULT WINAPI HTMLStyle2_setExpression(IHTMLStyle2 *iface, BSTR propname, BSTR expression, BSTR language)
148 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
149 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression), debugstr_w(language));
153 static HRESULT WINAPI HTMLStyle2_getExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT *expression)
155 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
156 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
160 static HRESULT WINAPI HTMLStyle2_removeExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT_BOOL *pfSuccess)
162 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
163 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
167 static HRESULT WINAPI HTMLStyle2_put_position(IHTMLStyle2 *iface, BSTR v)
169 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
171 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
173 return set_nsstyle_attr(This->nsstyle, STYLEID_POSITION, v, 0);
176 static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p)
178 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
180 TRACE("(%p)->(%p)\n", This, p);
182 return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p);
185 static HRESULT WINAPI HTMLStyle2_put_unicodeBidi(IHTMLStyle2 *iface, BSTR v)
187 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
188 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
192 static HRESULT WINAPI HTMLStyle2_get_unicodeBidi(IHTMLStyle2 *iface, BSTR *p)
194 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
195 FIXME("(%p)->(%p)\n", This, p);
199 static HRESULT WINAPI HTMLStyle2_put_bottom(IHTMLStyle2 *iface, VARIANT v)
201 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
202 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
206 static HRESULT WINAPI HTMLStyle2_get_bottom(IHTMLStyle2 *iface, VARIANT *p)
208 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
209 FIXME("(%p)->(%p)\n", This, p);
213 static HRESULT WINAPI HTMLStyle2_put_right(IHTMLStyle2 *iface, VARIANT v)
215 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
217 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
219 return set_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, &v, 0);
222 static HRESULT WINAPI HTMLStyle2_get_right(IHTMLStyle2 *iface, VARIANT *p)
224 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
226 TRACE("(%p)->(%p)\n", This, p);
228 return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
231 static HRESULT WINAPI HTMLStyle2_put_pixelBottom(IHTMLStyle2 *iface, LONG v)
233 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
234 FIXME("(%p)->(%d)\n", This, v);
238 static HRESULT WINAPI HTMLStyle2_get_pixelBottom(IHTMLStyle2 *iface, LONG *p)
240 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
241 FIXME("(%p)->(%p)\n", This, p);
245 static HRESULT WINAPI HTMLStyle2_put_pixelRight(IHTMLStyle2 *iface, LONG v)
247 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
248 FIXME("(%p)->(%d)\n", This, v);
252 static HRESULT WINAPI HTMLStyle2_get_pixelRight(IHTMLStyle2 *iface, LONG *p)
254 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
255 FIXME("(%p)->(%p)\n", This, p);
259 static HRESULT WINAPI HTMLStyle2_put_posBottom(IHTMLStyle2 *iface, float v)
261 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
262 FIXME("(%p)->(%f)\n", This, v);
266 static HRESULT WINAPI HTMLStyle2_get_posBottom(IHTMLStyle2 *iface, float *p)
268 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
269 FIXME("(%p)->(%p)\n", This, p);
273 static HRESULT WINAPI HTMLStyle2_put_posRight(IHTMLStyle2 *iface, float v)
275 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
276 FIXME("(%p)->(%f)\n", This, v);
280 static HRESULT WINAPI HTMLStyle2_get_posRight(IHTMLStyle2 *iface, float *p)
282 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
283 FIXME("(%p)->(%p)\n", This, p);
287 static HRESULT WINAPI HTMLStyle2_put_imeMode(IHTMLStyle2 *iface, BSTR v)
289 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
290 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
294 static HRESULT WINAPI HTMLStyle2_get_imeMode(IHTMLStyle2 *iface, BSTR *p)
296 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
297 FIXME("(%p)->(%p)\n", This, p);
301 static HRESULT WINAPI HTMLStyle2_put_rubyAlign(IHTMLStyle2 *iface, BSTR v)
303 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
304 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
308 static HRESULT WINAPI HTMLStyle2_get_rubyAlign(IHTMLStyle2 *iface, BSTR *p)
310 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
311 FIXME("(%p)->(%p)\n", This, p);
315 static HRESULT WINAPI HTMLStyle2_put_rubyPosition(IHTMLStyle2 *iface, BSTR v)
317 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
318 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
322 static HRESULT WINAPI HTMLStyle2_get_rubyPosition(IHTMLStyle2 *iface, BSTR *p)
324 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
325 FIXME("(%p)->(%p)\n", This, p);
329 static HRESULT WINAPI HTMLStyle2_put_rubyOverhang(IHTMLStyle2 *iface, BSTR v)
331 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
332 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
336 static HRESULT WINAPI HTMLStyle2_get_rubyOverhang(IHTMLStyle2 *iface, BSTR *p)
338 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
339 FIXME("(%p)->(%p)\n", This, p);
343 static HRESULT WINAPI HTMLStyle2_put_layoutGridChar(IHTMLStyle2 *iface, VARIANT v)
345 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
346 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
350 static HRESULT WINAPI HTMLStyle2_get_layoutGridChar(IHTMLStyle2 *iface, VARIANT *p)
352 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
353 FIXME("(%p)->(%p)\n", This, p);
357 static HRESULT WINAPI HTMLStyle2_put_layoutGridLine(IHTMLStyle2 *iface, VARIANT v)
359 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
360 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
364 static HRESULT WINAPI HTMLStyle2_get_layoutGridLine(IHTMLStyle2 *iface, VARIANT *p)
366 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
367 FIXME("(%p)->(%p)\n", This, p);
371 static HRESULT WINAPI HTMLStyle2_put_layoutGridMode(IHTMLStyle2 *iface, BSTR v)
373 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
374 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
378 static HRESULT WINAPI HTMLStyle2_get_layoutGridMode(IHTMLStyle2 *iface, BSTR *p)
380 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
381 FIXME("(%p)->(%p)\n", This, p);
385 static HRESULT WINAPI HTMLStyle2_put_layoutGridType(IHTMLStyle2 *iface, BSTR v)
387 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
388 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
392 static HRESULT WINAPI HTMLStyle2_get_layoutGridType(IHTMLStyle2 *iface, BSTR *p)
394 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
395 FIXME("(%p)->(%p)\n", This, p);
399 static HRESULT WINAPI HTMLStyle2_put_layoutGrid(IHTMLStyle2 *iface, BSTR v)
401 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
402 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
406 static HRESULT WINAPI HTMLStyle2_get_layoutGrid(IHTMLStyle2 *iface, BSTR *p)
408 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
409 FIXME("(%p)->(%p)\n", This, p);
413 static HRESULT WINAPI HTMLStyle2_put_wordBreak(IHTMLStyle2 *iface, BSTR v)
415 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
416 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
420 static HRESULT WINAPI HTMLStyle2_get_wordBreak(IHTMLStyle2 *iface, BSTR *p)
422 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
423 FIXME("(%p)->(%p)\n", This, p);
427 static HRESULT WINAPI HTMLStyle2_put_lineBreak(IHTMLStyle2 *iface, BSTR v)
429 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
430 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
434 static HRESULT WINAPI HTMLStyle2_get_lineBreak(IHTMLStyle2 *iface, BSTR *p)
436 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
437 FIXME("(%p)->(%p)\n", This, p);
441 static HRESULT WINAPI HTMLStyle2_put_textJustify(IHTMLStyle2 *iface, BSTR v)
443 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
444 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
448 static HRESULT WINAPI HTMLStyle2_get_textJustify(IHTMLStyle2 *iface, BSTR *p)
450 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
451 FIXME("(%p)->(%p)\n", This, p);
455 static HRESULT WINAPI HTMLStyle2_put_textJustifyTrim(IHTMLStyle2 *iface, BSTR v)
457 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
458 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
462 static HRESULT WINAPI HTMLStyle2_get_textJustifyTrim(IHTMLStyle2 *iface, BSTR *p)
464 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
465 FIXME("(%p)->(%p)\n", This, p);
469 static HRESULT WINAPI HTMLStyle2_put_textKashida(IHTMLStyle2 *iface, VARIANT v)
471 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
472 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
476 static HRESULT WINAPI HTMLStyle2_get_textKashida(IHTMLStyle2 *iface, VARIANT *p)
478 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
479 FIXME("(%p)->(%p)\n", This, p);
483 static HRESULT WINAPI HTMLStyle2_put_textAutospace(IHTMLStyle2 *iface, BSTR v)
485 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
486 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
490 static HRESULT WINAPI HTMLStyle2_get_textAutospace(IHTMLStyle2 *iface, BSTR *p)
492 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
493 FIXME("(%p)->(%p)\n", This, p);
497 static HRESULT WINAPI HTMLStyle2_put_overflowX(IHTMLStyle2 *iface, BSTR v)
499 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
500 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
504 static HRESULT WINAPI HTMLStyle2_get_overflowX(IHTMLStyle2 *iface, BSTR *p)
506 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
507 FIXME("(%p)->(%p)\n", This, p);
511 static HRESULT WINAPI HTMLStyle2_put_overflowY(IHTMLStyle2 *iface, BSTR v)
513 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
514 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
518 static HRESULT WINAPI HTMLStyle2_get_overflowY(IHTMLStyle2 *iface, BSTR *p)
520 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
521 FIXME("(%p)->(%p)\n", This, p);
525 static HRESULT WINAPI HTMLStyle2_put_accelerator(IHTMLStyle2 *iface, BSTR v)
527 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
528 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
532 static HRESULT WINAPI HTMLStyle2_get_accelerator(IHTMLStyle2 *iface, BSTR *p)
534 HTMLStyle *This = HTMLSTYLE2_THIS(iface);
535 FIXME("(%p)->(%p)\n", This, p);
539 static const IHTMLStyle2Vtbl HTMLStyle2Vtbl = {
540 HTMLStyle2_QueryInterface,
543 HTMLStyle2_GetTypeInfoCount,
544 HTMLStyle2_GetTypeInfo,
545 HTMLStyle2_GetIDsOfNames,
547 HTMLStyle2_put_tableLayout,
548 HTMLStyle2_get_tableLayout,
549 HTMLStyle2_put_borderCollapse,
550 HTMLStyle2_get_borderCollapse,
551 HTMLStyle2_put_direction,
552 HTMLStyle2_get_direction,
553 HTMLStyle2_put_behavior,
554 HTMLStyle2_get_behavior,
555 HTMLStyle2_setExpression,
556 HTMLStyle2_getExpression,
557 HTMLStyle2_removeExpression,
558 HTMLStyle2_put_position,
559 HTMLStyle2_get_position,
560 HTMLStyle2_put_unicodeBidi,
561 HTMLStyle2_get_unicodeBidi,
562 HTMLStyle2_put_bottom,
563 HTMLStyle2_get_bottom,
564 HTMLStyle2_put_right,
565 HTMLStyle2_get_right,
566 HTMLStyle2_put_pixelBottom,
567 HTMLStyle2_get_pixelBottom,
568 HTMLStyle2_put_pixelRight,
569 HTMLStyle2_get_pixelRight,
570 HTMLStyle2_put_posBottom,
571 HTMLStyle2_get_posBottom,
572 HTMLStyle2_put_posRight,
573 HTMLStyle2_get_posRight,
574 HTMLStyle2_put_imeMode,
575 HTMLStyle2_get_imeMode,
576 HTMLStyle2_put_rubyAlign,
577 HTMLStyle2_get_rubyAlign,
578 HTMLStyle2_put_rubyPosition,
579 HTMLStyle2_get_rubyPosition,
580 HTMLStyle2_put_rubyOverhang,
581 HTMLStyle2_get_rubyOverhang,
582 HTMLStyle2_put_layoutGridChar,
583 HTMLStyle2_get_layoutGridChar,
584 HTMLStyle2_put_layoutGridLine,
585 HTMLStyle2_get_layoutGridLine,
586 HTMLStyle2_put_layoutGridMode,
587 HTMLStyle2_get_layoutGridMode,
588 HTMLStyle2_put_layoutGridType,
589 HTMLStyle2_get_layoutGridType,
590 HTMLStyle2_put_layoutGrid,
591 HTMLStyle2_get_layoutGrid,
592 HTMLStyle2_put_wordBreak,
593 HTMLStyle2_get_wordBreak,
594 HTMLStyle2_put_lineBreak,
595 HTMLStyle2_get_lineBreak,
596 HTMLStyle2_put_textJustify,
597 HTMLStyle2_get_textJustify,
598 HTMLStyle2_put_textJustifyTrim,
599 HTMLStyle2_get_textJustifyTrim,
600 HTMLStyle2_put_textKashida,
601 HTMLStyle2_get_textKashida,
602 HTMLStyle2_put_textAutospace,
603 HTMLStyle2_get_textAutospace,
604 HTMLStyle2_put_overflowX,
605 HTMLStyle2_get_overflowX,
606 HTMLStyle2_put_overflowY,
607 HTMLStyle2_get_overflowY,
608 HTMLStyle2_put_accelerator,
609 HTMLStyle2_get_accelerator
612 void HTMLStyle2_Init(HTMLStyle *This)
614 This->lpHTMLStyle2Vtbl = &HTMLStyle2Vtbl;