Commits

Anonymous committed 57641e4

#i115915# paper size box needs valid selection

Comments (0)

Files changed (1)

cui/source/tabpages/page.cxx

 	ResStringArray aPaperAry( CUI_RES( nAryId ) );
 	sal_uInt32 nCnt = aPaperAry.Count();
 
+	USHORT nUserPos = LISTBOX_ENTRY_NOTFOUND;
 	for ( sal_uInt32 i = 0; i < nCnt; ++i )
 	{
 		String aStr = aPaperAry.GetString(i);
 
 		if ( eSize == ePaper )
 			nActPos = nPos;
+        if( eSize == PAPER_USER )
+            nUserPos = nPos;
 	}
-	// aktuelles Papierformat selektieren
-	aPaperSizeBox.SelectEntryPos( nActPos );
+	// preselect current paper format - #115915#: ePaper might not be in aPaperSizeBox so use PAPER_USER instead
+    aPaperSizeBox.SelectEntryPos( nActPos != LISTBOX_ENTRY_NOTFOUND ? nActPos : nUserPos );
 
     // Applikationsspezifisch