diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-03-03 11:39:43 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-03-03 11:39:43 +0000 |
commit | 6b741821d6ac3bca21a98a3ce5b069b24abba41f (patch) | |
tree | 88981f97deb5975ee32b22de4611da006e183ba4 /sc/source | |
parent | CWS-TOOLING: integrate CWS dr66 (diff) | |
download | core-6b741821d6ac3bca21a98a3ce5b069b24abba41f.tar.gz core-6b741821d6ac3bca21a98a3ce5b069b24abba41f.zip |
CWS-TOOLING: integrate CWS chart35
2009-02-20 12:33:54 +0100 nn r268312 : correct line ends
2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported
2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge
2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc
2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge
2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially
2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series
2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series
2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard
2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME
2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed
2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf>
2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings
2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order
2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR)
2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko>
2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw
2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family
2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current
2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel
2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage
2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog
2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 248 | ||||
-rw-r--r-- | sc/source/filter/excel/xlstyle.cxx | 27 | ||||
-rw-r--r-- | sc/source/filter/inc/xlstyle.hxx | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 16 |
5 files changed, 52 insertions, 251 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 53e05e1b0ec4..6ffd928f55dc 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -59,6 +59,10 @@ #include "attrib.hxx" #include "jumpmatrix.hxx" +#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ +#include <comphelper/processfactory.hxx> +#endif + #include <stdlib.h> #include <string.h> #include <math.h> @@ -2643,251 +2647,31 @@ void ScInterpreter::ScChar() static ::rtl::OUString lcl_convertIntoHalfWidth( const ::rtl::OUString & rStr ) { - const sal_Unicode *pSrc = rStr.getStr(); - sal_Int32 nLen = rStr.getLength(); - ::rtl::OUStringBuffer aRes( nLen ); + static bool bFirstASCCall = true; + static utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), 0 ); - for (sal_Int32 i=0; i<nLen; i++) + if( bFirstASCCall ) { - if( pSrc[i] >= 0x30a1 && pSrc[i] <= 0x30aa && (pSrc[i] % 2) == 0 ) - // katakana a-o - aRes.append((sal_Unicode)((pSrc[i] - 0x30a2) / 2 + 0xff71)); - else if( pSrc[i] >= 0x30a1 && pSrc[i] <= 0x30aa && (pSrc[i] % 2) == 1 ) - // katakana small a-o - aRes.append((sal_Unicode)((pSrc[i] - 0x30a1) / 2 + 0xff67)); - else if( pSrc[i] >= 0x30ab && pSrc[i] <= 0x30c2 && (pSrc[i] % 2) == 1 ) - // katakana ka-chi - aRes.append((sal_Unicode)((pSrc[i] - 0x30ab) / 2 + 0xff76)); - else if( pSrc[i] >= 0x30ab && pSrc[i] <= 0x30c2 && (pSrc[i] % 2) == 0 ) - { - // katakana ga-dhi - aRes.append((sal_Unicode)((pSrc[i] - 0x30ac) / 2 + 0xff76)); - aRes.append((sal_Unicode)0xff9e ); - } - else if( pSrc[i] == 0x30c3 ) - // katakana small tsu - aRes.append((sal_Unicode)0xff6f ); - else if( pSrc[i] >= 0x30c4 && pSrc[i] <= 0x30c9 && (pSrc[i] % 2) == 0 ) - // katakana tsu-to - aRes.append((sal_Unicode)((pSrc[i] - 0x30c4) / 2 + 0xff82)); - else if( pSrc[i] >= 0x30c4 && pSrc[i] <= 0x30c9 && (pSrc[i] % 2) == 1 ) - { - // katakana du-do - aRes.append((sal_Unicode)((pSrc[i] - 0x30c5) / 2 + 0xff82)); - aRes.append((sal_Unicode)0xff9e ); - } - else if( pSrc[i] >= 0x30ca && pSrc[i] <= 0x30ce ) - // katakana na-no - aRes.append((sal_Unicode)(pSrc[i] - 0x30ca + 0xff85)); - else if( pSrc[i] >= 0x30cf && pSrc[i] <= 0x30dd && (pSrc[i] % 3) == 0 ) - // katakana ha-ho - aRes.append((sal_Unicode)((pSrc[i] - 0x30cf) / 3 + 0xff8a)); - else if( pSrc[i] >= 0x30cf && pSrc[i] <= 0x30dd && (pSrc[i] % 3) == 1 ) - { - // katakana ba-bo - aRes.append((sal_Unicode)((pSrc[i] - 0x30d0) / 3 + 0xff8a)); - aRes.append((sal_Unicode)0xff9e ); - } - else if( pSrc[i] >= 0x30cf && pSrc[i] <= 0x30dd && (pSrc[i] % 3) == 2 ) - { - // katakana pa-po - aRes.append((sal_Unicode)((pSrc[i] - 0x30d1) / 3 + 0xff8a)); - aRes.append((sal_Unicode)0xff9f ); - } - else if( pSrc[i] >= 0x30de && pSrc[i] <= 0x30e2 ) - // katakana ma-mo - aRes.append((sal_Unicode)(pSrc[i] - 0x30de + 0xff8f)); - else if( pSrc[i] >= 0x30e3 && pSrc[i] <= 0x30e8 && (pSrc[i] % 2) == 0) - // katakana ya-yo - aRes.append((sal_Unicode)((pSrc[i] - 0x30e4) / 2 + 0xff94)); - else if( pSrc[i] >= 0x30e3 && pSrc[i] <= 0x30e8 && (pSrc[i] % 2) == 1) - // katakana small ya-yo - aRes.append((sal_Unicode)((pSrc[i] - 0x30e3) / 2 + 0xff6c)); - else if( pSrc[i] >= 0x30e9 && pSrc[i] <= 0x30ed ) - // katakana ra-ro - aRes.append((sal_Unicode)(pSrc[i] - 0x30e9 + 0xff97)); - else if( pSrc[i] == 0x30ef ) - // katakana wa - aRes.append((sal_Unicode)0xff9c); - else if( pSrc[i] == 0x30f2 ) - // katakana wo - aRes.append((sal_Unicode)0xff66); - else if( pSrc[i] == 0x30f3 ) - // katakana nn - aRes.append((sal_Unicode)0xff9d); - else if( pSrc[i] >= 0xff01 && pSrc[i] <= 0xff5e ) - // ASCII characters - aRes.append((sal_Unicode)(pSrc[i] - 0xff01 + 0x0021)); - else - { - switch (pSrc[i]) - { - case 0x2015: // HORIZONTAL BAR => HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK - aRes.append((sal_Unicode)0xff70); break; - case 0x2018: // LEFT SINGLE QUOTATION MARK => GRAVE ACCENT - aRes.append((sal_Unicode)0x0060); break; - case 0x2019: // RIGHT SINGLE QUOTATION MARK => APOSTROPHE - aRes.append((sal_Unicode)0x0027); break; - case 0x201d: // RIGHT DOUBLE QUOTATION MARK => QUOTATION MARK - aRes.append((sal_Unicode)0x0022); break; - case 0x3001: // IDEOGRAPHIC COMMA - aRes.append((sal_Unicode)0xff64); break; - case 0x3002: // IDEOGRAPHIC FULL STOP - aRes.append((sal_Unicode)0xff61); break; - case 0x300c: // LEFT CORNER BRACKET - aRes.append((sal_Unicode)0xff62); break; - case 0x300d: // RIGHT CORNER BRACKET - aRes.append((sal_Unicode)0xff63); break; - case 0x309b: // KATAKANA-HIRAGANA VOICED SOUND MARK - aRes.append((sal_Unicode)0xff9e); break; - case 0x309c: // KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK - aRes.append((sal_Unicode)0xff9f); break; - case 0x30fb: // KATAKANA MIDDLE DOT - aRes.append((sal_Unicode)0xff65); break; - case 0x30fc: // KATAKANA-HIRAGANA PROLONGED SOUND MARK - aRes.append((sal_Unicode)0xff70); break; - case 0xffe5: // FULLWIDTH YEN SIGN => REVERSE SOLIDUS "\" - aRes.append((sal_Unicode)0x005c); break; - default: - aRes.append( pSrc[i] ); - } - } + aTrans.loadModuleByImplName( ::rtl::OUString::createFromAscii( "FULLWIDTH_HALFWIDTH_LIKE_ASC" ), LANGUAGE_SYSTEM ); + bFirstASCCall = false; } - return aRes.makeStringAndClear(); + return aTrans.transliterate( rStr, 0, rStr.getLength(), NULL ); } static ::rtl::OUString lcl_convertIntoFullWidth( const ::rtl::OUString & rStr ) { - const sal_Unicode *pSrc = rStr.getStr(); - sal_Int32 nLen = rStr.getLength(); - ::rtl::OUStringBuffer aRes( nLen ); + static bool bFirstJISCall = true; + static utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), 0 ); - for (sal_Int32 i=0; i<nLen; i++) + if( bFirstJISCall ) { - if( pSrc[i] == 0x0022 ) - // QUOTATION MARK => RIGHT DOUBLE QUOTATION MARK - // This is an exception to the ASCII range that follows below. - aRes.append((sal_Unicode)0x201d); - else if( pSrc[i] == 0x005c ) - // REVERSE SOLIDUS "\", a specialty that gets displayed as a - // Yen sign, which is a legacy of code-page 932, see - // http://www.microsoft.com/globaldev/DrIntl/columns/019/default.mspx#EED - // http://www.microsoft.com/globaldev/reference/dbcs/932.htm - // This is an exception to the ASCII range that follows below. - aRes.append((sal_Unicode)0xffe5); - else if( pSrc[i] == 0x0060 ) - // GRAVE ACCENT => LEFT SINGLE QUOTATION MARK - // This is an exception to the ASCII range that follows below. - aRes.append((sal_Unicode)0x2018); - else if( pSrc[i] == 0x0027 ) - // APOSTROPHE => RIGHT SINGLE QUOTATION MARK - // This is an exception to the ASCII range that follows below. - aRes.append((sal_Unicode)0x2019); - else if( pSrc[i] >= 0x0021 && pSrc[i] <= 0x007e ) - // ASCII characters - aRes.append((sal_Unicode)(pSrc[i] - 0x0021 + 0xff01)); - else if( pSrc[i] == 0xff66 ) - // katakana wo - aRes.append((sal_Unicode)0x30f2); - else if( pSrc[i] >= 0xff67 && pSrc[i] <= 0xff6b ) - // katakana small a-o - aRes.append((sal_Unicode)((pSrc[i] - 0xff67) * 2 + 0x30a1 )); - else if( pSrc[i] >= 0xff6c && pSrc[i] <= 0xff6e ) - // katakana small ya-yo - aRes.append((sal_Unicode)((pSrc[i] - 0xff6c) * 2 + 0x30e3 )); - else if( pSrc[i] == 0xff6f ) - // katakana small tsu - aRes.append((sal_Unicode)0x30c3); - else if( pSrc[i] >= 0xff71 && pSrc[i] <= 0xff75 ) - // katakana a-o - aRes.append((sal_Unicode)((pSrc[i] - 0xff71) * 2 + 0x30a2)); - else if( pSrc[i] >= 0xff76 && pSrc[i] <= 0xff81 ) - { - if( (i+1)<nLen && pSrc[i+1] == 0xff9e ) - { - // katakana ga-dsu - aRes.append((sal_Unicode)((pSrc[i] - 0xff76) * 2 + 0x30ac)); - i+=1; - } - else - // katakana ka-chi - aRes.append((sal_Unicode)((pSrc[i] - 0xff76) * 2 + 0x30ab)); - } - else if( pSrc[i] >= 0xff82 && pSrc[i] <= 0xff84 ) - { - if( (i+1)<nLen && pSrc[i+1] == 0xff9e ) - { - // katakana du-do - aRes.append((sal_Unicode)((pSrc[i] - 0xff82) * 2 + 0x30c5)); - i+=1; - } - else - // katakana tsu-to - aRes.append((sal_Unicode)((pSrc[i] - 0xff82) * 2 + 0x30c4)); - } - else if( pSrc[i] >= 0xff85 && pSrc[i] <= 0xff89 ) - // katakana na-no - aRes.append((sal_Unicode)(pSrc[i] - 0xff85 + 0x30ca)); - else if( pSrc[i] >= 0xff8a && pSrc[i] <= 0xff8e ) - { - if( (i+1)<nLen && pSrc[i+1] == 0xff9e ) - { - // katakana ba-bo - aRes.append((sal_Unicode)((pSrc[i] - 0xff8a) * 3 + 0x30d0)); - i+=1; - } - else if( (i+1)<nLen && pSrc[i+1] == 0xff9f ) - { - // katakana pa-po - aRes.append((sal_Unicode)((pSrc[i] - 0xff8a) * 3 + 0x30d1)); - i+=1; - } - else - // katakana ha-ho - aRes.append((sal_Unicode)((pSrc[i] - 0xff8a) * 3 + 0x30cf)); - } - else if( pSrc[i] >= 0xff8f && pSrc[i] <= 0xff93 ) - // katakana ma-mo - aRes.append((sal_Unicode)(pSrc[i] - 0xff8f + 0x30de)); - else if( pSrc[i] >= 0xff94 && pSrc[i] <= 0xff96 ) - // katakana ya-yo - aRes.append((sal_Unicode)((pSrc[i] - 0xff94) * 2 + 0x30e4)); - else if( pSrc[i] >= 0xff97 && pSrc[i] <= 0xff9b ) - // katakana ra-ro - aRes.append((sal_Unicode)(pSrc[i] - 0xff97 + 0x30e9)); - else - { - switch (pSrc[i]) - { - case 0xff9c: // katakana wa - aRes.append((sal_Unicode)0x30ef); break; - case 0xff9d: // katakana nn - aRes.append((sal_Unicode)0x30f3); break; - case 0xff9e: // HALFWIDTH KATAKANA VOICED SOUND MARK - aRes.append((sal_Unicode)0x309b); break; - case 0xff9f: // HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK - aRes.append((sal_Unicode)0x309c); break; - case 0xff70: // HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK - aRes.append((sal_Unicode)0x30fc); break; - case 0xff61: // HALFWIDTH IDEOGRAPHIC FULL STOP - aRes.append((sal_Unicode)0x3002); break; - case 0xff62: // HALFWIDTH LEFT CORNER BRACKET - aRes.append((sal_Unicode)0x300c); break; - case 0xff63: // HALFWIDTH RIGHT CORNER BRACKET - aRes.append((sal_Unicode)0x300d); break; - case 0xff64: // HALFWIDTH IDEOGRAPHIC COMMA - aRes.append((sal_Unicode)0x3001); break; - case 0xff65: // HALFWIDTH KATAKANA MIDDLE DOT - aRes.append((sal_Unicode)0x30fb); break; - default: - aRes.append( pSrc[i] ); - } - } + aTrans.loadModuleByImplName( ::rtl::OUString::createFromAscii( "HALFWIDTH_FULLWIDTH_LIKE_JIS" ), LANGUAGE_SYSTEM ); + bFirstJISCall = false; } - return aRes.makeStringAndClear(); + return aTrans.transliterate( rStr, 0, rStr.getLength(), NULL ); } diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index e748cbebc4ad..7f11a6ec173d 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -546,8 +546,7 @@ namespace { /** Property names for common font settings. */ const sal_Char *const sppcPropNamesChCommon[] = { - "CharUnderline", "CharStrikeout", "CharEscapement", "CharColor", - "CharContoured", "CharShadowed", 0 + "CharUnderline", "CharStrikeout", "CharColor", "CharContoured", "CharShadowed", 0 }; /** Property names for Western font settings. */ const sal_Char *const sppcPropNamesChWstrn[] = @@ -564,6 +563,12 @@ const sal_Char *const sppcPropNamesChCmplx[] = { "CharFontNameComplex", "CharHeightComplex", "CharPostureComplex", "CharWeightComplex", 0 }; +/** Property names for escapement. */ +const sal_Char *const sppcPropNamesChEscapement[] = +{ + "CharEscapement", "CharEscapementHeight", 0 +}; +const sal_Int8 EXC_API_ESC_HEIGHT = 58; /// Default escapement font height. /** Property names for Western font settings without font name. */ const sal_Char *const *const sppcPropNamesChWstrnNoName = sppcPropNamesChWstrn + 1; @@ -622,6 +627,7 @@ XclFontPropSetHelper::XclFontPropSetHelper() : maHlpChWstrnNoName( sppcPropNamesChWstrnNoName ), maHlpChAsianNoName( sppcPropNamesChAsianNoName ), maHlpChCmplxNoName( sppcPropNamesChCmplxNoName ), + maHlpChEscapement( sppcPropNamesChEscapement ), maHlpControl( sppcPropNamesControl ) { } @@ -635,7 +641,7 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData, { String aApiFontName; float fApiHeight, fApiWeight; - sal_Int16 nApiUnderl = 0, nApiStrikeout = 0, nApiEscapement = 0; + sal_Int16 nApiUnderl = 0, nApiStrikeout = 0; Awt::FontSlant eApiPosture; // read script type dependent properties @@ -646,7 +652,6 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData, maHlpChCommon.ReadFromPropertySet( rPropSet ); maHlpChCommon >> nApiUnderl >> nApiStrikeout - >> nApiEscapement >> rFontData.maColor >> rFontData.mbOutline >> rFontData.mbShadow; @@ -654,6 +659,11 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData, // convert API property values to Excel settings lclSetApiFontSettings( rFontData, aApiFontName, fApiHeight, fApiWeight, eApiPosture, nApiUnderl, nApiStrikeout ); + + // font escapement + sal_Int16 nApiEscapement; + sal_Int8 nApiEscHeight; + maHlpChEscapement >> nApiEscapement >> nApiEscHeight; rFontData.SetApiEscapement( nApiEscapement ); } break; @@ -701,15 +711,22 @@ void XclFontPropSetHelper::WriteFontProperties( const Color& rColor = pFontColor ? *pFontColor : rFontData.maColor; maHlpChCommon << rFontData.GetApiUnderline() << rFontData.GetApiStrikeout() - << rFontData.GetApiEscapement() << rColor << rFontData.mbOutline << rFontData.mbShadow; maHlpChCommon.WriteToPropertySet( rPropSet ); + // write script type dependent properties lclWriteChartFont( rPropSet, maHlpChWstrn, maHlpChWstrnNoName, rFontData, bHasWstrn ); lclWriteChartFont( rPropSet, maHlpChAsian, maHlpChAsianNoName, rFontData, bHasAsian ); lclWriteChartFont( rPropSet, maHlpChCmplx, maHlpChCmplxNoName, rFontData, bHasCmplx ); + + // font escapement + if( rFontData.GetScEscapement() != SVX_ESCAPEMENT_OFF ) + { + maHlpChEscapement << rFontData.GetApiEscapement() << EXC_API_ESC_HEIGHT; + maHlpChEscapement.WriteToPropertySet( rPropSet ); + } } break; diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 6087914c8af9..303da212d262 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -438,6 +438,7 @@ private: ScfPropSetHelper maHlpChWstrnNoName; /// Chart properties for Western script, no font name. ScfPropSetHelper maHlpChAsianNoName; /// Chart properties for Asian script, no font name. ScfPropSetHelper maHlpChCmplxNoName; /// Chart properties for Complex script, no font name. + ScfPropSetHelper maHlpChEscapement; /// Chart properties for font escapement. ScfPropSetHelper maHlpControl; /// Properties for form controls. }; diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 3c21646cc50e..ac6cef7e54ec 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -874,7 +874,16 @@ uno::Reference < XNameContainer > { uno::Reference< XNameAccess > xFamilies(xFamiliesSupp->getStyleFamilies()); - xStyles.set(xFamilies->getByName( sName ), uno::UNO_QUERY); + try + { + xStyles.set(xFamilies->getByName( sName ), uno::UNO_QUERY); + } + catch ( uno::Exception& ) + { + // #i97680# Named table/column/row styles aren't supported, getByName will throw an exception. + // For better interoperability, these styles should then be handled as automatic styles. + // For now, NULL is returned (and the style is ignored). + } switch( nFamily ) { case XML_STYLE_FAMILY_TABLE_TABLE: diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 437c63113253..bf957b889d82 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -118,21 +118,11 @@ void ScZoomSliderControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, Window* ScZoomSliderControl::CreateItemWindow( Window *pParent ) { - SfxViewFrame* pViewFrame = SfxViewFrame::Current(); - ScDocShell* pDocShell = (ScDocShell*)pViewFrame->GetObjectShell(); - SCTAB nTab = ScDocShell::GetCurTab(); - ScDocument* pDoc = pDocShell->GetDocument(); - ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ); - USHORT nCurrentZoom = 0; - if ( pStyleSheet ) - { - SfxItemSet& rStyleSet = pStyleSheet->GetItemSet(); - nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue(); - } + // #i98000# Don't try to get a value via SfxViewFrame::Current here. + // The view's value is always notified via StateChanged later. ScZoomSliderWnd* pSlider = new ScZoomSliderWnd( pParent, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >( m_xFrame->getController(), - ::com::sun::star::uno::UNO_QUERY ), m_xFrame, nCurrentZoom ? nCurrentZoom : 100 ); + ::com::sun::star::uno::UNO_QUERY ), m_xFrame, 100 ); return pSlider; } |