incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1397728 [9/10] - in /incubator/ooo/branches/buildsys: ./ ext_sources/ extras/l10n/source/da/ extras/l10n/source/gd/ extras/l10n/source/pl/ main/ main/basctl/source/basicide/ main/basegfx/inc/basegfx/pixel/ main/basegfx/inc/basegfx/point/ m...
Date Fri, 12 Oct 2012 21:29:49 GMT
Modified: incubator/ooo/branches/buildsys/main/sw/inc/hintids.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/inc/hintids.hxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/inc/hintids.hxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/inc/hintids.hxx Fri Oct 12 21:29:36 2012
@@ -93,8 +93,8 @@ RES_CHRATR_BEGIN = HINT_BEGIN,
 	RES_CHRATR_OVERLINE,					// 38
 	RES_CHRATR_DUMMY1,						// 39
 	RES_CHRATR_DUMMY2,						// 40
-	RES_CHRATR_BIDIRTL,						
-	RES_CHRATR_IDCTHINT,					
+	RES_CHRATR_BIDIRTL,						// 41
+	RES_CHRATR_IDCTHINT,					// 42
 RES_CHRATR_END
 };
 
@@ -120,27 +120,27 @@ RES_TXTATR_BEGIN = RES_CHRATR_END,
    - META and METAFIELD must precede CJK_RUBY and INETFMT
  */
 RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
-    RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN,  // 41
-    RES_TXTATR_TOXMARK,                             // 42
-    RES_TXTATR_META,                                // 43
-    RES_TXTATR_METAFIELD,                           // 44
-    RES_TXTATR_AUTOFMT,                             // 45
-    RES_TXTATR_INETFMT,                             // 46
-    RES_TXTATR_CHARFMT,                             // 47
-    RES_TXTATR_CJK_RUBY,                            // 48
-    RES_TXTATR_UNKNOWN_CONTAINER,                   // 49
-    RES_TXTATR_DUMMY5,                              // 50
+    RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN,  // 43
+    RES_TXTATR_TOXMARK,                             // 44
+    RES_TXTATR_META,                                // 45
+    RES_TXTATR_METAFIELD,                           // 46
+    RES_TXTATR_AUTOFMT,                             // 47
+    RES_TXTATR_INETFMT,                             // 48
+    RES_TXTATR_CHARFMT,                             // 49
+    RES_TXTATR_CJK_RUBY,                            // 50
+    RES_TXTATR_UNKNOWN_CONTAINER,                   // 51
+    RES_TXTATR_DUMMY5,                              // 52
 RES_TXTATR_WITHEND_END,
 
 // alle TextAttribute ohne ein Ende
 RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
-	RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN,		// 51
-	RES_TXTATR_FLYCNT,								// 52
-	RES_TXTATR_FTN, 								// 53
-    RES_TXTATR_DUMMY4,                              // 54
-    RES_TXTATR_DUMMY3,                              // 55
-	RES_TXTATR_DUMMY1,								// 56
-	RES_TXTATR_DUMMY2,								// 57
+	RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN,		// 53
+	RES_TXTATR_FLYCNT,								// 54
+	RES_TXTATR_FTN, 								// 55
+    RES_TXTATR_DUMMY4,                              // 56
+    RES_TXTATR_DUMMY3,                              // 57
+	RES_TXTATR_DUMMY1,								// 58
+	RES_TXTATR_DUMMY2,								// 59
 RES_TXTATR_NOEND_END,
 RES_TXTATR_END = RES_TXTATR_NOEND_END
 };
@@ -148,23 +148,23 @@ RES_TXTATR_END = RES_TXTATR_NOEND_END
 enum RES_PARATR
 {
 RES_PARATR_BEGIN = RES_TXTATR_END,
-    RES_PARATR_LINESPACING = RES_PARATR_BEGIN,      // 58
-	RES_PARATR_ADJUST,								// 59
-	RES_PARATR_SPLIT,								// 60
-	RES_PARATR_ORPHANS, 							// 61
-	RES_PARATR_WIDOWS,								// 62
-	RES_PARATR_TABSTOP, 							// 63
-	RES_PARATR_HYPHENZONE,							// 64
-	RES_PARATR_DROP,								// 65
-	RES_PARATR_REGISTER,							// 66
-	RES_PARATR_NUMRULE, 							// 67
-	RES_PARATR_SCRIPTSPACE,							// 68
-	RES_PARATR_HANGINGPUNCTUATION,					// 69
-	RES_PARATR_FORBIDDEN_RULES,						// 70
-	RES_PARATR_VERTALIGN,							// 71
-    RES_PARATR_SNAPTOGRID,                          // 72
-    RES_PARATR_CONNECT_BORDER,                      // 73
-    RES_PARATR_OUTLINELEVEL,                        // 74
+    RES_PARATR_LINESPACING = RES_PARATR_BEGIN,      // 60
+	RES_PARATR_ADJUST,								// 61
+	RES_PARATR_SPLIT,								// 62
+	RES_PARATR_ORPHANS, 							// 63
+	RES_PARATR_WIDOWS,								// 64
+	RES_PARATR_TABSTOP, 							// 65
+	RES_PARATR_HYPHENZONE,							// 66
+	RES_PARATR_DROP,								// 67
+	RES_PARATR_REGISTER,							// 68
+	RES_PARATR_NUMRULE, 							// 69
+	RES_PARATR_SCRIPTSPACE,							// 70
+	RES_PARATR_HANGINGPUNCTUATION,					// 71
+	RES_PARATR_FORBIDDEN_RULES,						// 72
+	RES_PARATR_VERTALIGN,							// 73
+    RES_PARATR_SNAPTOGRID,                          // 74
+    RES_PARATR_CONNECT_BORDER,                      // 75
+    RES_PARATR_OUTLINELEVEL,                        // 76
 RES_PARATR_END
 };
 
@@ -174,11 +174,11 @@ RES_PARATR_END
 enum RES_PARATR_LIST
 {
 RES_PARATR_LIST_BEGIN = RES_PARATR_END,
-    RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN,     // 75
-    RES_PARATR_LIST_LEVEL,                          // 76
-    RES_PARATR_LIST_ISRESTART,                      // 77
-    RES_PARATR_LIST_RESTARTVALUE,                   // 78
-    RES_PARATR_LIST_ISCOUNTED,                      // 79
+    RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN,     // 77
+    RES_PARATR_LIST_LEVEL,                          // 78
+    RES_PARATR_LIST_ISRESTART,                      // 79
+    RES_PARATR_LIST_RESTARTVALUE,                   // 80
+    RES_PARATR_LIST_ISCOUNTED,                      // 81
 RES_PARATR_LIST_END
 };
 // <--
@@ -186,92 +186,88 @@ RES_PARATR_LIST_END
 enum RES_FRMATR
 {
 RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
-    RES_FILL_ORDER = RES_FRMATR_BEGIN,              // 80
-    RES_FRM_SIZE,                                   // 81
-    RES_PAPER_BIN,                                  // 82
-    RES_LR_SPACE,                                   // 83
-    RES_UL_SPACE,                                   // 84
-    RES_PAGEDESC,                                   // 85
-    RES_BREAK,                                      // 86
-    RES_CNTNT,                                      // 87
-    RES_HEADER,                                     // 88
-    RES_FOOTER,                                     // 89
-    RES_PRINT,                                      // 90
-    RES_OPAQUE,                                     // 91
-    RES_PROTECT,                                    // 92
-    RES_SURROUND,                                   // 93
-    RES_VERT_ORIENT,                                // 94
-    RES_HORI_ORIENT,                                // 95
-    RES_ANCHOR,                                     // 96
-    RES_BACKGROUND,                                 // 97
-    RES_BOX,                                        // 98
-    RES_SHADOW,                                     // 99
-    RES_FRMMACRO,                                   // 100
-    RES_COL,                                        // 101
-    RES_KEEP,                                       // 102
-    RES_URL,                                        // 103
-    RES_EDIT_IN_READONLY,                           // 104
-    RES_LAYOUT_SPLIT,                               // 105
-    RES_CHAIN,                                      // 106
-    RES_TEXTGRID,                                   // 107
-    RES_LINENUMBER  ,                               // 108
-    RES_FTN_AT_TXTEND,                              // 109
-    RES_END_AT_TXTEND,                              // 110
-    RES_COLUMNBALANCE,                              // 111
-    RES_FRAMEDIR,                                   // 112
-    RES_HEADER_FOOTER_EAT_SPACING,                  // 113
-    RES_ROW_SPLIT,                                  // 114
-    // OD 18.09.2003 #i18732# - insert new item and 5 dummies
-    RES_FOLLOW_TEXT_FLOW,                           // 115
-// --> collapsing borders FME 2005-05-27 #i29550#
-    RES_COLLAPSING_BORDERS,                         // 116
-// <-- collapsing
-    // OD 2004-05-04 #i28701# - use dummy1 for new item
-    RES_WRAP_INFLUENCE_ON_OBJPOS,                   // 117
-    RES_AUTO_STYLE,                                 // 118
-    RES_FRMATR_STYLE_NAME,                          // 119
-    RES_FRMATR_CONDITIONAL_STYLE_NAME,              // 120
+    RES_FILL_ORDER = RES_FRMATR_BEGIN,              // 82
+    RES_FRM_SIZE,                                   // 83
+    RES_PAPER_BIN,                                  // 84
+    RES_LR_SPACE,                                   // 85
+    RES_UL_SPACE,                                   // 86
+    RES_PAGEDESC,                                   // 87
+    RES_BREAK,                                      // 88
+    RES_CNTNT,                                      // 89
+    RES_HEADER,                                     // 90
+    RES_FOOTER,                                     // 91
+    RES_PRINT,                                      // 92
+    RES_OPAQUE,                                     // 93
+    RES_PROTECT,                                    // 94
+    RES_SURROUND,                                   // 95
+    RES_VERT_ORIENT,                                // 96
+    RES_HORI_ORIENT,                                // 97
+    RES_ANCHOR,                                     // 98
+    RES_BACKGROUND,                                 // 99
+    RES_BOX,                                        // 100
+    RES_SHADOW,                                     // 101
+    RES_FRMMACRO,                                   // 102
+    RES_COL,                                        // 103
+    RES_KEEP,                                       // 104
+    RES_URL,                                        // 105
+    RES_EDIT_IN_READONLY,                           // 106
+    RES_LAYOUT_SPLIT,                               // 107
+    RES_CHAIN,                                      // 108
+    RES_TEXTGRID,                                   // 109
+    RES_LINENUMBER  ,                               // 110
+    RES_FTN_AT_TXTEND,                              // 111
+    RES_END_AT_TXTEND,                              // 112
+    RES_COLUMNBALANCE,                              // 113
+    RES_FRAMEDIR,                                   // 114
+    RES_HEADER_FOOTER_EAT_SPACING,                  // 115
+    RES_ROW_SPLIT,                                  // 116
+    RES_FOLLOW_TEXT_FLOW,                           // 117
+    RES_COLLAPSING_BORDERS,                         // 118
+    RES_WRAP_INFLUENCE_ON_OBJPOS,                   // 119
+    RES_AUTO_STYLE,                                 // 120
+    RES_FRMATR_STYLE_NAME,                          // 121
+    RES_FRMATR_CONDITIONAL_STYLE_NAME,              // 122
 RES_FRMATR_END
 };
 
 enum RES_GRFATR
 {
 RES_GRFATR_BEGIN = RES_FRMATR_END,
-    RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN,        // 121
-    RES_GRFATR_CROPGRF,                             // 122
+    RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN,        // 123
+    RES_GRFATR_CROPGRF,                             // 124
 
-    RES_GRFATR_ROTATION,                            // 123
-    RES_GRFATR_LUMINANCE,                           // 124
-    RES_GRFATR_CONTRAST,                            // 125
-    RES_GRFATR_CHANNELR,                            // 126
-    RES_GRFATR_CHANNELG,                            // 127
-    RES_GRFATR_CHANNELB,                            // 128
-    RES_GRFATR_GAMMA,                               // 129
-    RES_GRFATR_INVERT,                              // 130
-    RES_GRFATR_TRANSPARENCY,                        // 131
-    RES_GRFATR_DRAWMODE,                            // 132
-
-    RES_GRFATR_DUMMY1,                              // 133
-    RES_GRFATR_DUMMY2,                              // 134
-    RES_GRFATR_DUMMY3,                              // 135
-    RES_GRFATR_DUMMY4,                              // 136
-    RES_GRFATR_DUMMY5,                              // 137
+    RES_GRFATR_ROTATION,                            // 125
+    RES_GRFATR_LUMINANCE,                           // 126
+    RES_GRFATR_CONTRAST,                            // 127
+    RES_GRFATR_CHANNELR,                            // 128
+    RES_GRFATR_CHANNELG,                            // 129
+    RES_GRFATR_CHANNELB,                            // 130
+    RES_GRFATR_GAMMA,                               // 131
+    RES_GRFATR_INVERT,                              // 132
+    RES_GRFATR_TRANSPARENCY,                        // 133
+    RES_GRFATR_DRAWMODE,                            // 134
+
+    RES_GRFATR_DUMMY1,                              // 135
+    RES_GRFATR_DUMMY2,                              // 136
+    RES_GRFATR_DUMMY3,                              // 137
+    RES_GRFATR_DUMMY4,                              // 138
+    RES_GRFATR_DUMMY5,                              // 139
 RES_GRFATR_END
 };
 
 enum RES_BOXATR
 {
 RES_BOXATR_BEGIN = RES_GRFATR_END,
-    RES_BOXATR_FORMAT = RES_BOXATR_BEGIN,           // 138
-    RES_BOXATR_FORMULA,                             // 139
-    RES_BOXATR_VALUE,                               // 140
+    RES_BOXATR_FORMAT = RES_BOXATR_BEGIN,           // 140
+    RES_BOXATR_FORMULA,                             // 141
+    RES_BOXATR_VALUE,                               // 142
 RES_BOXATR_END
 };
 
 enum RES_UNKNOWNATR
 {
 RES_UNKNOWNATR_BEGIN = RES_BOXATR_END,
-    RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 141
+    RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 143
 RES_UNKNOWNATR_END
 };
 

Modified: incubator/ooo/branches/buildsys/main/sw/source/core/txtnode/ndtxt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/source/core/txtnode/ndtxt.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/source/core/txtnode/ndtxt.cxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/source/core/txtnode/ndtxt.cxx Fri Oct 12 21:29:36 2012
@@ -5080,17 +5080,22 @@ SwTxtNode::MakeUnoObject()
 //Bug 120881:Modify here for Directly Page Numbering
 bool SwTxtNode::HasPageNumberField()
 {
-	xub_StrLen nEnd = Len();
-	for(xub_StrLen nStart=0;nStart<nEnd;nStart++)
-	{
-		SwTxtFld* pFld = GetTxtFld(nStart);
-		const SwField* pSwField = NULL;
-		const SwFieldType* pType = NULL;
-		if (pFld && (pSwField=pFld->GetFld().GetFld()) && 
-			(pType=pSwField->GetTyp()) && pType->Which()==RES_PAGENUMBERFLD)
-			return true;
-	}
-	return false;
+    xub_StrLen nEnd = Len();
+    for(xub_StrLen nStart=0;nStart<nEnd;nStart++)
+    {
+        SwTxtFld* pFld = GetTxtFld(nStart);
+        const SwField* pSwField = pFld
+            ? pFld->GetFld().GetFld()
+            : NULL;
+        const SwFieldType* pType = pSwField
+            ? pSwField->GetTyp()
+            : NULL;
+        if ( pType && pType->Which() == RES_PAGENUMBERFLD )
+        {
+            return true;
+        }
+    }
+    return false;
 
 }
 //Bug 120881(End)

Modified: incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.cxx Fri Oct 12 21:29:36 2012
@@ -2099,12 +2099,15 @@ bool SwWW8ImplReader::ProcessSpecial(boo
 
     WW8_TablePos *pTabPos=0;
     WW8_TablePos aTabPos;
+    WW8PLCFx_Cp_FKP* pPap = 0;
+    bool bTableHasPositionInfo = false;
+    
     if (nCellLevel && !bVer67)
     {
         WW8PLCFxSave1 aSave;
         pPlcxMan->GetPap()->Save( aSave );
         rbReSync = true;
-        WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
+        pPap = pPlcxMan->GetPapPLCF();
         WW8_CP nMyStartCp=nStartCp;
 
         if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
@@ -2116,15 +2119,29 @@ bool SwWW8ImplReader::ProcessSpecial(boo
         if (!bHasRowEnd)
             nCellLevel = static_cast< sal_uInt8 >(nInTable);
 
-        if (bHasRowEnd && ParseTabPos(&aTabPos,pPap))
-            pTabPos = &aTabPos;
+        sal_uLong idstart = rDoc.GetNodes().GetEndOfContent().StartOfSectionIndex(); // get the node index
+        sal_uLong idcur = 0;
+        if ( pPaM && pPaM->GetPoint() )
+            idcur = pPaM->GetPoint()->nNode.GetIndex();
+    
+        // Memory first table postion info
+        if ( !pFirstTablePap && idstart + 1 == idcur )
+            pFirstTablePap = pPap;
+
+        if ( bHasRowEnd  && ParseTabPos(&aTabPos,pPap) )
+        {
+            // If table front don't have some content and it is doc first table, ignore table text wrapping property
+            bTableHasPositionInfo = true;
+            if ( pFirstTablePap != pPap )
+                pTabPos = &aTabPos;
+        }
 
         pPlcxMan->GetPap()->Restore( aSave );
     }
 
 //  then look if we are in an Apo
 
-    ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos);
+    ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos, !(pFirstTablePap == pPap && bTableHasPositionInfo));
 
     //look to see if we are in a Table, but Table in foot/end note not allowed
     bool bStartTab = (nInTable < nCellLevel) && !bFtnEdn;

Modified: incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.hxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.hxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par.hxx Fri Oct 12 21:29:36 2012
@@ -1103,6 +1103,8 @@ private:
     bool bBidi;
     bool bReadTable;
     boost::shared_ptr<SwPaM> mpTableEndPaM;
+    WW8PLCFx_Cp_FKP* pFirstTablePap;
+
     // Indicate that currently on loading a TOC, managed by Read_F_TOX() and End_Field()
     bool mbLoadingTOCCache;
     // Indicate that current on loading a hyperlink, which is inside a TOC; Managed by Read_F_Hyperlink() and End_Field()
@@ -1239,8 +1241,8 @@ private:
     bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
     void StopApo();
     bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
-    ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd,
-        const WW8_TablePos *pTabPos);
+    ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos,
+        bool bReadTablePos = true);
 
     void EndSpecial();
     bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);

Modified: incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par2.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par2.cxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par2.cxx Fri Oct 12 21:29:36 2012
@@ -528,7 +528,7 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PL
 }
 
 ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
-    const WW8_TablePos *pTabPos)
+        const WW8_TablePos *pTabPos, bool bReadTablePos)
 {
     const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos : 0;
     ApoTestResults aRet;
@@ -556,9 +556,13 @@ ApoTestResults SwWW8ImplReader::TestApo(
     If we are already a table in a frame then we must grab the para properties
     to see if we are still in that frame.
     */
+    // If table front don't have some content and it is doc first table, ignore table text wrapping property
+    if ( bReadTablePos )
+    {
+        aRet.mpSprm37 = pPlcxMan->HasParaSprm( bVer67 ? 37 : 0x2423 );
+        aRet.mpSprm29 = pPlcxMan->HasParaSprm( bVer67 ? 29 : 0x261B );
+    }
 
-    aRet.mpSprm37 = pPlcxMan->HasParaSprm( bVer67 ? 37 : 0x2423 );
-    aRet.mpSprm29 = pPlcxMan->HasParaSprm( bVer67 ? 29 : 0x261B );
 
     // Is there some frame data here
     bool bNowApo = aRet.HasFrame() || pTopLevelTable;

Modified: incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par6.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par6.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par6.cxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/source/filter/ww8/ww8par6.cxx Fri Oct 12 21:29:36 2012
@@ -1926,6 +1926,10 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
     nNewNettoWidth = MINFLY;                    // Minimum
 
     eSurround = ( rWW.nSp37 > 1 ) ? SURROUND_IDEAL : SURROUND_NONE;
+    //#i119466 mapping "Around" wrap setting to "Parallel" for table
+    const bool bIsTable = rIo.pPlcxMan->HasParaSprm(0x2416);
+	if (  bIsTable && rWW.nSp37 == 2 )
+		eSurround = SURROUND_PARALLEL;
 
     /*
      #95905#, #83307# seems to have gone away now, so reenable parallel

Modified: incubator/ooo/branches/buildsys/main/sw/source/filter/xml/xmlitem.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/sw/source/filter/xml/xmlitem.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/sw/source/filter/xml/xmlitem.cxx (original)
+++ incubator/ooo/branches/buildsys/main/sw/source/filter/xml/xmlitem.cxx Fri Oct 12 21:29:36 2012
@@ -62,10 +62,8 @@ SvXMLImportContext *SvXMLItemSetContext:
 		return CreateChildContext( nPrefix, rLocalName, xAttrList,
 								   rItemSet, *pEntry, rUnitConv );
 	}
-	else
-	{
-		return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
-	}
+
+	return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
 }
 
 /** This method is called from this instance implementation of

Modified: incubator/ooo/branches/buildsys/main/swext/mediawiki/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/swext/mediawiki/makefile.mk?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/swext/mediawiki/makefile.mk (original)
+++ incubator/ooo/branches/buildsys/main/swext/mediawiki/makefile.mk Fri Oct 12 21:29:36 2012
@@ -50,10 +50,10 @@ ALLTAR: $(COMP) ANTBUILD
 
 fix_system_commons:
 	@echo "Fix Java Class-Path entry for Apache Commons libraries from system."
-	@$(SED) -r -e "s#(name=\"Class-Path\" value=\").*\"#\1file://$(COMMONS_CODEC_JAR) file://$(COMMONS_LANG_JAR) \
-file://$(COMMONS_HTTPCLIENT_JAR) file://$(COMMONS_LOGGING_JAR)\"#" -i build.xml
+	@$(SED) -i.bak -r -e "s#(name=\"Class-Path\" value=\").*\"#\1file://$(COMMONS_CODEC_JAR) file://$(COMMONS_LANG_JAR) \
+file://$(COMMONS_HTTPCLIENT_JAR) file://$(COMMONS_LOGGING_JAR)\"#" build.xml
 	@echo "Unbundle Apache Commons libraries from Mediawiki Presentation extension."
-	@$(SED) '/file="..commons/d' -i build.xml
+	@$(SED) -i.bak '/file="..commons/d' build.xml
 
 .ELSE
 @all:

Modified: incubator/ooo/branches/buildsys/main/toolkit/inc/toolkit/awt/vclxprinter.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/toolkit/inc/toolkit/awt/vclxprinter.hxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/toolkit/inc/toolkit/awt/vclxprinter.hxx (original)
+++ incubator/ooo/branches/buildsys/main/toolkit/inc/toolkit/awt/vclxprinter.hxx Fri Oct 12 21:29:36 2012
@@ -35,48 +35,50 @@
 
 #include <toolkit/helper/mutexandbroadcasthelper.hxx>
 #include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/uno3.hxx>
 
 #include "vcl/oldprintadaptor.hxx"
 
 // Fuer den Drucker relevante Properties:
 /*
- 	sal_Bool	Horizontal
- 	sal_uInt16	CopyCount;
- 	sal_Bool	Collate;
- 	String	FormDescriptor;
- 	sal_uInt16	Orientation;	// PORTRAIT, LANDSCAPE
+     sal_Bool    Horizontal
+     sal_uInt16    CopyCount;
+     sal_Bool    Collate;
+     String    FormDescriptor;
+     sal_uInt16    Orientation;    // PORTRAIT, LANDSCAPE
 */
 
-//	----------------------------------------------------
-//	class VCLXPrinterPropertySet
-//	----------------------------------------------------
-
-class VCLXPrinterPropertySet :	public ::com::sun::star::awt::XPrinterPropertySet, 
-								public ::com::sun::star::lang::XTypeProvider,
-								public MutexAndBroadcastHelper,
-								public ::cppu::OPropertySetHelper
+//    ----------------------------------------------------
+//    class VCLXPrinterPropertySet
+//    ----------------------------------------------------
+
+typedef ::cppu::WeakImplHelper1 <   ::com::sun::star::awt::XPrinterPropertySet
+                                >   VCLXPrinterPropertySet_Base;
+class VCLXPrinterPropertySet    :public VCLXPrinterPropertySet_Base
+                                ,public MutexAndBroadcastHelper
+                                ,public ::cppu::OPropertySetHelper
 {
 protected:
     boost::shared_ptr<Printer>                      mpPrinter;
-	::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >	mxPrnDevice;
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >    mxPrnDevice;
 
-	sal_Int16					mnOrientation;
-	sal_Bool					mbHorizontal;
-public:	
-	VCLXPrinterPropertySet( const String& rPrinterName );
-	virtual ~VCLXPrinterPropertySet();
+    sal_Int16                    mnOrientation;
+    sal_Bool                    mbHorizontal;
+public:
+    VCLXPrinterPropertySet( const String& rPrinterName );
+    virtual ~VCLXPrinterPropertySet();
 
-	Printer*					GetPrinter() const { return mpPrinter.get(); }
-	::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >	GetDevice();
+    Printer*                    GetPrinter() const { return mpPrinter.get(); }
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >    GetDevice();
 
-	// ::com::sun::star::uno::XInterface
-    ::com::sun::star::uno::Any					SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+    // ::com::sun::star::uno::XInterface
+    DECLARE_XINTERFACE();
 
     // ::com::sun::star::lang::XTypeProvider
-	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+    DECLARE_XTYPEPROVIDER();
 
-	// ::com::sun::star::beans::XPropertySet
+    // ::com::sun::star::beans::XPropertySet
     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
     void SAL_CALL setPropertyValue( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { OPropertySetHelper::setPropertyValue( rPropertyName, aValue ); }
     ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& rPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { return OPropertySetHelper::getPropertyValue( rPropertyName ); }
@@ -85,14 +87,14 @@ public:	
     void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { OPropertySetHelper::addVetoableChangeListener( rPropertyName, rxListener ); }
     void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { OPropertySetHelper::removeVetoableChangeListener( rPropertyName, rxListener ); }
 
-	// ::cppu::OPropertySetHelper
-	::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-	sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException);
-	void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
+    // ::cppu::OPropertySetHelper
+    ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+    sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException);
+    void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
     using cppu::OPropertySetHelper::getFastPropertyValue;
-	void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
+    void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
 
-	// ::com::sun::star::awt::XPrinterPropertySet
+    // ::com::sun::star::awt::XPrinterPropertySet
     void SAL_CALL setHorizontal( sal_Bool bHorizontal ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFormDescriptions(  ) throw(::com::sun::star::uno::RuntimeException);
     void SAL_CALL selectForm( const ::rtl::OUString& aFormDescription ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
@@ -100,31 +102,22 @@ public:	
     void SAL_CALL setBinarySetup( const ::com::sun::star::uno::Sequence< sal_Int8 >& data ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
 };
 
-//	----------------------------------------------------
-//	class VCLXPrinter
-//	----------------------------------------------------
-
-class VCLXPrinter:	public ::com::sun::star::awt::XPrinter, 
-					public VCLXPrinterPropertySet,
-					public ::cppu::OWeakObject
+//    ----------------------------------------------------
+//    class VCLXPrinter
+//    ----------------------------------------------------
+
+typedef ::cppu::ImplInheritanceHelper1  <   VCLXPrinterPropertySet
+                                        ,   ::com::sun::star::awt::XPrinter
+                                        >   VCLXPrinter_Base;
+class VCLXPrinter:    public VCLXPrinter_Base
 {
     boost::shared_ptr<vcl::OldStylePrintAdaptor>    mpListener;
     JobSetup                                        maInitJobSetup;
 public:
-					VCLXPrinter( const String& rPrinterName );
-					~VCLXPrinter();
-
-	// ::com::sun::star::uno::XInterface
-    ::com::sun::star::uno::Any					SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-	void										SAL_CALL acquire() throw()	{ OWeakObject::acquire(); }
-	void										SAL_CALL release() throw()	{ OWeakObject::release(); }
-
-    // ::com::sun::star::lang::XTypeProvider
-	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+    VCLXPrinter( const String& rPrinterName );
+    ~VCLXPrinter();
 
-
-	// ::com::sun::star::beans::XPropertySet
+    // ::com::sun::star::beans::XPropertySet
     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getPropertySetInfo(); }
     void SAL_CALL setPropertyValue( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::setPropertyValue( rPropertyName, aValue ); }
     ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& rPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getPropertyValue( rPropertyName ); }
@@ -133,14 +126,14 @@ public:
     void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::addVetoableChangeListener( rPropertyName, rxListener ); }
     void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::removeVetoableChangeListener( rPropertyName, rxListener ); }
 
-	// ::com::sun::star::awt::XPrinterPropertySet
+    // ::com::sun::star::awt::XPrinterPropertySet
     void SAL_CALL setHorizontal( sal_Bool bHorizontal ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::setHorizontal( bHorizontal ); }
     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFormDescriptions(  ) throw(::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getFormDescriptions(); }
     void SAL_CALL selectForm( const ::rtl::OUString& aFormDescription ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::selectForm( aFormDescription ); }
     ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBinarySetup(  ) throw(::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getBinarySetup(); }
     void SAL_CALL setBinarySetup( const ::com::sun::star::uno::Sequence< sal_Int8 >& data ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::setBinarySetup( data ); }
 
-	// ::com::sun::star::awt::XPrinter
+    // ::com::sun::star::awt::XPrinter
     sal_Bool SAL_CALL start( const ::rtl::OUString& nJobName, sal_Int16 nCopies, sal_Bool nCollate ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
     void SAL_CALL end(  ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException);
     void SAL_CALL terminate(  ) throw(::com::sun::star::uno::RuntimeException);
@@ -148,29 +141,20 @@ public:
     void SAL_CALL endPage(  ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException);
 };
 
-//	----------------------------------------------------
-//	class VCLXInfoPrinter
-//	----------------------------------------------------
-
-class VCLXInfoPrinter:	public ::com::sun::star::awt::XInfoPrinter, 
-						public VCLXPrinterPropertySet,
-						public ::cppu::OWeakObject
+//    ----------------------------------------------------
+//    class VCLXInfoPrinter
+//    ----------------------------------------------------
+
+typedef ::cppu::ImplInheritanceHelper1  <   VCLXPrinterPropertySet
+                                        ,   ::com::sun::star::awt::XInfoPrinter
+                                        >   VCLXInfoPrinter_Base;
+class VCLXInfoPrinter :  public VCLXInfoPrinter_Base
 {
 public:
-						VCLXInfoPrinter( const String& rPrinterName );
-						~VCLXInfoPrinter();
-
-	// ::com::sun::star::uno::XInterface
-    ::com::sun::star::uno::Any					SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-	void										SAL_CALL acquire() throw()	{ OWeakObject::acquire(); }
-	void										SAL_CALL release() throw()	{ OWeakObject::release(); }
-
-    // ::com::sun::star::lang::XTypeProvider
-	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
+    VCLXInfoPrinter( const String& rPrinterName );
+    ~VCLXInfoPrinter();
 
-	// ::com::sun::star::beans::XPropertySet
+    // ::com::sun::star::beans::XPropertySet
     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getPropertySetInfo(); }
     void SAL_CALL setPropertyValue( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::setPropertyValue( rPropertyName, aValue ); }
     ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& rPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getPropertyValue( rPropertyName ); }
@@ -179,36 +163,27 @@ public:
     void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::addVetoableChangeListener( rPropertyName, rxListener ); }
     void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::removeVetoableChangeListener( rPropertyName, rxListener ); }
 
-	// ::com::sun::star::awt::XPrinterPropertySet
+    // ::com::sun::star::awt::XPrinterPropertySet
     void SAL_CALL setHorizontal( sal_Bool bHorizontal ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::setHorizontal( bHorizontal ); }
     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFormDescriptions(  ) throw(::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getFormDescriptions(); }
     void SAL_CALL selectForm( const ::rtl::OUString& aFormDescription ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::selectForm( aFormDescription ); }
     ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBinarySetup(  ) throw(::com::sun::star::uno::RuntimeException) { return VCLXPrinterPropertySet::getBinarySetup(); }
     void SAL_CALL setBinarySetup( const ::com::sun::star::uno::Sequence< sal_Int8 >& data ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { VCLXPrinterPropertySet::setBinarySetup( data ); }
 
-	// ::com::sun::star::awt::XInfoPrinter
+    // ::com::sun::star::awt::XInfoPrinter
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > SAL_CALL createDevice(  ) throw(::com::sun::star::uno::RuntimeException);
 };
 
-//	----------------------------------------------------
-//	class VCLXPrinterServer
-//	----------------------------------------------------
-
-class VCLXPrinterServer :	public ::com::sun::star::awt::XPrinterServer,
-							public	::cppu::OWeakObject
+//    ----------------------------------------------------
+//    class VCLXPrinterServer
+//    ----------------------------------------------------
+
+typedef ::cppu::WeakImplHelper1 <   ::com::sun::star::awt::XPrinterServer
+                                >   VCLXPrinterServer_Base;
+class VCLXPrinterServer : public VCLXPrinterServer_Base
 {
 public:
-    
-	// ::com::sun::star::uno::XInterface
-    ::com::sun::star::uno::Any					SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-	void										SAL_CALL acquire() throw()	{ OWeakObject::acquire(); }
-	void										SAL_CALL release() throw()	{ OWeakObject::release(); }
-
-    // ::com::sun::star::lang::XTypeProvider
-	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
-	// ::com::sun::star::awt::XPrinterServer
+    // ::com::sun::star::awt::XPrinterServer
     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getPrinterNames(  ) throw(::com::sun::star::uno::RuntimeException);
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > SAL_CALL createPrinter( const ::rtl::OUString& printerName ) throw(::com::sun::star::uno::RuntimeException);
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > SAL_CALL createInfoPrinter( const ::rtl::OUString& printerName ) throw(::com::sun::star::uno::RuntimeException);
@@ -218,4 +193,3 @@ public:
 
 
 #endif // _TOOLKIT_AWT_VCLXPRINTER_HXX_
-

Modified: incubator/ooo/branches/buildsys/main/toolkit/source/awt/vclxprinter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/toolkit/source/awt/vclxprinter.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/toolkit/source/awt/vclxprinter.cxx (original)
+++ incubator/ooo/branches/buildsys/main/toolkit/source/awt/vclxprinter.cxx Fri Oct 12 21:29:36 2012
@@ -42,257 +42,240 @@
 #include <toolkit/awt/vclxdevice.hxx>
 
 
-#define BINARYSETUPMARKER	0x23864691
+#define BINARYSETUPMARKER       0x23864691
 
-#define PROPERTY_Orientation	0
-#define PROPERTY_Horizontal		1
+#define PROPERTY_Orientation    0
+#define PROPERTY_Horizontal     1
 
 ::com::sun::star::beans::Property* ImplGetProperties( sal_uInt16& rElementCount )
 {
-	static ::com::sun::star::beans::Property* pProperties = NULL;
-	static sal_uInt16 nElements = 0;
-	if( !pProperties )
-	{
-		::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
-		if( !pProperties )
-		{
-			static ::com::sun::star::beans::Property __FAR_DATA aPropTable[] =
-			{
-				::com::sun::star::beans::Property( ::rtl::OUString::createFromAscii( "Orientation" ), PROPERTY_Orientation, ::getCppuType((const sal_Int16*)0), 0 ),
-				::com::sun::star::beans::Property( ::rtl::OUString::createFromAscii( "Horizontal" ), PROPERTY_Horizontal, ::getBooleanCppuType(), 0 )
-			};
-			pProperties = aPropTable;
-			nElements = sizeof( aPropTable ) / sizeof( ::com::sun::star::beans::Property );
-		}
-	}
-	rElementCount = nElements;
-	return pProperties;
-}
-
-//	----------------------------------------------------
-//	class VCLXPrinterPropertySet
-//	----------------------------------------------------
-
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXPrinterPropertySet::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
-	::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
-										SAL_STATIC_CAST( ::com::sun::star::beans::XMultiPropertySet*, this ),
-										SAL_STATIC_CAST( ::com::sun::star::beans::XFastPropertySet*, this ),
-										SAL_STATIC_CAST( ::com::sun::star::beans::XPropertySet*, (::cppu::OPropertySetHelper*) this ),
-										SAL_STATIC_CAST( ::com::sun::star::awt::XPrinterPropertySet*, this ),
-										SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ) );
-	return (aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXPrinterPropertySet )
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>* ) NULL ),
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>* ) NULL ),
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>* ) NULL ),
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinterPropertySet>* ) NULL )
-IMPL_XTYPEPROVIDER_END
+    static ::com::sun::star::beans::Property* pProperties = NULL;
+    static sal_uInt16 nElements = 0;
+    if( !pProperties )
+    {
+        ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+        if( !pProperties )
+        {
+            static ::com::sun::star::beans::Property __FAR_DATA aPropTable[] =
+            {
+                ::com::sun::star::beans::Property( ::rtl::OUString::createFromAscii( "Orientation" ), PROPERTY_Orientation, ::getCppuType((const sal_Int16*)0), 0 ),
+                ::com::sun::star::beans::Property( ::rtl::OUString::createFromAscii( "Horizontal" ), PROPERTY_Horizontal, ::getBooleanCppuType(), 0 )
+            };
+            pProperties = aPropTable;
+            nElements = sizeof( aPropTable ) / sizeof( ::com::sun::star::beans::Property );
+        }
+    }
+    rElementCount = nElements;
+    return pProperties;
+}
+
+//    ----------------------------------------------------
+//    class VCLXPrinterPropertySet
+//    ----------------------------------------------------
+
+IMPLEMENT_FORWARD_XINTERFACE2( VCLXPrinterPropertySet, VCLXPrinterPropertySet_Base, OPropertySetHelper )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXPrinterPropertySet, VCLXPrinterPropertySet_Base, ::cppu::OPropertySetHelper )
 
 VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName )
-	: OPropertySetHelper( BrdcstHelper )
+    : OPropertySetHelper( BrdcstHelper )
     , mpPrinter( new Printer( rPrinterName ) )
 {
-	osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() );
+    osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() );
 
-	mnOrientation = 0;
-	mbHorizontal = sal_False;
+    mnOrientation = 0;
+    mbHorizontal = sal_False;
 }
 
 VCLXPrinterPropertySet::~VCLXPrinterPropertySet()
 {
-	osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() );
+    osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() );
     mpPrinter.reset();
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >  VCLXPrinterPropertySet::GetDevice()
 {
-	if ( !mxPrnDevice.is() ) 
-	{
-		VCLXDevice* pDev = new VCLXDevice;
-		pDev->SetOutputDevice( GetPrinter() );
-		mxPrnDevice = pDev;
-	}
-	return mxPrnDevice;
+    if ( !mxPrnDevice.is() )
+    {
+        VCLXDevice* pDev = new VCLXDevice;
+        pDev->SetOutputDevice( GetPrinter() );
+        mxPrnDevice = pDev;
+    }
+    return mxPrnDevice;
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > VCLXPrinterPropertySet::getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-	static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >  xInfo( createPropertySetInfo( getInfoHelper() ) );
-	return xInfo;
+    static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >  xInfo( createPropertySetInfo( getInfoHelper() ) );
+    return xInfo;
 }
 
 ::cppu::IPropertyArrayHelper& VCLXPrinterPropertySet::getInfoHelper()
 {
-	static ::cppu::OPropertyArrayHelper* pPropertyArrayHelper = NULL;
-	if ( !pPropertyArrayHelper )
-	{
-		::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
-		if( !pPropertyArrayHelper )
-		{
-			sal_uInt16 nElements;
-			::com::sun::star::beans::Property* pProps = ImplGetProperties( nElements );
-			pPropertyArrayHelper = new ::cppu::OPropertyArrayHelper( pProps, nElements, sal_False );
-		}
-	}
-	return *pPropertyArrayHelper ;
+    static ::cppu::OPropertyArrayHelper* pPropertyArrayHelper = NULL;
+    if ( !pPropertyArrayHelper )
+    {
+        ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+        if( !pPropertyArrayHelper )
+        {
+            sal_uInt16 nElements;
+            ::com::sun::star::beans::Property* pProps = ImplGetProperties( nElements );
+            pPropertyArrayHelper = new ::cppu::OPropertyArrayHelper( pProps, nElements, sal_False );
+        }
+    }
+    return *pPropertyArrayHelper ;
 }
 
 sal_Bool VCLXPrinterPropertySet::convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	sal_Bool bDifferent = sal_False;
-	switch ( nHandle ) 
-	{
-		case PROPERTY_Orientation:
-		{
-			sal_Int16 n;
-			if( ( rValue >>= n ) && ( n != mnOrientation ) )
-			{
-				rConvertedValue <<= n;
-				rOldValue <<= mnOrientation;
-				bDifferent = sal_True;
-			}
-		}
-		break;
-		case PROPERTY_Horizontal:
-		{
-			sal_Bool b;
-			if( ( rValue >>= b ) && ( b != mbHorizontal ) )
-			{
-				rConvertedValue <<= b;
-				rOldValue <<= mbHorizontal;
-				bDifferent = sal_True;
-			}
-		}
-		break;
-		default:
-		{
-			DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" );
-		}
-	}
-	return bDifferent;
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    sal_Bool bDifferent = sal_False;
+    switch ( nHandle )
+    {
+        case PROPERTY_Orientation:
+        {
+            sal_Int16 n;
+            if( ( rValue >>= n ) && ( n != mnOrientation ) )
+            {
+                rConvertedValue <<= n;
+                rOldValue <<= mnOrientation;
+                bDifferent = sal_True;
+            }
+        }
+        break;
+        case PROPERTY_Horizontal:
+        {
+            sal_Bool b;
+            if( ( rValue >>= b ) && ( b != mbHorizontal ) )
+            {
+                rConvertedValue <<= b;
+                rOldValue <<= mbHorizontal;
+                bDifferent = sal_True;
+            }
+        }
+        break;
+        default:
+        {
+            DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" );
+        }
+    }
+    return bDifferent;
 }
 
 void VCLXPrinterPropertySet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	switch( nHandle )
-	{
-		case PROPERTY_Orientation:
-		{
-			rValue >>= mnOrientation;
-		}
-		break;
-		case PROPERTY_Horizontal:
-		{
-			rValue >>= mbHorizontal;
-		}
-		break;
-		default:
-		{
-			DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" );
-		}
-	}
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    switch( nHandle )
+    {
+        case PROPERTY_Orientation:
+        {
+            rValue >>= mnOrientation;
+        }
+        break;
+        case PROPERTY_Horizontal:
+        {
+            rValue >>= mbHorizontal;
+        }
+        break;
+        default:
+        {
+            DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" );
+        }
+    }
 }
 
 void VCLXPrinterPropertySet::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const
 {
-	::osl::Guard< ::osl::Mutex > aGuard( ((VCLXPrinterPropertySet*)this)->Mutex );
-	
-	switch( nHandle )
-	{
-		case PROPERTY_Orientation:
-			rValue <<= mnOrientation;
-		break;
-		case PROPERTY_Horizontal:
-			rValue <<= mbHorizontal;
-		break;
-		default:
-		{
-			DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" );
-		}
-	}
+    ::osl::Guard< ::osl::Mutex > aGuard( ((VCLXPrinterPropertySet*)this)->Mutex );
+
+    switch( nHandle )
+    {
+        case PROPERTY_Orientation:
+            rValue <<= mnOrientation;
+        break;
+        case PROPERTY_Horizontal:
+            rValue <<= mbHorizontal;
+        break;
+        default:
+        {
+            DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" );
+        }
+    }
 }
 
 // ::com::sun::star::awt::XPrinterPropertySet
 void VCLXPrinterPropertySet::setHorizontal( sal_Bool bHorizontal ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
 
-	::com::sun::star::uno::Any aValue;
-	aValue <<= bHorizontal;
-	setFastPropertyValue( PROPERTY_Horizontal, aValue );
+    ::com::sun::star::uno::Any aValue;
+    aValue <<= bHorizontal;
+    setFastPropertyValue( PROPERTY_Horizontal, aValue );
 }
 
 ::com::sun::star::uno::Sequence< ::rtl::OUString > VCLXPrinterPropertySet::getFormDescriptions(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	sal_uInt16 nPaperBinCount = GetPrinter()->GetPaperBinCount();
-	::com::sun::star::uno::Sequence< ::rtl::OUString >	aDescriptions( nPaperBinCount );
-	for ( sal_uInt16 n = 0; n < nPaperBinCount; n++ ) 
-	{
-		// Format: <DisplayFormName;FormNameId;DisplayPaperBinName;PaperBinNameId;DisplayPaperName;PaperNameId>
-		String aDescr( RTL_CONSTASCII_USTRINGPARAM( "*;*;" ) );
-		aDescr += GetPrinter()->GetPaperBinName( n );
-		aDescr += ';';
-		aDescr += n;
-		aDescr.AppendAscii( ";*;*", 4 );
-
-		aDescriptions.getArray()[n] = aDescr;
-	}
-	return aDescriptions;
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    sal_uInt16 nPaperBinCount = GetPrinter()->GetPaperBinCount();
+    ::com::sun::star::uno::Sequence< ::rtl::OUString > aDescriptions( nPaperBinCount );
+    for ( sal_uInt16 n = 0; n < nPaperBinCount; n++ )
+    {
+        // Format: <DisplayFormName;FormNameId;DisplayPaperBinName;PaperBinNameId;DisplayPaperName;PaperNameId>
+        String aDescr( RTL_CONSTASCII_USTRINGPARAM( "*;*;" ) );
+        aDescr += GetPrinter()->GetPaperBinName( n );
+        aDescr += ';';
+        aDescr += n;
+        aDescr.AppendAscii( ";*;*", 4 );
+
+        aDescriptions.getArray()[n] = aDescr;
+    }
+    return aDescriptions;
 }
 
 void VCLXPrinterPropertySet::selectForm( const ::rtl::OUString& rFormDescription ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
     sal_Int32 nIndex = 0;
-	sal_uInt16 nPaperBin = sal::static_int_cast< sal_uInt16 >(
+    sal_uInt16 nPaperBin = sal::static_int_cast< sal_uInt16 >(
         rFormDescription.getToken( 3, ';', nIndex ).toInt32());
-	GetPrinter()->SetPaperBin( nPaperBin );
+    GetPrinter()->SetPaperBin( nPaperBin );
 }
 
 ::com::sun::star::uno::Sequence< sal_Int8 > VCLXPrinterPropertySet::getBinarySetup(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	SvMemoryStream aMem;
-	aMem << BINARYSETUPMARKER;
-	aMem << GetPrinter()->GetJobSetup();
-	return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    SvMemoryStream aMem;
+    aMem << BINARYSETUPMARKER;
+    aMem << GetPrinter()->GetJobSetup();
+    return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
 }
 
 void VCLXPrinterPropertySet::setBinarySetup( const ::com::sun::star::uno::Sequence< sal_Int8 >& data ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	SvMemoryStream aMem( (char*) data.getConstArray(), data.getLength(), STREAM_READ );
-	sal_uInt32 nMarker;
-	aMem >> nMarker;
-	DBG_ASSERT( nMarker == BINARYSETUPMARKER, "setBinarySetup - invalid!" );
-	if ( nMarker == BINARYSETUPMARKER ) 
-	{
-		JobSetup aSetup;
-		aMem >> aSetup;
-		GetPrinter()->SetJobSetup( aSetup );
-	}
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    SvMemoryStream aMem( (char*) data.getConstArray(), data.getLength(), STREAM_READ );
+    sal_uInt32 nMarker;
+    aMem >> nMarker;
+    DBG_ASSERT( nMarker == BINARYSETUPMARKER, "setBinarySetup - invalid!" );
+    if ( nMarker == BINARYSETUPMARKER )
+    {
+        JobSetup aSetup;
+        aMem >> aSetup;
+        GetPrinter()->SetJobSetup( aSetup );
+    }
 }
 
 
-//	----------------------------------------------------
-//	class VCLXPrinter
-//	----------------------------------------------------
-VCLXPrinter::VCLXPrinter( const String& rPrinterName ) 
-	: VCLXPrinterPropertySet( rPrinterName )
+//    ----------------------------------------------------
+//    class VCLXPrinter
+//    ----------------------------------------------------
+VCLXPrinter::VCLXPrinter( const String& rPrinterName )
+    : VCLXPrinter_Base( rPrinterName )
 {
 }
 
@@ -300,43 +283,25 @@ VCLXPrinter::~VCLXPrinter()
 {
 }
 
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXPrinter::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
-	::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
-										SAL_STATIC_CAST( ::com::sun::star::awt::XPrinter*, this ) );
-
-    if ( !aRet.hasValue() )
-        aRet = VCLXPrinterPropertySet::queryInterface( rType );
-
-	return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXPrinter )
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter>* ) NULL ),
-	VCLXPrinterPropertySet::getTypes()
-IMPL_XTYPEPROVIDER_END
-
 sal_Bool VCLXPrinter::start( const ::rtl::OUString& /*rJobName*/, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	sal_Bool bDone = sal_True;
-	if ( mpListener.get() )
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    sal_Bool bDone = sal_True;
+    if ( mpPrinter.get() )
     {
         maInitJobSetup = mpPrinter->GetJobSetup();
         mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
     }
-	
-	return bDone;
+
+    return bDone;
 }
 
 void VCLXPrinter::end(  ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	if ( mpListener.get() ) 
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    if ( mpListener.get() )
     {
         Printer::PrintJob( mpListener, maInitJobSetup );
         mpListener.reset();
@@ -345,39 +310,39 @@ void VCLXPrinter::end(  ) throw(::com::s
 
 void VCLXPrinter::terminate(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
 
-    mpListener.reset();	
+    mpListener.reset();
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinter::startPage(  ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	if ( mpListener.get() ) 
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    if ( mpListener.get() )
     {
         mpListener->StartPage();
     }
-	return GetDevice();
+    return GetDevice();
 }
 
 void VCLXPrinter::endPage(  ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	if ( mpListener.get() ) 
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
+
+    if ( mpListener.get() )
     {
         mpListener->EndPage();
     }
 }
 
 
-//	----------------------------------------------------
-//	class VCLXInfoPrinter
-//	----------------------------------------------------
+//    ----------------------------------------------------
+//    class VCLXInfoPrinter
+//    ----------------------------------------------------
 
-VCLXInfoPrinter::VCLXInfoPrinter( const String& rPrinterName ) 
-	: VCLXPrinterPropertySet( rPrinterName )
+VCLXInfoPrinter::VCLXInfoPrinter( const String& rPrinterName )
+    : VCLXInfoPrinter_Base( rPrinterName )
 {
 }
 
@@ -385,75 +350,43 @@ VCLXInfoPrinter::~VCLXInfoPrinter()
 {
 }
 
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXInfoPrinter::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
-	::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
-										SAL_STATIC_CAST( ::com::sun::star::awt::XInfoPrinter*, this ) );
-
-    if ( !aRet.hasValue() )
-        aRet = VCLXPrinterPropertySet::queryInterface( rType );
-
-	return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXInfoPrinter )
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter>* ) NULL ),
-	VCLXPrinterPropertySet::getTypes()
-IMPL_XTYPEPROVIDER_END
-
 // ::com::sun::star::awt::XInfoPrinter
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXInfoPrinter::createDevice(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( Mutex );
-	
-	return GetDevice();
-}
-
-//	----------------------------------------------------
-//	class VCLXPrinterServer
-//	----------------------------------------------------
+    ::osl::Guard< ::osl::Mutex > aGuard( Mutex );
 
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXPrinterServer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
-	::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
-										SAL_STATIC_CAST( ::com::sun::star::awt::XPrinterServer*, this ) );
-	return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
+    return GetDevice();
 }
 
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXPrinterServer )
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinterServer>* ) NULL )
-IMPL_XTYPEPROVIDER_END
+//    ----------------------------------------------------
+//    class VCLXPrinterServer
+//    ----------------------------------------------------
 
 // ::com::sun::star::awt::XPrinterServer
 ::com::sun::star::uno::Sequence< ::rtl::OUString > VCLXPrinterServer::getPrinterNames(  ) throw(::com::sun::star::uno::RuntimeException)
 {
     const std::vector<rtl::OUString>& rQueues = Printer::GetPrinterQueues();
-	sal_uInt32 nPrinters = rQueues.size();
+    sal_uInt32 nPrinters = rQueues.size();
+
+    ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames( nPrinters );
+    for ( sal_uInt32 n = 0; n < nPrinters; n++ )
+        aNames.getArray()[n] = rQueues[n];
 
-	::com::sun::star::uno::Sequence< ::rtl::OUString >	aNames( nPrinters );
-	for ( sal_uInt32 n = 0; n < nPrinters; n++ ) 
-		aNames.getArray()[n] = rQueues[n];
-	
-	return aNames;
+    return aNames;
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > VCLXPrinterServer::createPrinter( const ::rtl::OUString& rPrinterName ) throw(::com::sun::star::uno::RuntimeException)
 {
-	::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > xP;
-	xP = new VCLXPrinter( rPrinterName );
-	return xP;
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > xP;
+    xP = new VCLXPrinter( rPrinterName );
+    return xP;
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > VCLXPrinterServer::createInfoPrinter( const ::rtl::OUString& rPrinterName ) throw(::com::sun::star::uno::RuntimeException)
 {
-	::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > xP;
-	xP = new VCLXInfoPrinter( rPrinterName );
-	return xP;
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > xP;
+    xP = new VCLXInfoPrinter( rPrinterName );
+    return xP;
 }
 
 
-

Modified: incubator/ooo/branches/buildsys/main/tools/source/generic/poly2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/tools/source/generic/poly2.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/tools/source/generic/poly2.cxx (original)
+++ incubator/ooo/branches/buildsys/main/tools/source/generic/poly2.cxx Fri Oct 12 21:29:36 2012
@@ -281,40 +281,63 @@ void PolyPolygon::Optimize( sal_uIntPtr 
 {
 	DBG_CHKTHIS( PolyPolygon, NULL );
 
-	if( nOptimizeFlags )
+	if(nOptimizeFlags && Count())
 	{
-		double		fArea;
-		const sal_Bool	bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
-		sal_uInt16		nPercent = 0;
+        // #115630# ImplDrawHatch does not work with beziers included in the polypolygon, take care of that
+        bool bIsCurve(false);
 
-		if( bEdges )
-		{
-			const Rectangle aBound( GetBoundRect() );
-
-			fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5;
-			nPercent = pData ? pData->GetPercentValue() : 50;
-			nOptimizeFlags &= ~POLY_OPTIMIZE_EDGES;
-		}
-
-		// watch for ref counter
-		if( mpImplPolyPolygon->mnRefCount > 1 )
-		{
-			mpImplPolyPolygon->mnRefCount--;
-			mpImplPolyPolygon = new ImplPolyPolygon( *mpImplPolyPolygon );
-		}
+        for(sal_uInt16 a(0); !bIsCurve && a < Count(); a++)
+        {
+            if((*this)[a].HasFlags())
+            {
+                bIsCurve = true;
+            }
+        }
 
-		// Optimize polygons
-		for( sal_uInt16 i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
-		{
-			if( bEdges )
-			{
-				mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( POLY_OPTIMIZE_NO_SAME );
-				Polygon::ImplReduceEdges( *( mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
-			}
+        if(bIsCurve)
+        {
+            OSL_ENSURE(false, "Optimize does *not* support curves, falling back to AdaptiveSubdivide()...");
+            PolyPolygon aPolyPoly;
 
-			if( nOptimizeFlags )
-				mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( nOptimizeFlags, pData );
-		}
+            AdaptiveSubdivide(aPolyPoly);
+            aPolyPoly.Optimize(nOptimizeFlags, pData);
+            *this = aPolyPoly;
+        }
+        else
+        {
+		    double		fArea;
+		    const sal_Bool	bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
+		    sal_uInt16		nPercent = 0;
+
+		    if( bEdges )
+		    {
+			    const Rectangle aBound( GetBoundRect() );
+
+			    fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5;
+			    nPercent = pData ? pData->GetPercentValue() : 50;
+			    nOptimizeFlags &= ~POLY_OPTIMIZE_EDGES;
+		    }
+
+		    // watch for ref counter
+		    if( mpImplPolyPolygon->mnRefCount > 1 )
+		    {
+			    mpImplPolyPolygon->mnRefCount--;
+			    mpImplPolyPolygon = new ImplPolyPolygon( *mpImplPolyPolygon );
+		    }
+
+		    // Optimize polygons
+		    for( sal_uInt16 i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
+		    {
+			    if( bEdges )
+			    {
+				    mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( POLY_OPTIMIZE_NO_SAME );
+				    Polygon::ImplReduceEdges( *( mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
+			    }
+
+			    if( nOptimizeFlags )
+				    mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( nOptimizeFlags, pData );
+		    }
+        }
 	}
 }
 

Modified: incubator/ooo/branches/buildsys/main/udkapi/com/sun/star/container/XNamed.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/udkapi/com/sun/star/container/XNamed.idl?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/udkapi/com/sun/star/container/XNamed.idl (original)
+++ incubator/ooo/branches/buildsys/main/udkapi/com/sun/star/container/XNamed.idl Fri Oct 12 21:29:36 2012
@@ -56,6 +56,27 @@ published interface XNamed: com::sun::st
  
 //============================================================================= 
  
+/** specifies the display name of the object.
+	
+	<p>The name is generally unique in the container of the object.</p>
+ */
+published interface XNamedEx: XNamed
+{ 
+	//------------------------------------------------------------------------- 
+	 
+	/** @returns 
+		the display name of the object.
+	 */
+	string getDisplayName(); 
+ 
+	//------------------------------------------------------------------------- 
+	 
+	/** sets the display name of the object.
+	 */
+	[oneway] void setDisplayName( [in] string aName ); 
+ 
+}; 
+ 
 }; }; }; };  
  
 #endif 

Modified: incubator/ooo/branches/buildsys/main/vcl/source/gdi/gdimtf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/vcl/source/gdi/gdimtf.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/vcl/source/gdi/gdimtf.cxx (original)
+++ incubator/ooo/branches/buildsys/main/vcl/source/gdi/gdimtf.cxx Fri Oct 12 21:29:36 2012
@@ -1517,9 +1517,9 @@ Rectangle GDIMetaFile::GetBoundRect( Out
         *pHairline = Rectangle();
     }
 
-    const sal_uLong nCount(GetActionCount());
+    const sal_uLong nActionCount(GetActionCount());
 
-    for(sal_uLong a(0); a < nCount; a++)
+    for(sal_uLong a(0); a < nActionCount; a++)
     {
         MetaAction* pAction = GetAction(a);
         const sal_uInt16 nActionType = pAction->GetType();

Modified: incubator/ooo/branches/buildsys/main/vcl/source/gdi/impgraph.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/buildsys/main/vcl/source/gdi/impgraph.cxx?rev=1397728&r1=1397727&r2=1397728&view=diff
==============================================================================
--- incubator/ooo/branches/buildsys/main/vcl/source/gdi/impgraph.cxx (original)
+++ incubator/ooo/branches/buildsys/main/vcl/source/gdi/impgraph.cxx Fri Oct 12 21:29:36 2012
@@ -554,74 +554,81 @@ Bitmap ImpGraphic::ImplGetBitmap(const G
     }
     else if( ( meType != GRAPHIC_DEFAULT ) && ImplIsSupportedGraphic() )
     {
-        // calculate size
-        VirtualDevice aVDev;
-        Size aDrawSize(aVDev.LogicToPixel(maMetaFile.GetPrefSize(), maMetaFile.GetPrefMapMode()));
-
-        if(rParameters.getSizePixel().Width() && rParameters.getSizePixel().Height())
+        if(maEx.IsEmpty())
         {
-            // apply given size if exists
-            aDrawSize = rParameters.getSizePixel();
-        }
+            // calculate size
+            VirtualDevice aVDev;
+            Size aDrawSize(aVDev.LogicToPixel(maMetaFile.GetPrefSize(), maMetaFile.GetPrefMapMode()));
 
-        if(aDrawSize.Width() && aDrawSize.Height() && !rParameters.getUnlimitedSize()
-            && (aDrawSize.Width() > GRAPHIC_MTFTOBMP_MAXEXT || aDrawSize.Height() > GRAPHIC_MTFTOBMP_MAXEXT))
-        {
-            // limit bitmap size to a maximum of GRAPHIC_MTFTOBMP_MAXEXT x GRAPHIC_MTFTOBMP_MAXEXT
-            double fWH((double)aDrawSize.Width() / (double)aDrawSize.Height());
-
-            if(fWH <= 1.0)
+            if(rParameters.getSizePixel().Width() && rParameters.getSizePixel().Height())
             {
-                aDrawSize.setWidth(basegfx::fround(GRAPHIC_MTFTOBMP_MAXEXT * fWH));
-                aDrawSize.setHeight(GRAPHIC_MTFTOBMP_MAXEXT);
+                // apply given size if exists
+                aDrawSize = rParameters.getSizePixel();
             }
-            else
+
+            if(aDrawSize.Width() && aDrawSize.Height() && !rParameters.getUnlimitedSize()
+                && (aDrawSize.Width() > GRAPHIC_MTFTOBMP_MAXEXT || aDrawSize.Height() > GRAPHIC_MTFTOBMP_MAXEXT))
             {
-                aDrawSize.setWidth(GRAPHIC_MTFTOBMP_MAXEXT);
-                aDrawSize.setHeight(basegfx::fround(GRAPHIC_MTFTOBMP_MAXEXT / fWH));
+                // limit bitmap size to a maximum of GRAPHIC_MTFTOBMP_MAXEXT x GRAPHIC_MTFTOBMP_MAXEXT
+                double fWH((double)aDrawSize.Width() / (double)aDrawSize.Height());
+
+                if(fWH <= 1.0)
+                {
+                    aDrawSize.setWidth(basegfx::fround(GRAPHIC_MTFTOBMP_MAXEXT * fWH));
+                    aDrawSize.setHeight(GRAPHIC_MTFTOBMP_MAXEXT);
+                }
+                else
+                {
+                    aDrawSize.setWidth(GRAPHIC_MTFTOBMP_MAXEXT);
+                    aDrawSize.setHeight(basegfx::fround(GRAPHIC_MTFTOBMP_MAXEXT / fWH));
+                }
             }
-        }
 
-        // calculate pixel size. Normally, it's the same as aDrawSize, but may
-        // need to be extended when hairlines are on the right or bottom edge
-        Size aPixelSize(aDrawSize);
+            // calculate pixel size. Normally, it's the same as aDrawSize, but may
+            // need to be extended when hairlines are on the right or bottom edge
+            Size aPixelSize(aDrawSize);
 
-        if(GRAPHIC_GDIMETAFILE == ImplGetType())
-        {
-            // get hairline and full bound rect
-            Rectangle aHairlineRect;
-            const Rectangle aRect(maMetaFile.GetBoundRect(aVDev, &aHairlineRect));
+            if(GRAPHIC_GDIMETAFILE == ImplGetType())
+            {
+                // get hairline and full bound rect
+                Rectangle aHairlineRect;
+                const Rectangle aRect(maMetaFile.GetBoundRect(aVDev, &aHairlineRect));
+
+                if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty())
+                {
+                    // expand if needed to allow bottom and right hairlines to be added
+                    if(aRect.Right() == aHairlineRect.Right())
+                    {
+                        aPixelSize.setWidth(aPixelSize.getWidth() + 1);
+                    }
 
-            if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty())
+                    if(aRect.Bottom() == aHairlineRect.Bottom())
+                    {
+                        aPixelSize.setHeight(aPixelSize.getHeight() + 1);
+                    }
+                }
+            }
+
+            if(aVDev.SetOutputSizePixel(aPixelSize))
             {
-                // expand if needed to allow bottom and right hairlines to be added
-                if(aRect.Right() == aHairlineRect.Right())
+                if(rParameters.getAntiAliase())
                 {
-                    aPixelSize.setWidth(aPixelSize.getWidth() + 1);
+                    aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW);
                 }
 
-                if(aRect.Bottom() == aHairlineRect.Bottom())
+                if(rParameters.getSnapHorVerLines())
                 {
-                    aPixelSize.setHeight(aPixelSize.getHeight() + 1);
+                    aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_PIXELSNAPHAIRLINE);
                 }
-            }
-        }
 
-        if(aVDev.SetOutputSizePixel(aPixelSize))
-        {
-            if(rParameters.getAntiAliase())
-            {
-                aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW);
-            }
+                ImplDraw( &aVDev, Point(), aDrawSize );
 
-            if(rParameters.getSnapHorVerLines())
-            {
-                aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_PIXELSNAPHAIRLINE);
+                // use maEx as local buffer for rendered metafile
+                const_cast< ImpGraphic* >(this)->maEx = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
             }
-
-            ImplDraw( &aVDev, Point(), aDrawSize );
-            aRetBmp =  aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
         }
+
+        aRetBmp = maEx.GetBitmap();
     }
 
 	if( !!aRetBmp )
@@ -654,8 +661,15 @@ BitmapEx ImpGraphic::ImplGetBitmapEx(con
     }
     else if( ( meType != GRAPHIC_DEFAULT ) && ImplIsSupportedGraphic() )
     {
-		const ImpGraphic aMonoMask( maMetaFile.GetMonochromeMtf( COL_BLACK ) );
-		aRetBmpEx = BitmapEx(ImplGetBitmap(rParameters), aMonoMask.ImplGetBitmap(rParameters));
+        if(maEx.IsEmpty())
+        {
+		    const ImpGraphic aMonoMask( maMetaFile.GetMonochromeMtf( COL_BLACK ) );
+
+            // use maEx as local buffer for rendered metafile
+            const_cast< ImpGraphic* >(this)->maEx = BitmapEx(ImplGetBitmap(rParameters), aMonoMask.ImplGetBitmap(rParameters));
+        }
+
+        aRetBmpEx = maEx;
     }
 
     return aRetBmpEx;



Mime
View raw message