diff options
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/prj/build.lst | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 4 | ||||
-rw-r--r-- | starmath/source/smdetect.cxx | 2 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 28 |
4 files changed, 6 insertions, 30 deletions
diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst index 1f9be53b5b2e..cb6fd9358454 100644 --- a/starmath/prj/build.lst +++ b/starmath/prj/build.lst @@ -1,4 +1,4 @@ -sm starmath : svx NULL +sm starmath : l10n svx NULL sm starmath usr1 - all sm_mkout NULL sm starmath\inc nmake - all sm_inc NULL sm starmath\prj get - all sm_prj NULL diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 7e8e97340919..33fa49bdb4ef 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -815,7 +815,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium ) BOOL bRet = FALSE; if( SfxObjectShell::Load( rMedium )) { - uno::Reference < embed::XStorage > xStorage = pMedium->GetStorage(); + uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage(); uno::Reference < container::XNameAccess > xAccess (xStorage, uno::UNO_QUERY); if ( ( @@ -833,7 +833,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium ) SmXMLImportWrapper aEquation(xModel); ULONG nError = aEquation.Import(rMedium); bRet = 0 == nError; - SetError( nError ); + SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); } } diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index b9c6bc2e913e..66746afea728 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -226,7 +226,7 @@ SmFilterDetect::~SmFilterDetect() // error during storage creation means _here_ that the medium // is broken, but we can not handle it in medium since unpossibility // to create a storage does not _always_ means that the medium is broken - aMedium.SetError( aMedium.GetLastStorageCreationState() ); + aMedium.SetError( aMedium.GetLastStorageCreationState(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); if ( xInteraction.is() ) { OUString empty; diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 0bf2b7ed47dd..ed6e5b6bd23f 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -862,30 +862,6 @@ sal_Int32 SAL_CALL SmModel::getRendererCount( return 1; } - -static Size lcl_GuessPaperSize() -{ - Size aRes; - Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() ); - LocaleDataWrapper aLocWrp( xMgr, AllSettings().GetLocale() ); - if( MEASURE_METRIC == aLocWrp.getMeasurementSystemEnum() ) - { - // in Twip - aRes.Width() = lA4Width; - aRes.Height() = lA4Height; - } - else - { - // in Twip - aRes.Width() = lLetterWidth; - aRes.Height() = lLetterHeight; - } - aRes = OutputDevice::LogicToLogic( aRes, MapMode(MAP_TWIP), - MapMode(MAP_100TH_MM) ); - return aRes; -} - - uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer( sal_Int32 nRenderer, const uno::Any& /*rSelection*/, @@ -909,7 +885,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer( // if paper size is 0 (usually if no 'real' printer is found), // guess the paper size if (aPrtPaperSize.Height() == 0 || aPrtPaperSize.Width() == 0) - aPrtPaperSize = lcl_GuessPaperSize(); + aPrtPaperSize = SvxPaperInfo::GetDefaultPaperSize(MAP_100TH_MM); awt::Size aPageSize( aPrtPaperSize.Width(), aPrtPaperSize.Height() ); uno::Sequence< beans::PropertyValue > aRenderer(1); @@ -978,7 +954,7 @@ void SAL_CALL SmModel::render( // no real printer ?? if (aPrtPaperSize.Height() == 0 || aPrtPaperSize.Width() == 0) { - aPrtPaperSize = lcl_GuessPaperSize(); + aPrtPaperSize = SvxPaperInfo::GetDefaultPaperSize(MAP_100TH_MM); // factors from Windows DIN A4 aOutputSize = Size( (long)(aPrtPaperSize.Width() * 0.941), (long)(aPrtPaperSize.Height() * 0.961)); |