[Libreoffice-commits] .: 89 commits - starmath/CppunitTest_starmath_qa_cppunit.mk starmath/source sw/inc sw/JunitTest_sw_complex.mk sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri May 27 12:20:59 PDT 2011


 starmath/CppunitTest_starmath_qa_cppunit.mk     |    2 
 starmath/source/accessibility.cxx               |    1 
 sw/JunitTest_sw_complex.mk                      |    8 -
 sw/inc/swabstdlg.hxx                            |    5 
 sw/source/core/crsr/bookmrk.cxx                 |    2 
 sw/source/core/crsr/findattr.cxx                |   31 +++-
 sw/source/core/doc/doccorr.cxx                  |   16 ++
 sw/source/core/doc/docedt.cxx                   |   13 +
 sw/source/core/doc/docfld.cxx                   |    4 
 sw/source/core/doc/docfmt.cxx                   |   70 +---------
 sw/source/core/docnode/ndnotxt.cxx              |   37 +++++
 sw/source/core/draw/dflyobj.cxx                 |   65 ++++++++-
 sw/source/core/graphic/ndgrf.cxx                |    5 
 sw/source/core/inc/viewimp.hxx                  |   10 +
 sw/source/core/layout/fly.cxx                   |    6 
 sw/source/core/layout/paintfrm.cxx              |  110 ++++++++++++----
 sw/source/core/text/EnhancedPDFExportHelper.cxx |   16 +-
 sw/source/core/text/frmform.cxx                 |   35 ++++-
 sw/source/core/text/widorp.cxx                  |   15 ++
 sw/source/core/txtnode/thints.cxx               |    3 
 sw/source/core/undo/docundo.cxx                 |    1 
 sw/source/core/undo/undobj.cxx                  |    2 
 sw/source/core/unocore/unoframe.cxx             |   22 +++
 sw/source/core/unocore/unoportenum.cxx          |   12 +
 sw/source/core/unocore/unotext.cxx              |   14 --
 sw/source/core/view/vdraw.cxx                   |    5 
 sw/source/filter/html/htmlplug.cxx              |    2 
 sw/source/filter/ww1/fltshell.cxx               |   15 +-
 sw/source/filter/ww8/WW8TableInfo.cxx           |    6 
 sw/source/filter/ww8/WW8TableInfo.hxx           |    2 
 sw/source/filter/ww8/wrtw8nds.cxx               |   28 +++-
 sw/source/filter/ww8/wrtw8num.cxx               |   11 +
 sw/source/filter/ww8/wrtww8.cxx                 |   37 +++++
 sw/source/filter/ww8/wrtww8.hxx                 |    4 
 sw/source/filter/ww8/ww8atr.cxx                 |   30 ++--
 sw/source/filter/ww8/ww8par3.cxx                |   12 +
 sw/source/filter/xml/swxml.cxx                  |   17 +-
 sw/source/filter/xml/xmlbrshi.hxx               |    8 -
 sw/source/filter/xml/xmlimp.cxx                 |   18 +-
 sw/source/filter/xml/xmlimp.hxx                 |   21 ++-
 sw/source/filter/xml/xmlimpit.cxx               |   17 +-
 sw/source/filter/xml/xmlimpit.hxx               |   17 --
 sw/source/filter/xml/xmlitem.cxx                |    5 
 sw/source/filter/xml/xmlitem.hxx                |    2 
 sw/source/filter/xml/xmlitemi.cxx               |  158 +++++++++++++++++++++---
 sw/source/filter/xml/xmlitemm.cxx               |   11 +
 sw/source/filter/xml/xmlmeta.cxx                |   26 ++-
 sw/source/ui/app/docsh2.cxx                     |   64 ++++++---
 sw/source/ui/app/mn.src                         |    2 
 sw/source/ui/dbui/dbmgr.cxx                     |    8 +
 sw/source/ui/dialog/swdlgfact.cxx               |   16 ++
 sw/source/ui/dialog/swdlgfact.hxx               |    4 
 sw/source/ui/dochdl/swdtflvr.cxx                |   24 ---
 sw/source/ui/docvw/AnnotationWin.cxx            |   44 ++++--
 sw/source/ui/docvw/romenu.cxx                   |    4 
 sw/source/ui/fldui/flddb.cxx                    |    2 
 sw/source/ui/inc/mailmrge.hxx                   |    6 
 sw/source/ui/inc/view.hxx                       |    1 
 sw/source/ui/index/idxmrk.src                   |   34 +++++
 sw/source/ui/ribbar/inputwin.cxx                |    1 
 sw/source/ui/shells/grfsh.cxx                   |   16 +-
 sw/source/ui/uiview/view.cxx                    |    6 
 sw/source/ui/vba/vbaapplication.cxx             |    4 
 sw/source/ui/vba/vbaeventshelper.cxx            |   16 +-
 sw/source/ui/vba/vbaeventshelper.hxx            |    2 
 sw/source/ui/vba/vbawindow.cxx                  |    7 -
 sw/source/ui/vba/vbawindow.hxx                  |    8 -
 67 files changed, 890 insertions(+), 336 deletions(-)

New commits:
commit d8e63e2e47ec5f7e699342b564a432d350e8f406
Merge: 8b1f325... 23c4f82...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri May 27 20:50:16 2011 +0200

    Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/writer

diff --cc sw/source/ui/dochdl/swdtflvr.cxx
index 9809f4d,877c695..a74ee5b
mode 100755,100644..100755
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
commit 8b1f32501e3ed122654c45dc3799e10b198422bf
Merge: 2361344... cb119a9...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri May 27 20:48:05 2011 +0200

    Merge remote-tracking branch 'origin/integration/dev300_m106'
    
    Conflicts:
    	starmath/qa/cppunit/makefile.mk
    	sw/source/core/layout/fly.cxx
    	sw/source/core/layout/paintfrm.cxx
    	sw/source/ui/inc/view.hxx
    	sw/source/ui/shells/grfsh.cxx

diff --cc starmath/CppunitTest_starmath_qa_cppunit.mk
index 2d03bbb,0000000..0f4606a
mode 100644,000000..100644
--- a/starmath/CppunitTest_starmath_qa_cppunit.mk
+++ b/starmath/CppunitTest_starmath_qa_cppunit.mk
@@@ -1,113 -1,0 +1,113 @@@
 +# Version: MPL 1.1 / GPLv3+ / LGPLv3+
 +#
 +# The contents of this file are subject to the Mozilla Public License Version
 +# 1.1 (the "License"); you may not use this file except in compliance with
 +# the License or as specified alternatively below. You may obtain a copy of
 +# the License at http://www.mozilla.org/MPL/
 +#
 +# Software distributed under the License is distributed on an "AS IS" basis,
 +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 +# for the specific language governing rights and limitations under the
 +# License.
 +#
 +# The Initial Developer of the Original Code is
 +#       David Tardon, Red Hat Inc. <dtardon at redhat.com>
 +# Portions created by the Initial Developer are Copyright (C) 2010 the
 +# Initial Developer. All Rights Reserved.
 +#
 +# Major Contributor(s):
 +#
 +# For minor contributions see the git repository.
 +#
 +# Alternatively, the contents of this file may be used under the terms of
 +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
 +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
 +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 +# instead of those above.
 +
 +$(eval $(call gb_CppunitTest_CppunitTest,starmath_qa_cppunit))
 +
 +$(eval $(call gb_CppunitTest_set_include,starmath_qa_cppunit,\
 +    $$(INCLUDE) \
 +    -I$(realpath $(SRCDIR)/starmath/inc) \
 +    -I$(realpath $(SRCDIR)/starmath/inc/pch) \
 +    -I$(OUTDIR)/inc \
 +    -I$(OUTDIR)/inc/offuh \
 +))
 +
 +$(eval $(call gb_CppunitTest_set_defs,starmath_qa_cppunit,\
 +    $$(DEFS) \
 +    -DSMDLL \
 +))
 +
 +$(eval $(call gb_CppunitTest_add_library_objects,starmath_qa_cppunit,\
 +    sm \
 +))
 +
 +$(call gb_CxxObject_get_target,starmath/qa/cppunit/test_starmath): $(WORKDIR)/AllLangRes/sm
 +
 +$(eval $(call gb_CppunitTest_add_linked_libs,starmath_qa_cppunit,\
 +    comphelper \
 +    cppu \
 +    cppuhelper \
 +    editeng \
 +    i18nisolang1 \
 +    i18npaper \
 +    sal \
 +    sfx \
 +    sot \
 +    svl \
 +    svt \
 +    svxcore \
 +    svx \
 +    tk \
 +    tl \
 +    utl \
 +    vcl \
 +    xo \
 +    $(gb_STDLIBS) \
 +))
 +
 +$(eval $(call gb_CppunitTest_add_exception_objects,starmath_qa_cppunit,\
 +    starmath/qa/cppunit/test_nodetotextvisitors \
 +    starmath/qa/cppunit/test_starmath \
 +))
 +
 +$(eval $(call gb_CppunitTest_uses_ure,starmath_qa_cppunit))
 +
 +$(eval $(call gb_CppunitTest_add_type_rdbs,starmath_qa_cppunit,\
 +    types \
 +))
 +
 +$(eval $(call gb_CppunitTest_add_service_rdbs,starmath_qa_cppunit,\
 +    starmath_qa_cppunit \
 +))
 +
 +$(eval $(call gb_CppunitTest_set_args,starmath_qa_cppunit,\
 +    --headless \
 +    --invisible \
 +))
 +
 +$(eval $(call gb_RdbTarget_RdbTarget,starmath_qa_cppunit))
 +
 +$(eval $(call gb_RdbTarget_add_components,starmath_qa_cppunit,\
 +    framework/util/fwk \
 +    toolkit/util/tk \
 +    sfx2/util/sfx \
 +))
 +
 +$(eval $(call gb_RdbTarget_add_old_components,starmath_qa_cppunit,\
++    component/vcl/vcl \
 +    configmgr \
 +    i18npool \
 +    mcnttype \
-     vcl \
 +))
 +
 +ifeq ($(strip $(OS)),WNT)
 +$(eval $(call gb_RdbTarget_add_old_components,starmath_qa_cppunit,\
 +    ftransl \
 +    sysdtrans \
 +))
 +endif
 +
 +# vim: set noet sw=4:
diff --cc sw/source/core/docnode/ndnotxt.cxx
index 953f8f5,5c71edf..c5e0824
mode 100644,100755..100755
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
diff --cc sw/source/core/draw/dflyobj.cxx
index c6b4886,cf5982a..302a939
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@@ -456,6 -456,51 +456,51 @@@ SwFrmFmt *SwVirtFlyDrawObj::GetFmt(
  |*
  *************************************************************************/
  
+ // --> OD #i102707#
+ namespace
+ {
+     class RestoreMapMode
+     {
+         public:
+             explicit RestoreMapMode( ViewShell* pViewShell )
+                 : mbMapModeRestored( false )
 -                , mpOutDev( pViewShell->GetOut() )                    
++                , mpOutDev( pViewShell->GetOut() )
+             {
+                 if ( pViewShell->getPrePostMapMode() != mpOutDev->GetMapMode() )
+                 {
+                     mpOutDev->Push(PUSH_MAPMODE);
 -                    
++
+                     GDIMetaFile* pMetaFile = mpOutDev->GetConnectMetaFile();
 -                    if ( pMetaFile && 
++                    if ( pMetaFile &&
+                          pMetaFile->IsRecord() && !pMetaFile->IsPause() )
+                     {
+                         OSL_FAIL( "MapMode restoration during meta file creation is somehow suspect - using <SetRelativeMapMode(..)>, but not sure, if correct." );
+                         mpOutDev->SetRelativeMapMode( pViewShell->getPrePostMapMode() );
+                     }
+                     else
+                     {
+                         mpOutDev->SetMapMode( pViewShell->getPrePostMapMode() );
+                     }
 -                    
++
+                     mbMapModeRestored = true;
+                 }
+             };
+ 
+             ~RestoreMapMode()
+             {
+                 if ( mbMapModeRestored )
+                 {
+                     mpOutDev->Pop();
+                 }
 -            };            
++            };
+ 
+         private:
+             bool mbMapModeRestored;
+             OutputDevice* mpOutDev;
+     };
+ }
+ // <--
+ 
  void SwVirtFlyDrawObj::wrap_DoPaintObject() const
  {
      ViewShell* pShell = pFlyFrm->getRootFrm()->GetCurrShell();
@@@ -481,15 -526,13 +526,13 @@@
                  // it is also necessary to restore the VCL MapMode from ViewInformation since e.g.
                  // the VCL PixelRenderer resets it at the used OutputDevice. Unfortunately, this
                  // excludes shears and rotates which are not expressable in MapMode.
-                 OutputDevice* pOut = pShell->GetOut();
- 
-                 pOut->Push(PUSH_MAPMODE);
-                 pOut->SetMapMode(pShell->getPrePostMapMode());
 -                // OD #i102707# 
 -                // new helper class to restore MapMode - restoration, only if 
++                // OD #i102707#
++                // new helper class to restore MapMode - restoration, only if
+                 // needed and consideration of paint for meta file creation .
+                 RestoreMapMode aRestoreMapModeIfNeeded( pShell );
  
                  // paint the FlyFrame (use standard VCL-Paint)
-                 pFlyFrm->Paint(GetFlyFrm()->Frm());
- 
-                 pOut->Pop();
+                 pFlyFrm->Paint( GetFlyFrm()->Frm() );
              }
          }
      }
diff --cc sw/source/core/graphic/ndgrf.cxx
index afb1b39,2b56126..e130b27
mode 100644,100755..100755
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@@ -1144,7 -1165,10 +1144,10 @@@ void SwGrfNode::ApplyInputStream
  
  void SwGrfNode::UpdateLinkWithInputStream()
  {
-     if ( IsLinkedFile() )
 -    // --> OD #i85105# 
++    // --> OD #i85105#
+     // do not work on link, if a <SwapIn> has been triggered.
+     if ( !bInSwapIn && IsLinkedFile() )
 -    // <--            
++    // <--
      {
          GetLink()->setStreamToLoadFrom( mxInputStream, mbIsStreamReadOnly );
          GetLink()->Update();
diff --cc sw/source/core/layout/fly.cxx
index e001eca,4b238ff..e0a6830
mode 100644,100755..100755
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@@ -835,10 -847,11 +835,10 @@@ void SwFlyFrm::Modify( const SfxPoolIte
              // update sorted object lists, the Writer fly frame is registered at.
              UpdateObjInSortedList();
          }
-     }
 -        // <--
 -        // --> OD #i87645# - reset flags for the layout process (only if something has been invalidated)
 +
-     // #i51474# - reset flags for the layout process
-     ResetLayoutProcessBools();
++        // #i87645# - reset flags for the layout process (only if something has been invalidated)
+         ResetLayoutProcessBools();
 -        // <--
+     }
  }
  
  void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
diff --cc sw/source/core/layout/paintfrm.cxx
index 6f2b8ff,0353b02..f3f6f0a
mode 100644,100755..100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@@ -2722,6 -2740,46 +2729,46 @@@ void SwTabFrmPainter::Insert( SwLineEnt
  // FUNCTIONS USED FOR COLLAPSING TABLE BORDER LINES END
  //
  
+ // --> OD #i76669#
+ namespace
+ {
+     class SwViewObjectContactRedirector : public ::sdr::contact::ViewObjectContactRedirector
+     {
+         private:
+             const ViewShell& mrViewShell;
+ 
+         public:
+             SwViewObjectContactRedirector( const ViewShell& rSh )
+                 : mrViewShell( rSh )
+             {};
+ 
+             virtual ~SwViewObjectContactRedirector()
+             {}
+ 
+             virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+                                     const sdr::contact::ViewObjectContact& rOriginal,
+                                     const sdr::contact::DisplayInfo& rDisplayInfo)
+             {
+                 sal_Bool bPaint( sal_True );
+ 
+                 SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject();
+                 if ( pObj )
+                 {
+                     bPaint = SwFlyFrm::IsPaint( pObj, &mrViewShell );
+                 }
+ 
+                 if ( !bPaint )
+                 {
+                     return drawinglayer::primitive2d::Primitive2DSequence();
+                 }
+ 
+                 return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+                                                         rOriginal, rDisplayInfo );
+             }
+     };
 -    
 -} // end of anonymous namespace            
++
++} // end of anonymous namespace
+ // <--
  /*************************************************************************
  |*
  |*	SwRootFrm::Paint()
@@@ -2831,8 -2890,10 +2878,9 @@@ SwRootFrm::Paint(SwRect const& rRect, S
      // #i68597#
      const bool bGridPainting(pSh->GetWin() && pSh->Imp()->HasDrawView() && pSh->Imp()->GetDrawView()->IsGridVisible());
  
-     // #i84659#
- //    while ( pPage && !::IsShortCut( aRect, pPage->Frm() ) )
 -    // --> OD #i76669#
++    // #i76669#
+     SwViewObjectContactRedirector aSwRedirector( *pSh );
 -    // <--
+ 
      while ( pPage )
      {
          // Paint right shadow in single page mode, or if we're on last page of
@@@ -2921,11 -2983,13 +2968,13 @@@
                  if ( pSh->Imp()->HasDrawView() )
                  {
                      pLines->LockLines( sal_True );
-                     // OD 29.08.2002 #102450# - add 3rd parameter
-                     // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
                      const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
-                     pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), pPrintData, aPaintRect,
-                                             &aPageBackgrdColor, (pPage->IsRightToLeft() ? true : false) );
 -                    pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), 
 -                                            pPrintData, 
++                    pSh->Imp()->PaintLayer( pIDDMA->GetHellId(),
++                                            pPrintData,
+                                             aPaintRect,
 -                                            &aPageBackgrdColor, 
++                                            &aPageBackgrdColor,
+                                             (pPage->IsRightToLeft() ? true : false),
+                                             &aSwRedirector );
                      pLines->PaintLines( pSh->GetOut() );
                      pLines->LockLines( sal_False );
                  }
@@@ -2957,9 -3018,12 +3003,12 @@@
                  {
                      /// OD 29.08.2002 #102450# - add 3rd parameter
                      // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
-                     pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), pPrintData, aPaintRect,
 -                    pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), 
 -                                            pPrintData, 
++                    pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(),
++                                            pPrintData,
+                                             aPaintRect,
                                              &aPageBackgrdColor,
-                                             (pPage->IsRightToLeft() ? true : false) );
+                                             (pPage->IsRightToLeft() ? true : false),
+                                             &aSwRedirector );
                  }
  
                  if ( bExtraData )
diff --cc sw/source/core/text/frmform.cxx
index f1ce33f,0898eac..ba6e3e8
mode 100644,100755..100755
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@@ -1112,7 -1130,15 +1127,15 @@@ void SwTxtFrm::FormatAdjust( SwTxtForma
  
      const SwTwips nDocPrtTop = Frm().Top() + Prt().Top();
      const SwTwips nOldHeight = Prt().SSize().Height();
-     const SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight;
+     SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight;
 -    // --> OD #i84870# - no shrink of text frame, if it only contains one 
++    // --> OD #i84870# - no shrink of text frame, if it only contains one
+     // as-character anchored object.
+     if ( nChg < 0 &&
+          bOnlyContainsAsCharAnchoredObj )
+     {
+         nChg = 0;
+     }
+     // <--
  
      // Vertical Formatting:
      // The (rotated) repaint rectangle's x coordinate referes to the frame.
diff --cc sw/source/core/text/widorp.cxx
index dcb6ff9,b2e9dd9..606d0fe
mode 100644,100755..100755
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@@ -153,7 -153,20 +153,20 @@@ sal_Bool SwTxtFrmBreak::IsInside( SwTxt
          // Wenn sich alles innerhalb des bestehenden Frames abspielt,
          // ist das Ergebnis sal_True;
          bFit = nHeight >= nLineHeight;
 -        
++
+         // --> OD #i103292#
+         if ( !bFit )
+         {
+             if ( rLine.GetNext() &&
+                  pFrm->IsInTab() && !pFrm->GetFollow() && !pFrm->GetIndNext() )
+             {
+                 // add additional space taken as lower space as last content in a table
+                 // for all text lines except the last one.
+                 nHeight += pFrm->CalcAddLowerSpaceAsLastInTableCell();
+                 bFit = nHeight >= nLineHeight;
+             }
+         }
+         // <--
          if( !bFit )
          {
              // Die LineHeight sprengt die aktuelle Frm-Hoehe.
diff --cc sw/source/core/unocore/unoframe.cxx
index 9392abe,9d749c8..7bacd45
mode 100644,100755..100755
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
diff --cc sw/source/filter/ww8/WW8TableInfo.cxx
index df3c8c7,0f3c0d0..8455c79
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@@ -252,6 -252,9 +252,9 @@@ WidthsPtr WW8TableNodeInfoInner::getWid
          pWidths = WidthsPtr(new Widths);
          // number of cell written
          sal_uInt32 nBoxes = rTabBoxes.Count();
+         if ( nBoxes > MAXTABLECELLS )
+             nBoxes = MAXTABLECELLS;
 -        
++
          for (sal_uInt32 n = 0; n < nBoxes; n++)
          {
              const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt();
@@@ -280,6 -283,9 +283,9 @@@ RowSpansPtr WW8TableNodeInfoInner::getR
          const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
  
          sal_uInt32 nBoxes = rTabBoxes.Count();
+         if (nBoxes > MAXTABLECELLS)
+             nBoxes = MAXTABLECELLS;
 -        
++
          for (sal_uInt32 n = 0; n < nBoxes; ++n)
          {
              pResult->push_back(rTabBoxes[n]->getRowSpan());
diff --cc sw/source/filter/ww8/wrtw8num.cxx
index dcb9090,1e92bc1..eea0cb2
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@@ -220,8 -222,15 +220,15 @@@ void WW8AttributeOutput::NumberingLevel
      sal_uInt8 nAlign;
      switch ( eAdjust )
      {
-         case SVX_ADJUST_CENTER: nAlign = 1; break;
-         default:                nAlign = 0; break;
 -    case SVX_ADJUST_CENTER: 
 -        nAlign = 1; 
++    case SVX_ADJUST_CENTER:
++        nAlign = 1;
+         break;
 -    case SVX_ADJUST_RIGHT: 
 -        nAlign = 2; 
++    case SVX_ADJUST_RIGHT:
++        nAlign = 2;
+         break;
+     default:
 -        nAlign = 0; 
++        nAlign = 0;
+         break;
      }
      *m_rWW8Export.pTableStrm << nAlign;
      
diff --cc sw/source/filter/ww8/wrtww8.cxx
index 1dea8ba,dcf59e5..a49ac5f
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@@ -3322,7 -3326,7 +3324,7 @@@ sal_uLong SwWW8Writer::Write( SwPaM& rP
  
  MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam )
      : aMainStg(sMainStream), pISet(0), pUsedNumTbl(0), mpTopNodeOfHdFtPage(0),
-     pBmpPal(0), pKeyMap(0), pOLEExp(0), pOCXExp(0), pOleMap(0), 
 -    pBmpPal(0), pOLEExp(0), pOCXExp(0), pOleMap(0), 
++    pBmpPal(0), pOLEExp(0), pOCXExp(0), pOleMap(0),
      mpTableInfo(new ww8::WW8TableInfo()), nUniqueList(0),
      mnHdFtIndex(0), pAktPageDesc(0), pPapPlc(0), pChpPlc(0), pChpIter(0),
      pStyles( NULL ),
diff --cc sw/source/filter/ww8/ww8atr.cxx
index dcb704a,3f66dcd..8d7ec8f
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@@ -438,10 -438,19 +438,19 @@@ void MSWordExportBase::OutputSectionBre
      //section.
      bool bBreakSet = false;
  
+     const SwPageDesc * pPageDesc = rNd.FindPageDesc(sal_False);
 -    
++
+     if (pAktPageDesc != pPageDesc)
+     {
+         bBreakSet = true;
+         bNewPageDesc = true;
+         pAktPageDesc = pPageDesc;
+     }
+ 
      if ( pSet && pSet->Count() )
      {
-         if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem )
-              && ( (SwFmtPageDesc*)pItem )->KnowsPageDesc() )
 -        if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) && 
++        if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) &&
+              dynamic_cast<const SwFmtPageDesc*>(pItem)->GetRegisteredIn() != NULL)
          {
              bBreakSet = true;
              bNewPageDesc = true;
diff --cc sw/source/filter/xml/xmlimp.cxx
index 31b97f8,5faedfb..c60c875
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@@ -413,18 -422,13 +419,12 @@@ SvXMLImportContext *SwXMLImport::Create
              mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                  "com.sun.star.xml.dom.SAXDocumentBuilder"))),
                  uno::UNO_QUERY_THROW);
-         uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
-             GetModel(), UNO_QUERY_THROW);
+         uno::Reference<document::XDocumentProperties> const xDocProps(
+             GetDocumentProperties());
          // flat OpenDocument file format
          pContext = new SwXMLOfficeDocContext_Impl( *this, nPrefix, rLocalName,
-                         xAttrList, xDPS->getDocumentProperties(), xDocBuilder);
-     }
-     else if ( XML_NAMESPACE_OFFICE==nPrefix &&
-               IsXMLToken( rLocalName, XML_DOCUMENT_STYLES ) )
-     {
-         pContext = new SwXMLDocStylesContext_Impl( *this, nPrefix, rLocalName,
-                                                    xAttrList );
+                         xAttrList, xDocProps, xDocBuilder);
      }
 -    // <--
      else
          pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
  
diff --cc sw/source/ui/app/docsh2.cxx
index fa6dfa1,6474a70..b3009a1
mode 100644,100755..100755
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@@ -1706,10 -1709,40 +1709,40 @@@ sal_uLong SwDocShell::LoadStylesFromFil
          SfxFilterMatcher aWebMatcher( sWebFactory );
          aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
      }
-     if( aMed.IsStorage() )
+     // --> OD #i117339# - trigger import only for own formats
+ //    if( aMed.IsStorage() )
+     bool bImport( false );
+     {
+         if ( aMed.IsStorage() )
+         {
 -            // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat() 
 -            // does not work correct (e.g., MS Word 2007 XML Template), 
++            // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat()
++            // does not work correct (e.g., MS Word 2007 XML Template),
+             // use workaround provided by MAV.
+             uno::Reference< embed::XStorage > xStorage = aMed.GetStorage();
+             if ( xStorage.is() )
+             {
 -                // use <try-catch> on retrieving <MediaType> in order to check, 
++                // use <try-catch> on retrieving <MediaType> in order to check,
+                 // if the storage is one of our own ones.
+                 try
 -                {        
++                {
+                     uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW );
+                     const ::rtl::OUString aMediaTypePropName( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
+                     xProps->getPropertyValue( aMediaTypePropName );
+                     bImport = true;
+                 }
+                 catch( const uno::Exception& )
+                 {
+                     bImport = false;
+                 }
 -            }    
++            }
+         }
+     }
+     if ( bImport )
 -    // <--    
++    // <--
      {
-         OSL_ENSURE((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
-         pRead =  ReadXML;
+         SwRead pRead =  ReadXML;
+         SwReader* pReader = 0;
+         SwPaM* pPam = 0;
          // the SW3IO - Reader need the pam/wrtshell, because only then he
          // insert the styles!
          if( bUnoCall )
@@@ -1719,16 -1752,10 +1752,10 @@@
              pReader = new SwReader( aMed, rURL, *pPam );
          }
          else
 -        {        
++        {
              pReader = new SwReader( aMed, rURL, *pWrtShell->GetCrsr() );
-     }
-     else if( pFlt )
-     {
-         pReader = new SwReader( aMed, rURL, pDoc );
-     }
+         }
  
-     OSL_ENSURE( pRead, "no reader found" );
-     if( pRead )
-     {
          pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() );
          pRead->GetReaderOpt().SetFrmFmts( rOpt.IsFrmFmts() );
          pRead->GetReaderOpt().SetPageDescs( rOpt.IsPageDescs() );
@@@ -1746,9 -1773,10 +1773,10 @@@
              nErr = pReader->Read( *pRead );
              pWrtShell->EndAllAction();
          }
+         delete pPam;
+         delete pReader;
      }
-     delete pPam;
-     delete pReader;
 -    
++
      return nErr;
  }
  
diff --cc sw/source/ui/dochdl/swdtflvr.cxx
index 6d9434f,b1d2699..9809f4d
mode 100644,100755..100755
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
diff --cc sw/source/ui/docvw/romenu.cxx
index 3be790a,a59fa39..15c0228
mode 100644,100755..100755
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
diff --cc sw/source/ui/inc/mailmrge.hxx
index b566ecf,15f8a35..b018a79
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@@ -147,6 -147,12 +147,12 @@@ public
      ~SwMailMergeDlg();
  
      inline sal_uInt16	GetMergeType() { return nMergeType; }
 -    
++
+     bool IsSaveIndividualDocs() const { return aSaveIndividualRB.IsChecked(); }
+     bool IsGenerateFromDataBase() const { return aGenerateFromDataBaseCB.IsChecked(); }
+     String GetColumnName() const { return aColumnLB.GetSelectEntry();}
+     String GetPath() const { return aPathED.GetText();}
+ 
      const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;} 
      inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
      ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
diff --cc sw/source/ui/inc/view.hxx
index 75105bd,22baefb..07efed3
mode 100644,100755..100755
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@@ -282,11 -285,12 +282,12 @@@ class SW_DLLPUBLIC SwView: public SfxVi
                      bInMailMerge : 1,
                      bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
                      bOldShellWasPagePreView : 1,
+                     bIsPreviewDoubleClick : 1, // #i114045#
 -                    bMakeSelectionVisible : 1 // #b6330459# transport the bookmark selection
 +                    bMakeSelectionVisible : 1 // transport the bookmark selection
                      ;
  
 -    // Methoden fuers Suchen
 -    // Suchkontext setzen
 +    // methods for searching
 +    // set search context
      SW_DLLPRIVATE sal_Bool   			SearchAndWrap(sal_Bool bApi = sal_False);
      SW_DLLPRIVATE sal_Bool 			SearchAll(sal_uInt16* pFound = 0);
      SW_DLLPRIVATE sal_uLong			FUNC_Search( const SwSearchOptions& rOptions );
diff --cc sw/source/ui/shells/grfsh.cxx
index 53f7890,73c3805..30c7fe0
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@@ -620,12 -625,12 +623,12 @@@ void SwGrfShell::GetAttrState(SfxItemSe
          case SID_ATTR_GRAF_TRANSPARENCE:
              if( !bParentCntProt )
              {
 -                // --> OD 2005-02-09 #119353# - robust
 +                // #119353# - robust
-                 const GraphicObject* pGrfObj = rSh.GetGraphicObj();
-                 if ( pGrfObj )
+                 const GraphicObject* pGrafObj = rSh.GetGraphicObj();
+                 if ( pGrafObj )
                  {
-                     if( pGrfObj->IsAnimated() ||
-                         GRAPHIC_GDIMETAFILE == pGrfObj->GetType() )
+                     if( pGrafObj->IsAnimated() ||
+                         GRAPHIC_GDIMETAFILE == pGrafObj->GetType() )
                          bDisable = sal_True;
                      else
                          rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
commit cb119a9420d68c5ae9b61dd854339b9d8de1ef9f
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Tue May 24 01:39:42 2011 +0200

    Post-merge fix

diff --git a/starmath/qa/cppunit/makefile.mk b/starmath/qa/cppunit/makefile.mk
index a61a13e..e1fc8e2 100644
--- a/starmath/qa/cppunit/makefile.mk
+++ b/starmath/qa/cppunit/makefile.mk
@@ -96,8 +96,8 @@ test_components = \
     component/framework/util/fwk \
     component/toolkit/util/tk \
     component/sfx2/util/sfx \
+    component/vcl/vcl.$(GUIBASE) \
     configmgr \
-    vcl \
     mcnttype \
     i18npool
 .IF "$(OS)" == "WNT"
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index c8a3e61..5c71edf 100755
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -158,8 +158,8 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
                     }
                 }
             }
-            OSL_ASSERT( !bPixelGrf || aGrfMap == aContourMap,
-                    "scale factor for pixel unsupported" );
+            OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap,
+                        "scale factor for pixel unsupported" );
             OutputDevice* pOutDev =
                 (bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
                                              : 0;
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index e21caf0..cf5982a 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -474,8 +474,7 @@ namespace
                     if ( pMetaFile && 
                          pMetaFile->IsRecord() && !pMetaFile->IsPause() )
                     {
-                        ASSERT( false,
-                                "MapMode restoration during meta file creation is somehow suspect - using <SetRelativeMapMode(..)>, but not sure, if correct." )
+                        OSL_FAIL( "MapMode restoration during meta file creation is somehow suspect - using <SetRelativeMapMode(..)>, but not sure, if correct." );
                         mpOutDev->SetRelativeMapMode( pViewShell->getPrePostMapMode() );
                     }
                     else
commit 8f6b8858024a0395d685afff15d8657981593a14
Merge: 323476b... d9c342f...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Apr 22 15:10:19 2011 +0200

    Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
    
    Conflicts:
    	sw/source/core/docnode/ndnotxt.cxx
    	sw/source/core/inc/viewimp.hxx
    	sw/source/core/layout/fly.cxx
    	sw/source/core/layout/paintfrm.cxx
    	sw/source/filter/ww8/WW8TableInfo.cxx
    	sw/source/filter/ww8/wrtw8nds.cxx
    	sw/source/filter/ww8/wrtww8.cxx
    	sw/source/filter/ww8/wrtww8.hxx
    	sw/source/filter/ww8/ww8atr.cxx
    	sw/source/filter/xml/xmlitemi.cxx
    	sw/source/filter/xml/xmlmeta.cxx
    	sw/source/ui/app/docsh2.cxx
    	sw/source/ui/dialog/swdlgfact.cxx
    	sw/source/ui/shells/grfsh.cxx

diff --cc sw/JunitTest_sw_complex.mk
index 84356e4,bbd05ff..0d59a56
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@@ -61,11 -61,14 +61,15 @@@ $(eval $(call gb_JunitTest_add_classes,
      complex.writer.CheckFlies \
      complex.writer.CheckIndexedPropertyValues \
      complex.writer.CheckNamedPropertyValues \
 -    complex.writer.TextPortionEnumerationTest \
  ))
 +# fd#35657 test disabled - reenable if fixed
 +#    complex.writer.TextPortionEnumerationTest \
  
- # currently fails (should run again in os146) (except on windows)
- #	complex.writer.CheckBookmarks \
+ # CheckBookmarks currently fails on windows because the hashes are different
+ ifneq ($(OS),WNT)
+ $(eval $(call gb_JunitTest_add_classes,sw_complex,\
+     complex.writer.CheckBookmarks \
+ ))
+ endif
  
  # vim: set noet sw=4 ts=4:
diff --cc sw/source/core/docnode/ndnotxt.cxx
index 7f8e107,79b9c54..c8a3e61
mode 100644,100755..100755
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@@ -135,7 -136,31 +135,30 @@@ const PolyPolygon *SwNoTxtNode::HasCont
          const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM );
          if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
          {
-             OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap,
 -            // --> OD #i102238#
++            // #i102238#
+             double nGrfDPIx = 0.0;
+             double nGrfDPIy = 0.0;
+             {
+                 if ( !bPixelGrf && bPixelContour )
+                 {
+                     const Size aGrfPixelSize( GetGraphic().GetSizePixel() );
+                     const Size aGrfPrefMapModeSize( GetGraphic().GetPrefSize() );
+                     if ( aGrfMap.GetMapUnit() == MAP_INCH )
+                     {
+                         nGrfDPIx = aGrfPixelSize.Width() / ( (double)aGrfMap.GetScaleX() * aGrfPrefMapModeSize.Width() );
+                         nGrfDPIy = aGrfPixelSize.Height() / ( (double)aGrfMap.GetScaleY() * aGrfPrefMapModeSize.Height() );
+                     }
+                     else
+                     {
+                         const Size aGrf1000thInchSize =
+                             OutputDevice::LogicToLogic( aGrfPrefMapModeSize,
+                                                         aGrfMap, MAP_1000TH_INCH );
+                         nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width();
+                         nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height();
 -                    }    
++                    }
+                 }
+             }
 -            // <--        
 -            ASSERT( !bPixelGrf || aGrfMap == aContourMap,
++            OSL_ASSERT( !bPixelGrf || aGrfMap == aContourMap,
                      "scale factor for pixel unsupported" );
              OutputDevice* pOutDev =
                  (bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
@@@ -152,7 -177,16 +175,15 @@@
                          rPoly[i] = pOutDev->LogicToPixel( rPoly[i],
                                                            aContourMap );
                      else if( bPixelContour )
 -                    {        
++                    {
                          rPoly[i] = pOutDev->PixelToLogic( rPoly[i], aGrfMap );
 -                        // --> OD #i102238#
++                        // #i102238#
+                         if ( nGrfDPIx != 0 && nGrfDPIy != 0 )
+                         {
+                             rPoly[i] = Point( rPoly[i].X() * pOutDev->ImplGetDPIX() / nGrfDPIx,
+                                               rPoly[i].Y() * pOutDev->ImplGetDPIY() / nGrfDPIy );
+                         }
 -                        // <--
+                     }
                      else
                          rPoly[i] = OutputDevice::LogicToLogic( rPoly[i],
                                                                   aContourMap,
diff --cc sw/source/core/draw/dflyobj.cxx
index c6b4886,b937d3d..e21caf0
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@@ -454,8 -468,57 +454,54 @@@ SwFrmFmt *SwVirtFlyDrawObj::GetFmt(
  |*
  |*	SwVirtFlyDrawObj::Paint()
  |*
 -|*	Ersterstellung		MA 20. Dec. 94
 -|*	Letzte Aenderung	MA 18. Dec. 95
 -|*
  *************************************************************************/
  
+ // --> OD #i102707#
+ namespace
+ {
+     class RestoreMapMode
+     {
+         public:
+             explicit RestoreMapMode( ViewShell* pViewShell )
+                 : mbMapModeRestored( false )
+                 , mpOutDev( pViewShell->GetOut() )                    
+             {
+                 if ( pViewShell->getPrePostMapMode() != mpOutDev->GetMapMode() )
+                 {
+                     mpOutDev->Push(PUSH_MAPMODE);
+                     
+                     GDIMetaFile* pMetaFile = mpOutDev->GetConnectMetaFile();
+                     if ( pMetaFile && 
+                          pMetaFile->IsRecord() && !pMetaFile->IsPause() )
+                     {
+                         ASSERT( false,
+                                 "MapMode restoration during meta file creation is somehow suspect - using <SetRelativeMapMode(..)>, but not sure, if correct." )
+                         mpOutDev->SetRelativeMapMode( pViewShell->getPrePostMapMode() );
+                     }
+                     else
+                     {
+                         mpOutDev->SetMapMode( pViewShell->getPrePostMapMode() );
+                     }
+                     
+                     mbMapModeRestored = true;
+                 }
+             };
+ 
+             ~RestoreMapMode()
+             {
+                 if ( mbMapModeRestored )
+                 {
+                     mpOutDev->Pop();
+                 }
+             };            
+ 
+         private:
+             bool mbMapModeRestored;
+             OutputDevice* mpOutDev;
+     };
+ }
+ // <--
+ 
  void SwVirtFlyDrawObj::wrap_DoPaintObject() const
  {
      ViewShell* pShell = pFlyFrm->getRootFrm()->GetCurrShell();
diff --cc sw/source/core/graphic/ndgrf.cxx
index 6bcbec2,de3fe2a..2b56126
mode 100644,100755..100755
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
diff --cc sw/source/core/inc/viewimp.hxx
index af6f8dd,1a2de65..d883514
mode 100644,100755..100755
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@@ -205,8 -219,8 +210,8 @@@ public
      // direction of the page in order to set the default horizontal text
      // direction at the outliner of the draw view for painting layers <hell>
      // and <heaven>.
 -    // OD 25.06.2003 #108784# - correct type of 1st parameter
 -    // OD #i76669# - added parameter <pRedirector>
 +
-     // correct type of 1st parameter
++    // #i76669# - added parameter <pRedirector>
      void   PaintLayer( const SdrLayerID _nLayerID,
                         SwPrintData const*const pPrintData,
                         const SwRect& _rRect,
diff --cc sw/source/core/layout/fly.cxx
index 47cb131,070ef61..4b238ff
mode 100644,100755..100755
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
diff --cc sw/source/core/layout/paintfrm.cxx
index f1b175b,2e03bba..0353b02
mode 100644,100755..100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@@ -2733,6 -2703,47 +2740,46 @@@ void SwTabFrmPainter::Insert( SwLineEnt
  // FUNCTIONS USED FOR COLLAPSING TABLE BORDER LINES END
  //
  
+ // --> OD #i76669#
+ namespace
+ {
+     class SwViewObjectContactRedirector : public ::sdr::contact::ViewObjectContactRedirector
+     {
+         private:
+             const ViewShell& mrViewShell;
+ 
+         public:
+             SwViewObjectContactRedirector( const ViewShell& rSh )
+                 : mrViewShell( rSh )
+             {};
+ 
+             virtual ~SwViewObjectContactRedirector()
+             {}
+ 
+             virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+                                     const sdr::contact::ViewObjectContact& rOriginal,
+                                     const sdr::contact::DisplayInfo& rDisplayInfo)
+             {
+                 sal_Bool bPaint( sal_True );
+ 
+                 SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject();
+                 if ( pObj )
+                 {
+                     bPaint = SwFlyFrm::IsPaint( pObj, &mrViewShell );
+                 }
+ 
+                 if ( !bPaint )
+                 {
+                     return drawinglayer::primitive2d::Primitive2DSequence();
+                 }
+ 
+                 return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+                                                         rOriginal, rDisplayInfo );
+             }
+     };
+     
+ } // end of anonymous namespace            
+ // <--
 -
  /*************************************************************************
  |*
  |*	SwRootFrm::Paint()
@@@ -2750,7 -2764,7 +2797,7 @@@
  void
  SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
  {
-         OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
 -    ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
++    OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
  
      PROTOCOL( this, PROT_FILE_INIT, 0, 0)
  
@@@ -2843,21 -2857,13 +2890,22 @@@
      // #i68597#
      const bool bGridPainting(pSh->GetWin() && pSh->Imp()->HasDrawView() && pSh->Imp()->GetDrawView()->IsGridVisible());
  
-     // --> OD 2008-05-16 #i84659#
- //    while ( pPage && !::IsShortCut( aRect, pPage->Frm() ) )
-     while ( pPage )
+     // --> OD #i76669#
+     SwViewObjectContactRedirector aSwRedirector( *pSh );
      // <--
+ 
+     while ( pPage )
      {
 -        const bool bPaintRightShadow =  !bBookMode || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage());
 +        // Paint right shadow in single page mode, or if we're on last page of
 +        // the doc, or if ???Lower()??? or if we're on a page with no right
 +        // sibling (OnRightPage should be renamed as OnEvenPage since it does
 +        // not take reading direction into account)
 +        const bool bPaintRightShadow =  !bBookMode || (!pPage->GetNext()) || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage());
 +        // Have a full bottom shadow on side by side pages.
 +        // TODO Do not draw full shadow if our sibling hasn't the
 +        // same orientation
 +        const bool bFullBottomShadow = bBookMode && pPage->GetPrev() &&
 +            ((!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage()));
          const bool bRightSidebar = pPage->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT;
  
          if ( !pPage->IsEmptyPage() )
@@@ -2961,9 -2971,7 +3008,7 @@@
                  if( pSh->GetWin() && pSh->GetDoc()->GetDocShell() &&
                      !pSh->GetDoc()->GetDocShell()->IsInPlaceActive() )
                  {
-                     // OD 12.02.2003 #i9719#, #105645# - use new method
-                     // <SwPageFrm::PaintBorderAndShadow(..)>.
 -                    SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintRightShadow, bRightSidebar );
 +                    SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintRightShadow, bFullBottomShadow, bRightSidebar );
                      SwPageFrm::PaintNotesSidebar( pPage->Frm(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
                  }
  
diff --cc sw/source/core/text/frmform.cxx
index 80c8c76,f5b5a8a..0898eac
mode 100644,100755..100755
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
diff --cc sw/source/core/text/widorp.cxx
index 3ec65d1,f7aabf7..b2e9dd9
mode 100644,100755..100755
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
diff --cc sw/source/core/unocore/unoframe.cxx
index 89bdae4,61c154c..9d749c8
mode 100644,100755..100755
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
diff --cc sw/source/core/view/vdraw.cxx
index 425bba4,28efd39..4814d98
mode 100644,100755..100755
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@@ -150,11 -233,12 +151,11 @@@ void SwViewImp::PaintLayer( const SdrLa
              SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
              rSdrView.setHideDraw( !pPrintData->IsPrintDraw() );
          }
-         GetPageView()->DrawLayer(_nLayerID, pOutDev);
+         GetPageView()->DrawLayer( _nLayerID, pOutDev, pRedirector );
          pOutDev->Pop();
  
 -        // OD 29.08.2002 #102450#
          // reset background color of the outliner
 -        // OD 09.12.2002 #103045# - reset default horizontal text direction
 +        // reset default horizontal text direction
          if ( (_nLayerID == pIDDMA->GetHellId()) ||
               (_nLayerID == pIDDMA->GetHeavenId()) )
          {
diff --cc sw/source/filter/ww8/WW8TableInfo.hxx
index 2ba703a,0afa097..3979db3
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@@ -49,8 -46,10 +49,10 @@@ namespace ww
  {
  using namespace ::std;
  
+ const unsigned int MAXTABLECELLS = 63;
+ 
  class WW8TableNodeInfo;
 -typedef boost::shared_ptr<SwRect> SwRectPtr; 
 +typedef boost::shared_ptr<SwRect> SwRectPtr;
  typedef ::std::vector<const SwTableBox *> TableBoxVector;
  typedef boost::shared_ptr<TableBoxVector> TableBoxVectorPtr;
  typedef ::std::vector<sal_uInt32> GridCols;
diff --cc sw/source/filter/ww8/wrtw8nds.cxx
index 833e12f,2699cae..f762b37
mode 100644,100755..100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
diff --cc sw/source/filter/ww8/wrtww8.cxx
index 3f950ff,3f315b3..dcf59e5
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@@ -3831,4 -3884,35 +3831,35 @@@ void MSWordExportBase::OutputEndNode( c
  #endif
  }
  
+ const NfKeywordTable & MSWordExportBase::GetNfKeywordTable()
+ {
+     if (pKeyMap.get() == NULL)
+     {
+         pKeyMap.reset(new NfKeywordTable);
+         NfKeywordTable & rKeywordTable = *pKeyMap;
+         rKeywordTable[NF_KEY_D] = ::rtl::OUString::createFromAscii("d");
+         rKeywordTable[NF_KEY_DD] = ::rtl::OUString::createFromAscii("dd");
+         rKeywordTable[NF_KEY_DDD] = ::rtl::OUString::createFromAscii("ddd");
+         rKeywordTable[NF_KEY_DDDD] = ::rtl::OUString::createFromAscii("dddd");
+         rKeywordTable[NF_KEY_M] = ::rtl::OUString::createFromAscii("M");
+         rKeywordTable[NF_KEY_MM] = ::rtl::OUString::createFromAscii("MM");
+         rKeywordTable[NF_KEY_MMM] = ::rtl::OUString::createFromAscii("MMM");
+         rKeywordTable[NF_KEY_MMMM] = ::rtl::OUString::createFromAscii("MMMM");
+         rKeywordTable[NF_KEY_NN] = ::rtl::OUString::createFromAscii("ddd");
+         rKeywordTable[NF_KEY_NNN] = ::rtl::OUString::createFromAscii("dddd");
+         rKeywordTable[NF_KEY_NNNN] = ::rtl::OUString::createFromAscii("dddd");
+         rKeywordTable[NF_KEY_YY] = ::rtl::OUString::createFromAscii("yy");
+         rKeywordTable[NF_KEY_YYYY] = ::rtl::OUString::createFromAscii("yyyy");
+         rKeywordTable[NF_KEY_H] = ::rtl::OUString::createFromAscii("H");
+         rKeywordTable[NF_KEY_HH] = ::rtl::OUString::createFromAscii("HH");
+         rKeywordTable[NF_KEY_MI] = ::rtl::OUString::createFromAscii("m");
+         rKeywordTable[NF_KEY_MMI] = ::rtl::OUString::createFromAscii("mm");
+         rKeywordTable[NF_KEY_S] = ::rtl::OUString::createFromAscii("s");
+         rKeywordTable[NF_KEY_SS] = ::rtl::OUString::createFromAscii("ss");
+         rKeywordTable[NF_KEY_AMPM] = ::rtl::OUString::createFromAscii("AM/PM");
+     }
+ 
+     return *pKeyMap;
+ }
+ 
 -/* vi:set tabstop=4 shiftwidth=4 expandtab: */
 +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --cc sw/source/filter/xml/xmlimp.cxx
index 78757d9,5a93051..5faedfb
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@@ -413,20 -428,14 +419,14 @@@ SvXMLImportContext *SwXMLImport::Create
                IsXMLToken( rLocalName, XML_DOCUMENT ) )
      {
          uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
 -            mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
 -                "com.sun.star.xml.dom.SAXDocumentBuilder")),
 +            mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
 +                "com.sun.star.xml.dom.SAXDocumentBuilder"))),
                  uno::UNO_QUERY_THROW);
-         uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
-             GetModel(), UNO_QUERY_THROW);
+         uno::Reference<document::XDocumentProperties> const xDocProps(
+             GetDocumentProperties());
          // flat OpenDocument file format
          pContext = new SwXMLOfficeDocContext_Impl( *this, nPrefix, rLocalName,
-                         xAttrList, xDPS->getDocumentProperties(), xDocBuilder);
-     }
-     else if ( XML_NAMESPACE_OFFICE==nPrefix &&
-               IsXMLToken( rLocalName, XML_DOCUMENT_STYLES ) )
-     {
-         pContext = new SwXMLDocStylesContext_Impl( *this, nPrefix, rLocalName,
-                                                    xAttrList );
+                         xAttrList, xDocProps, xDocBuilder);
      }
      // <--
      else
diff --cc sw/source/filter/xml/xmlimpit.cxx
index 2c635c0,7860205..d7d907a
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@@ -201,9 -210,9 +207,9 @@@ SvXMLImportItemMapper::handleSpecialIte
                                              SfxItemSet& /*rSet*/,
                                              const OUString& /*rValue*/,
                                              const SvXMLUnitConverter& /*rUnitConverter*/,
-                                             const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
+                                             const SvXMLNamespaceMap& /*rNamespaceMap*/ )
  {
 -    DBG_ERROR( "unsuported special item in xml import" );
 +    OSL_FAIL( "unsuported special item in xml import" );
      return sal_False;
  }
  
@@@ -213,9 -222,9 +219,9 @@@ sal_Bool SvXMLImportItemMapper::handleN
                                             SfxItemSet& /*rSet*/,
                                             const OUString& /*rValue*/,
                                             const SvXMLUnitConverter& /*rUnitConverter*/,
-                                            const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
+                                            const SvXMLNamespaceMap& /*rNamespaceMap*/ )
  {
 -    DBG_ERROR( "unsuported no item in xml import" );
 +    OSL_FAIL( "unsuported no item in xml import" );
      return sal_False;
  }
  
diff --cc sw/source/filter/xml/xmlitemi.cxx
index 3914e83,2b11661..27a765b
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@@ -44,10 -41,14 +42,13 @@@
  #include <editeng/boxitem.hxx>
  #include <editeng/fontitem.hxx>
  #include <editeng/tstpitem.hxx>
 -#include <editeng/boxitem.hxx>
  #include <editeng/brshitem.hxx>
  #include <editeng/langitem.hxx>
+ #include <editeng/memberids.hrc>
  
- #include "xmlbrshi.hxx"
+ #include <svx/unomid.hxx>
+ 
+ #include <hintids.hxx>
  #include <paratr.hxx>
  #include <doc.hxx>
  #include <unomid.h>
diff --cc sw/source/filter/xml/xmlmeta.cxx
index 6b046a9,351006c..b663d0e
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@@ -63,17 -75,16 +76,16 @@@ SvXMLImportContext *SwXMLImport::Create
  {
      SvXMLImportContext *pContext = 0;
  
-     if( !(IsStylesOnlyMode() || IsInsertMode()) )
+     if (getImportFlags() & IMPORT_META)
      {
-         uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
+         uno::Reference<xml::sax::XDocumentHandler> const xDocBuilder(
 -            mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
 -                "com.sun.star.xml.dom.SAXDocumentBuilder")),
 +            mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
 +                "com.sun.star.xml.dom.SAXDocumentBuilder"))),
-                 uno::UNO_QUERY_THROW);
-         uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
-             GetModel(), UNO_QUERY_THROW);
+             uno::UNO_QUERY_THROW);
+         uno::Reference<document::XDocumentProperties> const xDocProps(
+                 GetDocumentProperties());
          pContext = new SvXMLMetaDocumentContext(*this,
-                         XML_NAMESPACE_OFFICE, rLocalName,
-                         xDPS->getDocumentProperties(), xDocBuilder);
+                     XML_NAMESPACE_OFFICE, rLocalName, xDocProps, xDocBuilder);
      }
  
      if( !pContext )
diff --cc sw/source/ui/app/docsh2.cxx
index 35e971c,1c2d3d5..6474a70
mode 100644,100755..100755
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@@ -1688,11 -1779,8 +1695,7 @@@ sal_uLong SwDocShell::LoadStylesFromFil
      INetURLObject aURLObj( rURL );
      String sURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
  
-     SwRead pRead = 0;
-     SwReader* pReader = 0;
-     SwPaM* pPam = 0;
- 
 -    // Filter bestimmen:
 -//  const SfxFilter* pFlt = SwIoSystem::GetFileFilter( rURL, aEmptyStr );
 +    // Set filter:
      String sFactory(String::CreateFromAscii(SwDocShell::Factory().GetShortName()));
      SfxFilterMatcher aMatcher( sFactory );
  
@@@ -1706,10 -1794,41 +1709,40 @@@
          SfxFilterMatcher aWebMatcher( sWebFactory );
          aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
      }
-     if( aMed.IsStorage() )
+     // --> OD #i117339# - trigger import only for own formats
+ //    if( aMed.IsStorage() )
+     bool bImport( false );
+     {
+         if ( aMed.IsStorage() )
+         {
+             // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat() 
+             // does not work correct (e.g., MS Word 2007 XML Template), 
+             // use workaround provided by MAV.
+             uno::Reference< embed::XStorage > xStorage = aMed.GetStorage();
+             if ( xStorage.is() )
+             {
+                 // use <try-catch> on retrieving <MediaType> in order to check, 
+                 // if the storage is one of our own ones.
+                 try
+                 {        
+                     uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW );
+                     const ::rtl::OUString aMediaTypePropName( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
+                     xProps->getPropertyValue( aMediaTypePropName );
+                     bImport = true;
+                 }
+                 catch( const uno::Exception& )
+                 {
+                     bImport = false;
+                 }
+             }    
+         }
+     }
+     if ( bImport )
+     // <--    
      {
-         OSL_ENSURE((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
-         pRead =  ReadXML;
 -        DBG_ASSERT((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
+         SwRead pRead =  ReadXML;
+         SwReader* pReader = 0;
+         SwPaM* pPam = 0;
          // the SW3IO - Reader need the pam/wrtshell, because only then he
          // insert the styles!
          if( bUnoCall )
diff --cc sw/source/ui/dialog/swdlgfact.cxx
index 96cd7ea,da40e4a..9e197bb
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@@ -494,7 -526,25 +494,23 @@@ uno::Reference< sdbc::XResultSet> Abstr
  {
      return pDlg->GetResultSet();
  }
+ bool AbstractMailMergeDlg_Impl::IsSaveIndividualDocs() const
+ {
+     return pDlg->IsSaveIndividualDocs();
+ }
+ bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const
+ {
+     return pDlg->IsGenerateFromDataBase();
+ }
+ String AbstractMailMergeDlg_Impl::GetColumnName() const
+ {
+     return pDlg->GetColumnName();
+ }
+ String AbstractMailMergeDlg_Impl::GetPath() const
+ {
+     return pDlg->GetPath();
+ }
  
 -// AbstractMailMergeDlg_Impl end
 -// AbstractMailMergeCreateFromDlg_Impl begin
  sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
  {
      return pDlg->IsThisDocument();
diff --cc sw/source/ui/dialog/swdlgfact.hxx
index 1f18e01,db12ae9..e654529
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@@ -583,5 -586,3 +587,5 @@@ struct SwDialogsResMg
  };
  
  #endif
 +
- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
++/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --cc sw/source/ui/dochdl/swdtflvr.cxx
index b7db95c,c168104..b1d2699
mode 100644,100755..100755
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
diff --cc sw/source/ui/docvw/romenu.cxx
index a717da3,4983db6..a59fa39
mode 100644,100755..100755
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@@ -414,9 -424,10 +414,9 @@@ String ExportGraphic( const Graphic &rG
      SvtPathOptions aPathOpt;
      String sGrfPath( aPathOpt.GetGraphicPath() );
  
-     FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
+     FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
      Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
  
 -//    aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
      INetURLObject aPath;
      aPath.SetSmartURL( sGrfPath );
  
diff --cc sw/source/ui/inc/view.hxx
index 57ca1c9,a70809e..22baefb
mode 100644,100755..100755
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
diff --cc sw/source/ui/ribbar/inputwin.cxx
index a2be684,934bde7..cc462dd
mode 100644,100755..100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
diff --cc sw/source/ui/shells/grfsh.cxx
index 2d826fe,727b0fd..73c3805
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@@ -526,6 -519,13 +526,9 @@@ void SwGrfShell::GetAttrState(SfxItemSe
      rSh.GetCurAttr( aCoreSet );
      sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
      sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+ //    const GraphicObject* pGrfObj = ( bIsGrfCntnt ? rSh.GetGraphicObj() : NULL );
+ //    sal_Bool bIsRenderGraphicGrfCntnt = ( pGrfObj && pGrfObj->IsRenderGraphic() );
+ 
 -    // --> OD 2006-11-03 #i59688#
 -//    sal_Bool bSwappedOut = rSh.IsGrfSwapOut( sal_True );
 -//    sal_Bool bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
 -    // <--
  
      SetGetStateSet( &rSet );
  
@@@ -702,8 -704,3 +705,5 @@@ SwGrfShell::SwGrfShell(SwView &_rView) 
      SetName(String::CreateFromAscii("Graphic"));
      SetHelpId(SW_GRFSHELL);
  }
 +
- 
- 
- 
- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
++/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --cc sw/source/ui/uiview/view.cxx
index c0eb7f4,55196d8..77f87ee
mode 100644,100755..100755
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@@ -756,9 -787,10 +756,10 @@@ SwView::SwView( SfxViewFrame *_pFrame, 
      nRightBorderDistance( 0 ),
      bInMailMerge(sal_False),
      bInDtor(sal_False),
-     bOldShellWasPagePreView(sal_False)
+     bOldShellWasPagePreView(sal_False),
+     bIsPreviewDoubleClick(sal_False)
  {
 -    // OD 18.12.2002 #103492# - According to discussion with MBA and further
 +    // According to discussion with MBA and further
      // investigations, no old SfxViewShell will be set as parameter <pOldSh>,
      // if function "New Window" is performed to open an additional view beside
      // an already existing one.
@@@ -1262,8 -1294,9 +1264,8 @@@ void SwView::ReadUserData( const Strin
  
  void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence, sal_Bool bBrowse )
  {
-     if(GetDocShell()->IsPreview())
+     if(GetDocShell()->IsPreview()||bIsPreviewDoubleClick)
          return;
 -    //#i43146# go to the last editing position when opening own files
      bool bIsOwnDocument = lcl_IsOwnDocument( *this );
      sal_Int32 nLength = rSequence.getLength();
      if (nLength && (!pWrtShell->IsNewLayout() || pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )
diff --cc sw/source/ui/vba/vbaeventshelper.cxx
index e837785,197f029..e7f4ec2
mode 100644,100755..100644
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
diff --cc sw/source/ui/vba/vbaeventshelper.hxx
index a5817ee,044eaa3..3c291a7
mode 100644,100755..100644
--- a/sw/source/ui/vba/vbaeventshelper.hxx
+++ b/sw/source/ui/vba/vbaeventshelper.hxx
commit 323476bbcc3d1b787d5fe7602c45db68a3580ac5
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Thu Apr 21 17:41:42 2011 +0200

    fix detection of first-page header/footer (previous commit,bnc#654230)

diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 0ca0160..947b438 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1648,7 +1648,6 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
             bOutFirstPage = false;
         }
 
-
         // left-/right chain of pagedescs ?
         if ( pPd->GetFollow() && pPd != pPd->GetFollow() &&
                 pPd->GetFollow()->GetFollow() == pPd &&
@@ -1714,10 +1713,10 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
             MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_HEADER_FIRST );
             MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_FOOTER_FIRST );
         }
-        // write other headers/footers only if it's not the first page - I'm not quite sure
+        // write other headers/footers only if it's not on the first page - I'm not quite sure
         // this is technically correct, but it avoids first-page headers/footers
         // extending to all pages (bnc#654230)
-        if( pPdFmt != pPdFirstPgFmt )
+        if( !titlePage || pPdFmt != pPdFirstPgFmt )
         {
             MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFmt, WW8_HEADER_ODD );
             MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFmt, WW8_FOOTER_ODD );
commit d80516ee8243739aa87b46799970bc3944cf60cb
Author: Noel Power <noel.power at novell.com>
Date:   Tue Apr 19 14:35:52 2011 +0100

    some docx field import/export tweaks
    
    import/export ( USERNAME / USERINITIALS ) - supported now and alligned with binary import
    import/export ( AUTHOR / DocumentProperty.Author ) - AUTHOR is now imported as DocumentInfo.Created, DocProperty.Author is imported as a custom property, DocumentInfo.Created is exported as AUTHOR
    fix docx export of COMMENTS
    fix docx import of CREATEDATE,
    fix docx import of DocProperty.CreateTime
    fix docx import of DocProperty.LastSavedTime
    fix docx import of DocProperty.TotalEditingTime ( format still not right )

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 9a51005..9448cca 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2629,7 +2629,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
     case RES_AUTHORFLD:
         {
             ww::eField eFld =
-                (AF_SHORTCUT & nSubType ? ww::eUSERINITIALS : ww::eUSERNAME);
+                (AF_SHORTCUT & pFld->GetFormat() ? ww::eUSERINITIALS : ww::eUSERNAME);
             GetExport().OutputField(pFld, eFld, FieldString(eFld));
         }
         break;
commit 5dac552a112ac097b56baa82d69bfb9ec4077516
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Apr 19 18:58:58 2011 +0200

    Version 3.3.99.2, tag libreoffice-3.3.99.2 (3.4.0-beta2)
commit f3ca5688cc484eb346e4d38acacb17a17073a542
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Apr 18 18:44:36 2011 +0200

    make left/right page style be followed by the other one
    
    so that the document is automatically set to alternating left/right pages

diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index f2834e3..b6b13ec 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -1520,7 +1520,12 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
             aSet.Put( aUL );
             bSetLeft = sal_False;
             if( pNewPgDsc )
+            {
                 pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
+                // this relies on GetPageDescFromPool() not going into infinite recursion
+                // (by this point RES_POOLPAGE_LEFT will not reach this place again)
+                pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_RIGHT ));
+            }
         }
         break;
     case RES_POOLPAGE_RIGHT:				// Rechte Seite
@@ -1530,7 +1535,10 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
             aSet.Put( aUL );
             bSetLeft = sal_False;
             if( pNewPgDsc )
+            {
                 pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
+                pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_LEFT ));
+            }
         }
         break;
 
commit 4dd6c047e4ce08832d05b8ca4c8e92a08f642e7d
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Apr 18 17:46:54 2011 +0200

    avoid first-page header/footer extending to all pages (bnc#654230)

diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 53c192a..0ca0160 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1708,22 +1708,26 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
 
     if ( nBreakCode != 0 )
     {
-        MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFmt, WW8_HEADER_ODD );
-        MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFmt, WW8_FOOTER_ODD );
-
-        if ( !pPd->IsHeaderShared() || bLeftRightPgChain )
-            MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdLeftFmt, WW8_HEADER_EVEN );
-
-        if ( !pPd->IsFooterShared() || bLeftRightPgChain )
-            MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdLeftFmt, WW8_FOOTER_EVEN );
-
         if ( titlePage )
         {
             // es gibt eine ErsteSeite:
             MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_HEADER_FIRST );
             MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_FOOTER_FIRST );
         }
+        // write other headers/footers only if it's not the first page - I'm not quite sure
+        // this is technically correct, but it avoids first-page headers/footers
+        // extending to all pages (bnc#654230)
+        if( pPdFmt != pPdFirstPgFmt )
+        {
+            MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFmt, WW8_HEADER_ODD );
+            MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFmt, WW8_FOOTER_ODD );
+
+            if ( !pPd->IsHeaderShared() || bLeftRightPgChain )
+                MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdLeftFmt, WW8_HEADER_EVEN );
 
+            if ( !pPd->IsFooterShared() || bLeftRightPgChain )
+                MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdLeftFmt, WW8_FOOTER_EVEN );
+        }
         AttrOutput().SectionWW6HeaderFooterFlags( nHeadFootFlags );
     }
 
commit 48a1b2b9650f1139b5063f9aadc008dcd0ed2646
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Apr 18 17:05:04 2011 +0200

    a more reliable way to detect w:titlePg (bnc#654230)

diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 3a518c4..53c192a 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1594,6 +1594,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
         }
     }
 
+    bool titlePage = false;
     if ( bOutPgDscSet )
     {
         // es ist ein Follow gesetzt und dieser zeigt nicht auf sich
@@ -1620,10 +1621,19 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
                 pPdFmt = &rFollowFmt;
 
                 // has different headers/footers for the title page
-                AttrOutput().SectionTitlePage();
+                titlePage = true;
             }
         }
 
+        // The code above tries to detect if this is first page headers/footers,
+        // but it doesn't work even for quite trivial testcases. As I don't actually
+        // understand that code, I'll keep it. The simple and (at least for me) reliable way
+        // to detect for first page seems to be just RES_POOLPAGE_FIRST.
+        if( pPd->GetPoolFmtId() == RES_POOLPAGE_FIRST )
+            titlePage = true;
+        if( titlePage )
+            AttrOutput().SectionTitlePage();
+
         const SfxItemSet* pOldI = pISet;
 
         AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt );
@@ -1707,7 +1717,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
         if ( !pPd->IsFooterShared() || bLeftRightPgChain )
             MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdLeftFmt, WW8_FOOTER_EVEN );
 
-        if ( pPdFmt != pPdFirstPgFmt )
+        if ( titlePage )
         {
             // es gibt eine ErsteSeite:
             MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_HEADER_FIRST );
commit a2bebd5dc696de301e4e35321108cd23a42d5fcb
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Apr 18 14:27:59 2011 +0200

    implement w:evenAndOddHeaders (and settings.xml too)

diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 1ee4051..074a128 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -215,6 +215,9 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
     if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST )
         WriteHeaderFooter( rFirstPageFmt, false, "first" );
 
+    if ( nHeadFootFlags & ( nsHdFtFlags::WW8_FOOTER_EVEN | nsHdFtFlags::WW8_HEADER_EVEN ))
+        settings.evenAndOddHeaders = true;
+
 #if OSL_DEBUG_LEVEL > 1
     fprintf( stderr, "DocxExport::WriteHeadersFooters() - nBreakCode introduced, but ignored\n" );
 #endif
@@ -339,6 +342,8 @@ void DocxExport::ExportDocument_Impl()
 
     WriteFonts();
 
+    WriteSettings();
+
     delete pStyles, pStyles = NULL;
     delete m_pSections, m_pSections = NULL;
 }
@@ -642,6 +647,28 @@ void DocxExport::WriteProperties( )
     m_pFilter->exportDocumentProperties( xDocProps );
 }
 
+void DocxExport::WriteSettings()
+{
+    if( !settings.hasData())
+        return;
+    m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
+            S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" ),
+            S( "settings.xml" ) );
+
+    ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openFragmentStreamWithSerializer(
+            S( "word/settings.xml" ),
+            S( "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml" ) );
+
+    pFS->startElementNS( XML_w, XML_settings,
+            FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
+            FSEND );
+
+    if( settings.evenAndOddHeaders )
+        pFS->singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND );
+
+    pFS->endElementNS( XML_w, XML_settings );
+}
+
 VMLExport& DocxExport::VMLExporter()
 {
     return *m_pVMLExport;
@@ -726,4 +753,16 @@ DocxExport::~DocxExport()
     delete m_pDrawingML, m_pDrawingML = NULL;
 }
 
+DocxSettingsData::DocxSettingsData()
+: evenAndOddHeaders( false )
+{
+}
+
+bool DocxSettingsData::hasData() const
+{
+    if( evenAndOddHeaders )
+        return true;
+    return false;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 4838d55..ee84dcd 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -58,6 +58,14 @@ namespace com { namespace sun { namespace star {
     namespace frame { class XModel; }
 } } }
 
+/// Data to be written in the document settings part of the document
+struct DocxSettingsData
+{
+    DocxSettingsData();
+    bool hasData() const; /// returns true if there are any non-default settings (i.e. something to write)
+    bool evenAndOddHeaders;
+};
+
 /// The class that does all the actual DOCX export-related work.
 class DocxExport : public MSWordExportBase
 {
@@ -85,6 +93,8 @@ class DocxExport : public MSWordExportBase
     /// Exporter of the VML shapes.
     oox::vml::VMLExport *m_pVMLExport;
 
+    DocxSettingsData settings;
+
 public:
 
     DocxExportFilter& GetFilter() { return *m_pFilter; };
@@ -192,6 +202,9 @@ private:
     /// Write docProps/core.xml
     void WriteProperties();
 
+    /// Write word/settings.xml
+    void WriteSettings();
+
     /// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...)
     sax_fastparser::XFastAttributeListRef MainXmlNamespaces( sax_fastparser::FSHelperPtr serializer );
 
@@ -210,6 +223,9 @@ public:
     /// Reference to the VMLExport instance for the main document.
     oox::vml::VMLExport& VMLExporter();
 
+    /// Data to be exported in the settings part of the document
+    DocxSettingsData& settingsData();
+
 private:
     /// No copying.
     DocxExport( const DocxExport& );
commit 6ccd6981635845e9fd9ba2aef2a3ce3e46171f9b
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Apr 14 07:25:24 2011 +0200

    FALSE/TRUE in strings should not be converted to sal_False/sal_True.

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 7dde8e1..4fcca81 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2288,9 +2288,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
     }
 
     String sTrue( String::CreateFromAscii(
-                                    RTL_CONSTASCII_STRINGPARAM( "sal_True" ))),
+                                    RTL_CONSTASCII_STRINGPARAM( "TRUE" ))),
            sFalse( String::CreateFromAscii(
-                                       RTL_CONSTASCII_STRINGPARAM( "sal_False" )));
+                                       RTL_CONSTASCII_STRINGPARAM( "FALSE" )));
 
     sal_Bool bIsDBMgr = 0 != rDoc.GetNewDBMgr();
     sal_uInt16 nWhich, n;
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index c5a3080..9a64e64 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -78,7 +78,7 @@ using namespace com::sun::star;
 
 namespace {
 
-static char const sHTML_O_Hidden_False[] = "sal_False";
+static char const sHTML_O_Hidden_False[] = "FALSE";
 
 }
 
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index d95ab17..9c74cb3 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -385,7 +385,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
             aValueED.SetText(aEmptyStr);
             if (bCond)
                 aConditionED.SetText( String::CreateFromAscii(
-                        RTL_CONSTASCII_STRINGPARAM( "sal_True" )));
+                        RTL_CONSTASCII_STRINGPARAM( "TRUE" )));
             else
                 aConditionED.SetText(aEmptyStr);
         }
commit 8240aa1f90379d36a27b08f9b01513e8caf00166
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Apr 13 10:05:09 2011 +0200

    Fix input list default selection on ww8 import
    
    Fix for i#100621 - more correct pre-selection of list item for input
    fields - aligns import with export at least, though still not
    perfect - format docs say this is a dynamically-sized value (i.e.
    we're going to be wrong for item numbers 32 and higher)

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index cdf6491..3680f68 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2158,7 +2158,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
         nType=1;
     }
     fUnknown = nHeaderByte & 0x3;
-    fDropdownIndex = (nHeaderByte & 0xFC) >> 2;
+    fDropdownIndex = (nHeaderByte & 0x7C) >> 2;
     *pDataStream >> nField;
     fToolTip = nField & 0x01;
     fNoMark = (nField & 0x02)>>1;
commit a0528192fe77de6cc58743fa9199fe5421d2c3be
Author: Petr Mladek <pmladek at suse.cz>
Date:   Mon Apr 11 17:53:08 2011 +0200

    Version 3.3.99.1, tag libreoffice-3.3.99.1 (3.4.0-beta1)
commit d38dfc36c0414e101debc970b8677db228db3bf0
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Apr 9 08:38:15 2011 +0900

    introduced a mutex guard for SmGraphicAccessible::setCaretPosition()

diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 8f38950..8a885f6 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -462,6 +462,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getCaretPosition()
 sal_Bool SAL_CALL SmGraphicAccessible::setCaretPosition( sal_Int32 nIndex )
     throw (IndexOutOfBoundsException, RuntimeException)
 {
+    SolarMutexGuard aGuard;
     xub_StrLen nIdx = (xub_StrLen) nIndex;
     String aTxt( GetAccessibleText_Impl() );
     if (!(nIdx < aTxt.Len()))
commit e248db713ad4edf73a9ba5d9307bc70413536fc5
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Thu Apr 7 13:04:58 2011 +0200

    i#112564: Fixed a misbehaviour of createContextEnumeration on SwXTextRange

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 19468b2..4ff6238 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1023,7 +1023,8 @@ public:
     // ( Start < Pos < End ) !!!
     // (Required for Writers.)
     void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0,
-                        sal_Bool bDrawAlso = sal_False ) const;
+                        sal_Bool bDrawAlso = sal_False,
+                        sal_Bool bAsCharAlso = sal_False ) const;
 
     // Because swrtf.cxx and define private public here now.
     SwFlyFrmFmt  *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom);
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 26e0b05..a90b3a7 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1027,7 +1027,8 @@ sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
 }
 
 void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
-                           const SwPaM* pCmpRange, sal_Bool bDrawAlso ) const
+                           const SwPaM* pCmpRange, sal_Bool bDrawAlso,
+                           sal_Bool bAsCharAlso ) const
 {
     SwPosFlyFrm *pFPos = 0;
     SwFrmFmt *pFly;
@@ -1045,7 +1046,8 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
             if (pAPos &&
                 ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
                  (FLY_AT_FLY  == rAnchor.GetAnchorId()) ||
-                 (FLY_AT_CHAR == rAnchor.GetAnchorId())))
+                 (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+                 ((FLY_AS_CHAR == rAnchor.GetAnchorId()) && bAsCharAlso)))
             {
                 if( pCmpRange &&
                     !TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() ))
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index ea9f4ce..7a89db3 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1876,7 +1876,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
         {
             SwPosFlyFrms aFlyFrms;
             //get all frames that are bound at paragraph or at character
-            rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor());
+            rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor(), sal_False, sal_True);
             for(sal_uInt16 i = 0; i < aFlyFrms.Count(); i++)
             {
                 SwPosFlyFrm* pPosFly = aFlyFrms[i];
@@ -1888,20 +1888,6 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
                 m_pImpl->m_Frames.push_back(
                         ::boost::shared_ptr<SwDepend>(pNewDepend) );
             }
-            //created from any text range
-            if (m_pImpl->GetCursor()->HasMark())
-            {
-                m_pImpl->GetCursor()->Normalize();
-                do
-                {
-                    lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(),
-                            m_pImpl->m_Frames);
-                    m_pImpl->GetCursor()->Right(
-                            1, CRSR_SKIP_CHARS, sal_False, sal_False);
-                }
-                while (*m_pImpl->GetCursor()->GetPoint() <
-                        *m_pImpl->GetCursor()->GetMark());
-            }
         }
         lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), m_pImpl->m_Frames);
     }
commit aa1ea70a8a2f7f11f93f333b719fe55a7f0f5bdb
Author: Octavio Alvarez <alvarezp at alvarezp.ods.org>
Date:   Sun Apr 3 16:05:52 2011 -0700

    Change accel key for Clear Direct Formatting back to D

diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index 38cb361..22370c3 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -298,7 +298,7 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
     {\
         Identifier = FN_FORMAT_RESET ; \
         HelpId = CMD_FN_FORMAT_RESET ; \
-        Text [ en-US ] = "~Clear Direct Formatting" ; \
+        Text [ en-US ] = "Clear ~Direct Formatting" ; \
     };
 
 #define _NUMBERING_RELATED_MENU \
commit d9c342f89f8007499f4d5b8f2f1f91d1a25de52a
Merge: 79391c1... be2ee93...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Fri Apr 1 10:26:03 2011 +0200

    CWS-TOOLING: integrate CWS os151

diff --cc sw/source/ui/app/docsh2.cxx
index e5ea67a,3783458..1c2d3d5
mode 100755,100644..100755
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
commit 79391c1069ed96f762afc289aa07ffbe9ab9a8ab
Merge: 871d3e4... 78ad2da...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Fri Apr 1 10:23:05 2011 +0200

    CWS-TOOLING: integrate CWS solaris11

commit 871d3e45da009d8c7da3be41e1ee0f0c2f465626
Merge: 9b72daf... 85975f0...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Fri Apr 1 09:34:55 2011 +0200

    CWS-TOOLING: integrate CWS calcvba

commit 78ad2daa3bba05c9318ce578da2add8d91b3bfcd
Author: Michael Stahl <mst at openoffice.org>
Date:   Wed Mar 30 09:35:06 2011 +0000

    solaris11: #i117597#: undobj.cxx: inconsistent parameter constness

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 88fceef..daecf7e 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -134,7 +134,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, sal_Bool bCorrToCntnt ) const
 }
 
 SwPaM & SwUndRng::AddUndoRedoPaM(
-        ::sw::UndoRedoContext & rContext, bool bCorrToCntnt) const
+        ::sw::UndoRedoContext & rContext, bool const bCorrToCntnt) const
 {
     SwPaM & rPaM( rContext.GetCursorSupplier().CreateNewShellCursor() );
     SetPaM( rPaM, bCorrToCntnt );
commit 9b72daf51c3793aa1b53bcaeb23df03ba0104c94
Merge: 5aec1bf... 1383631...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Mar 29 15:25:13 2011 +0200

    CWS-TOOLING: integrate CWS ka102

commit 138363131b880ce647e0e6daf6a6d10d57792ae9
Merge: 9a4bc03... 9919bf5...
Author: ka <kai.ahrens at oracle.com>
Date:   Mon Mar 28 22:51:37 2011 +0200

    ka102: rebased to DEV300_m104

commit 5aec1bff5486ad44c40531adead542a47f4cdf40
Merge: 9919bf5... e26742f...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Mon Mar 28 17:05:13 2011 +0200

    CWS-TOOLING: integrate CWS sw34bf05

diff --cc sw/source/core/graphic/ndgrf.cxx
index 5eb5ff1,2704c01..de3fe2a
mode 100644,100755..100755
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
diff --cc sw/source/core/layout/fly.cxx
index 7e26349,6c58d69..070ef61
mode 100644,100755..100755
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@@ -870,14 -796,13 +870,13 @@@ void SwFlyFrm::Modify( const SfxPoolIte
              UpdateObjInSortedList();
          }
          // <--
+         // --> OD #i87645# - reset flags for the layout process (only if something has been invalidated)
+         ResetLayoutProcessBools();
+         // <--
      }
- 
-     // --> OD 2005-07-18 #i51474# - reset flags for the layout process
-     ResetLayoutProcessBools();
-     // <--
  }
  
 -void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
 +void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
                              sal_uInt8 &rInvFlags,
                              SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
  {
diff --cc sw/source/core/layout/paintfrm.cxx
index a378dff,590ba79..2e03bba
mode 100644,100755..100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@@ -81,17 -83,29 +81,24 @@@
  #include <lineinfo.hxx>
  #include <dbg_lay.hxx>
  #include <accessibilityoptions.hxx>
 -// OD 20.12.2002 #94627#
  #include <docsh.hxx>
 -// OD 28.02.2003 #b4779636#, #107692#
  #include <swtable.hxx>
 -// OD 02.07.2003 #108784#
  #include <svx/svdogrp.hxx>
 -// OD 2004-05-24 #i28701#
  #include <sortedobjs.hxx>
 -
 -// --> FME 2004-06-08 #i12836# enhanced pdf export
  #include <EnhancedPDFExportHelper.hxx>
+ // <--
+ // --> OD #i76669#
+ #include <svx/sdr/contact/viewobjectcontactredirector.hxx>
+ #include <svx/sdr/contact/viewobjectcontact.hxx>
+ #include <svx/sdr/contact/viewcontact.hxx>
+ // <--
+ 
  #include <ndole.hxx>
  #include <svtools/chartprettypainter.hxx>
 -
  #include <PostItMgr.hxx>
  #include <tools/color.hxx>
 +#include <vcl/svapp.hxx>
 +
  #define COL_NOTES_SIDEPANE					RGB_COLORDATA(230,230,230)
  #define COL_NOTES_SIDEPANE_BORDER			RGB_COLORDATA(200,200,200)
  #define COL_NOTES_SIDEPANE_SCROLLAREA		RGB_COLORDATA(230,230,220)
diff --cc sw/source/core/text/frmform.cxx
index 869ac9b,77ba106..f5b5a8a
mode 100644,100755..100755
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
diff --cc sw/source/core/unocore/unoframe.cxx
index 9f938d9,7e7d1b0..61c154c
mode 100644,100755..100755
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
diff --cc sw/source/core/view/vdraw.cxx
index 223b020,0081562..28efd39
mode 100644,100755..100755
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
diff --cc sw/source/ui/app/docsh2.cxx
index 6d300d2,309fe03..e5ea67a
mode 100644,100755..100755
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
commit 85975f01b992430ea12a860434cb2acbfcb5f397
Merge: 5fbd723... 9919bf5...
Author: Daniel Rentz [dr] <daniel.rentz at oracle.com>
Date:   Fri Mar 25 13:58:04 2011 +0100

    calcvba: rebase to DEV300_m104

commit be2ee939bbe4d211edf42c924b43c38ba128cd7e
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Fri Mar 25 12:18:37 2011 +0100

    os151: #i98753# - method <SwTransferable::PrepareForCopy(..)> - set size of embedded object at the object description structure

diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
old mode 100644
new mode 100755
index 1b87d3f..c168104
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -154,24 +154,6 @@ using namespace nsTransferBufferType;
 
 #define DDE_TXT_ENCODING 	gsl_getSystemTextEncoding()
 
-//---------------------------------------------
-// this struct conforms to the Microsoft
-// OBJECTDESCRIPTOR -> see oleidl.h
-// (MS platform sdk)
-//---------------------------------------------
-
-struct OleObjectDescriptor
-{
-        sal_uInt32      cbSize;
-        ClsId           clsid;
-        sal_uInt32      dwDrawAspect;
-        Size            sizel;
-        Point           pointl;
-        sal_uInt32      dwStatus;
-        sal_uInt32      dwFullUserTypeName;
-        sal_uInt32      dwSrcOfCopy;
-};
-
 class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
 {
     String sName;
@@ -831,6 +813,10 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
 
         AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 
+        // --> OD #i98753#
+        // set size of embedded object at the object description structure
+        aObjDesc.maSize = OutputDevice::LogicToLogic( pWrtShell->GetObjSize(), MAP_TWIP, MAP_100TH_MM );
+        // <--
         PrepareOLE( aObjDesc );
         AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
commit 5fbd72310285545ced3ad0fcc8124f070a96870d
Author: Daniel Rentz [dr] <daniel.rentz at oracle.com>
Date:   Fri Mar 25 10:40:25 2011 +0100

    calcvba: #164410# improve VBA compatibility implementation in various areas: Excel symbols, MSForms symbols, document and forms event handling

diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index fd815b2..ad02fda 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -97,7 +97,9 @@ uno::Reference< word::XWindow > SAL_CALL
 SwVbaApplication::getActiveWindow() throw (uno::RuntimeException)
 {
     // #FIXME sofar can't determine Parent
-    return new SwVbaWindow( uno::Reference< XHelperInterface >(), mxContext, getCurrentDocument() );
+    uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_SET_THROW );
+    uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );
+    return new SwVbaWindow( uno::Reference< XHelperInterface >(), mxContext, xModel, xController );
 }
 
 uno::Reference<word::XSystem > SAL_CALL
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx
index b2270b0..197f029 100755
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -26,6 +26,7 @@
  ************************************************************************/
 
 #include "vbaeventshelper.hxx"
+#include <com/sun/star/script/ModuleType.hpp>
 #include <com/sun/star/script/vba/VBAEventId.hpp>
 #include <vbahelper/helperdecl.hxx>
 
@@ -38,12 +39,13 @@ using namespace ::ooo::vba;
 SwVbaEventsHelper::SwVbaEventsHelper( uno::Sequence< css::uno::Any > const& aArgs, uno::Reference< uno::XComponentContext > const& xContext ) :
     VbaEventsHelperBase( aArgs, xContext )
 {
-    registerEventHandler( DOCUMENT_NEW,     "Document_New",     EVENTHANDLER_DOCUMENT );
-    registerEventHandler( AUTO_NEW,         "AutoNew",          EVENTHANDLER_GLOBAL );
-    registerEventHandler( DOCUMENT_OPEN,    "Document_Open",    EVENTHANDLER_DOCUMENT );
-    registerEventHandler( AUTO_OPEN,        "AutoOpen",         EVENTHANDLER_GLOBAL );
-    registerEventHandler( DOCUMENT_CLOSE,   "Document_Close",   EVENTHANDLER_DOCUMENT );
-    registerEventHandler( AUTO_CLOSE,       "AutoClose",        EVENTHANDLER_GLOBAL );
+    using namespace ::com::sun::star::script::ModuleType;
+    registerEventHandler( DOCUMENT_NEW,     DOCUMENT,   "Document_New" );
+    registerEventHandler( AUTO_NEW,         NORMAL,     "AutoNew" );
+    registerEventHandler( DOCUMENT_OPEN,    DOCUMENT,   "Document_Open" );
+    registerEventHandler( AUTO_OPEN,        NORMAL,     "AutoOpen" );
+    registerEventHandler( DOCUMENT_CLOSE,   DOCUMENT,   "Document_Close" );
+    registerEventHandler( AUTO_CLOSE,       NORMAL,     "AutoClose" );
 }
 
 SwVbaEventsHelper::~SwVbaEventsHelper()
@@ -76,7 +78,7 @@ uno::Sequence< uno::Any > SwVbaEventsHelper::implBuildArgumentList( const EventH
 }
 
 void SwVbaEventsHelper::implPostProcessEvent( EventQueue& /*rEventQueue*/,
-        const EventHandlerInfo& /*rInfo*/, bool /*bSuccess*/, bool /*bCancel*/ ) throw (uno::RuntimeException)
+        const EventHandlerInfo& /*rInfo*/, bool /*bCancel*/ ) throw (uno::RuntimeException)
 {
     // nothing to do after any event
 }
diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx
index 7f951bd..044eaa3 100755
--- a/sw/source/ui/vba/vbaeventshelper.hxx
+++ b/sw/source/ui/vba/vbaeventshelper.hxx
@@ -43,7 +43,7 @@ public:
 protected:
     virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException);
     virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException);
-    virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException);
+    virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bCancel ) throw (css::uno::RuntimeException);
     virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException);
 };
 
diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx
index dc5913a..4f16827 100644
--- a/sw/source/ui/vba/vbawindow.cxx
+++ b/sw/source/ui/vba/vbawindow.cxx
@@ -35,7 +35,12 @@
 using namespace ::com::sun::star;
 using namespace ::ooo::vba;
 
-SwVbaWindow::SwVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext, xModel )
+SwVbaWindow::SwVbaWindow(
+        const uno::Reference< XHelperInterface >& xParent,
+        const uno::Reference< uno::XComponentContext >& xContext,
+        const uno::Reference< frame::XModel >& xModel,
+        const uno::Reference< frame::XController >& xController ) throw (uno::RuntimeException) :
+    WindowImpl_BASE( xParent, xContext, xModel, xController )
 {
 }
 
diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx
index 1ef1ff9..f52b7f6 100644
--- a/sw/source/ui/vba/vbawindow.hxx
+++ b/sw/source/ui/vba/vbawindow.hxx
@@ -38,8 +38,12 @@ typedef cppu::ImplInheritanceHelper1< VbaWindowBase, ov::word::XWindow > WindowI
 class SwVbaWindow : public WindowImpl_BASE
 {		
 public:	
-    SwVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
-
+    SwVbaWindow(
+        const css::uno::Reference< ov::XHelperInterface >& xParent,
+        const css::uno::Reference< css::uno::XComponentContext >& xContext,
+        const css::uno::Reference< css::frame::XModel >& xModel,
+        const css::uno::Reference< css::frame::XController >& xController )
+        throw (css::uno::RuntimeException);
 
     // Attributes
     virtual css::uno::Any SAL_CALL getView() throw (css::uno::RuntimeException);
commit 75f911491afdb9c5dfa7b8fe486911e0952f3867
Author: os <os at openoffice.org>
Date:   Wed Mar 23 15:35:29 2011 +0100

    os151: #i116136# prevent reset of 'modified' flag while sending to outline or clipboard

diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 6d300d2..3783458 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1109,6 +1109,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
         case FN_OUTLINE_TO_CLIPBOARD:
         case FN_OUTLINE_TO_IMPRESS:
             {
+                sal_Bool bEnable = IsEnableSetModified();
+                EnableSetModified( sal_False );
                 WriterRef xWrt;
                 // mba: looks as if relative URLs don't make sense here
                 ::GetRTFWriter( 'O', String(), xWrt );
@@ -1116,6 +1118,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 pStrm->SetBufferSize( 16348 );
                 SwWriter aWrt( *pStrm, *GetDoc() );
                 ErrCode eErr = aWrt.Write( xWrt );
+                EnableSetModified( bEnable );
                 if( !ERRCODE_TOERROR( eErr ) )
                 {
                     pStrm->Seek( STREAM_SEEK_TO_END );
commit 9d1cf9249dffbc974a22134399c037c6efc90510
Merge: b5b51f0... 3a2b287...
Author: os <os at openoffice.org>
Date:   Wed Mar 23 12:35:14 2011 +0100

    merged

commit b5b51f0fb63594c5650bfd03986e11a258d75ba3
Author: os <os at openoffice.org>
Date:   Wed Mar 23 12:20:23 2011 +0100

    os151: #108521# mark table cells as modified when pasting content unformatted, RTF or HTML

diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 3fd11d5..1b87d3f 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -1688,7 +1688,9 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
         Link aOldLink( rSh.GetChgLnk() );
         rSh.SetChgLnk( Link() );
 
+        const SwPosition& rInsPos = *rSh.GetCrsr()->Start();
         SwReader aReader( *pStream, aEmptyStr, String(), *rSh.GetCrsr() );
+        rSh.SaveTblBoxCntnt( &rInsPos );
         if( IsError( aReader.Read( *pRead )) )
             nResId = ERR_CLPBRD_READ;
         else
commit 3a2b2870a320aeb751e22d2ccf86b3d401f50495
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Wed Mar 23 10:24:41 2011 +0100

    os151: #i102707# - method <SwVirtFlyDrawObj::wrap_DoPaintObject()> - restoration of map mode only if needed and special handling during meta file creation

diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 7495a15..b937d3d 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -473,6 +473,52 @@ SwFrmFmt *SwVirtFlyDrawObj::GetFmt()
 |*
 *************************************************************************/
 
+// --> OD #i102707#
+namespace
+{
+    class RestoreMapMode
+    {
+        public:
+            explicit RestoreMapMode( ViewShell* pViewShell )
+                : mbMapModeRestored( false )
+                , mpOutDev( pViewShell->GetOut() )                    
+            {
+                if ( pViewShell->getPrePostMapMode() != mpOutDev->GetMapMode() )
+                {
+                    mpOutDev->Push(PUSH_MAPMODE);
+                    
+                    GDIMetaFile* pMetaFile = mpOutDev->GetConnectMetaFile();
+                    if ( pMetaFile && 
+                         pMetaFile->IsRecord() && !pMetaFile->IsPause() )
+                    {
+                        ASSERT( false,
+                                "MapMode restoration during meta file creation is somehow suspect - using <SetRelativeMapMode(..)>, but not sure, if correct." )
+                        mpOutDev->SetRelativeMapMode( pViewShell->getPrePostMapMode() );
+                    }
+                    else
+                    {
+                        mpOutDev->SetMapMode( pViewShell->getPrePostMapMode() );
+                    }
+                    
+                    mbMapModeRestored = true;
+                }
+            };
+
+            ~RestoreMapMode()
+            {
+                if ( mbMapModeRestored )
+                {
+                    mpOutDev->Pop();
+                }
+            };            
+
+        private:
+            bool mbMapModeRestored;
+            OutputDevice* mpOutDev;
+    };
+}
+// <--
+
 void SwVirtFlyDrawObj::wrap_DoPaintObject() const
 {
     ViewShell* pShell = pFlyFrm->getRootFrm()->GetCurrShell();
@@ -482,31 +528,29 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const
     // but no paints. IsPaintInProgress() depends on SW repaint, so, as long
     // as SW paints self and calls DrawLayer() for Heaven and Hell, this will
     // be correct
-    if(pShell && pShell->IsDrawingLayerPaintInProgress())
+    if ( pShell && pShell->IsDrawingLayerPaintInProgress() )
     {
         sal_Bool bDrawObject(sal_True);
 
-        if(!SwFlyFrm::IsPaint((SdrObject*)this, pShell))
+        if ( !SwFlyFrm::IsPaint( (SdrObject*)this, pShell ) )
         {
             bDrawObject = sal_False;
         }
 
-        if(bDrawObject)
+        if ( bDrawObject )
         {
-            if(!pFlyFrm->IsFlyInCntFrm())
+            if ( !pFlyFrm->IsFlyInCntFrm() )
             {
                 // it is also necessary to restore the VCL MapMode from ViewInformation since e.g.
                 // the VCL PixelRenderer resets it at the used OutputDevice. Unfortunately, this
                 // excludes shears and rotates which are not expressable in MapMode.
-                OutputDevice* pOut = pShell->GetOut();
-
-                pOut->Push(PUSH_MAPMODE);
-                pOut->SetMapMode(pShell->getPrePostMapMode());
+                // OD #i102707# 
+                // new helper class to restore MapMode - restoration, only if 
+                // needed and consideration of paint for meta file creation .
+                RestoreMapMode aRestoreMapModeIfNeeded( pShell );
 
                 // paint the FlyFrame (use standard VCL-Paint)
-                pFlyFrm->Paint(GetFlyFrm()->Frm());
-
-                pOut->Pop();
+                pFlyFrm->Paint( GetFlyFrm()->Frm() );
             }
         }
     }
commit 1f5e97cbab7362019d86d59b62b72e255dc662ee
Author: os <os at openoffice.org>
Date:   Wed Mar 23 07:52:55 2011 +0100

    #i114045# return from page preview: go to the right document position

diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
old mode 100644

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list