Hi Mikhail,

Thank you, I have made a patch with your suggestion, it works on my DEV300_m29, could you please review it for me?

Thanks and Best Regards,
Felix.


Mikhail Voitenko
Hi Felix,

You can probably start with i54638 if you like.

As the comment from hdu says, the correct digit language should be set during generation of the embedded object replacement image.

The source code that generates the image can be found in sfx2/source/doc/objcont.cxx in the method SfxObjectShell::CreatePreviewMetafile_Impl().

The fix is to provide the correct language to the VirtualDevice that generates the metafile. The digit language settings can be retrieved using SvtCTLOptions class. A good example is the implementation of the function ImpEditEngine::ImplInitLayoutMode() in the file svx/source/editeng/impedit3.cxx

Best regards,
Mikhail.


Index: sfx2/source/doc/objcont.cxx
===================================================================
RCS file: /cvs/framework/sfx2/source/doc/objcont.cxx,v
retrieving revision 1.78
diff -u -p -r1.78 objcont.cxx
--- sfx2/source/doc/objcont.cxx 27 Aug 2008 14:42:36 -0000      1.78
+++ sfx2/source/doc/objcont.cxx 12 Sep 2008 03:46:57 -0000
@@ -49,6 +49,7 @@
 #include <svtools/rectitem.hxx>
 #include <svtools/eitem.hxx>
 #include <svtools/urihelper.hxx>
+#include <svtools/ctloptions.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <svtools/securityoptions.hxx>
@@ -171,6 +172,18 @@ SfxObjectShell::CreatePreviewMetaFile_Im
                 "size of first page is 0, overload GetFirstPageSize or set 
vis-area!" );
 
     pFile->Record( &aDevice );
+
+    LanguageType eLang;
+    SvtCTLOptions*  pCTLOptions = new SvtCTLOptions;
+    if ( SvtCTLOptions::NUMERALS_HINDI == pCTLOptions->GetCTLTextNumerals() )
+        eLang = LANGUAGE_ARABIC;
+    else if ( SvtCTLOptions::NUMERALS_ARABIC == 
pCTLOptions->GetCTLTextNumerals() )
+        eLang = LANGUAGE_ENGLISH;
+    else
+        eLang = (LanguageType) Application::GetSettings().GetLanguage();
+
+    aDevice.SetDigitLanguage( eLang );
+
     ((SfxObjectShell*)this)->DoDraw( &aDevice, Point(0,0), aTmpSize, 
JobSetup(), nAspect );
     pFile->Stop();
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to